View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 5 posts ] 
Print view Previous topic   Next topic  
Author Message
Search for:
PostPosted: Sat Jan 23, 2016 1:27 pm 
Offline
Joined: Fri Nov 19, 2004 11:58 pm
Posts: 99
Where and how is proper place to change IO Scheduler so that it is trigger at boot time by UUID or equivalent?

The devices in question moves device letters(/dev/sd?) and are part of raids that mount at boot, used only for myth storage, and formated in XFS. The mythserver code, mdadm, XFS, and default kernel scheduler are adding layers of overhead that seem to cause random locks when recording multiple shows with playbacks mostly around commercial skips.

Failed attempts:
/etc/rc.local --> script works when manual executed
/etc/udev/rule.d/95-io-scheduler.rules --> ENV{ID_FS_UUID_SUB}=="xzy", ATTR{../queue/scheduler}="deadline"
Note ID_FS_UUID & ID_FS_UUID_ENC seem to unique per raid, not raid drive member


Top
 Profile  
 
PostPosted: Sat Jan 23, 2016 3:03 pm 
Offline
Joined: Wed Dec 10, 2003 8:31 pm
Posts: 1996
Location: /dev/null
Does LH use systemd? If so:
Code:
/etc/tmpfiles.d/foo.conf
w /sys/block/sda/queue/scheduler - - - - deadline


If not, I don't see why you can't just echo it in your /etc/rc.local

As an aside, were you aware of the scsi_mod.use_blk_mq=1 kernel boot parameter? I do not know what version of the kernel LH ships but that is pretty amazing for SATA drives on modern hardware. See: https://wiki.archlinux.org/index.php/Ma ... schedulers

_________________
Retired KM user (R4 - R6.04); friend to LH users.


Top
 Profile  
 
PostPosted: Sat Jan 23, 2016 3:27 pm 
Offline
Site Admin
Joined: Fri Jun 11, 2004 7:58 am
Posts: 507
http://linhes.org/projects/linhes/wiki/FAQ

Instead of rc.local the file to modify is
/etc/runit/1.local


Top
 Profile  
 
PostPosted: Sat Jan 23, 2016 5:02 pm 
Offline
Joined: Wed Dec 10, 2003 8:31 pm
Posts: 1996
Location: /dev/null
jams wrote:
http://linhes.org/projects/linhes/wiki/FAQ

Instead of rc.local the file to modify is
/etc/runit/1.local


<<Headsmack>> I remember now, you guys are using runit.

Looks like you're on kernel 3.18.24 currently and I think the scsi_mod.use_blk_mq=1 has been mainlined since 3.16 so the OP might want to give that a shot if hardware is supported. In my tests on an SSD, I found up to 20-ish% improvements. I will search for the data and post here.

EDIT:
On my SSD doing some iobench tests with different schedulers... it really excelled in random writes as you see and was no worse than others in the read, write, and rnd reads.
Image

Raw data: https://gist.github.com/graysky2/4bc78c9d66093427ff73

As with anything, you need to test on your hardware to verify what is best and also, what is best depends on your work loads/use case, etc.

_________________
Retired KM user (R4 - R6.04); friend to LH users.


Top
 Profile  
 
PostPosted: Sat Jan 23, 2016 9:14 pm 
Offline
Joined: Fri Nov 19, 2004 11:58 pm
Posts: 99
Thanks, for the info, here is my 1.local script in case anyone needs an example:

Code:
#!/bin/bash
#
# /etc/rc.local: Local multi-user start-up script.
#
UUID_LIST=(
        ata-TOSHIBA_DT01ACA300_457T447GS
        ata-TOSHIBA_DT01ACA300_45ASUU5GS
        ata-Hitachi_HDS723015BLA642_MN1020F0026Y6D
        ata-TOSHIBA_DT01ACA200_Y412Y7VTS
)

declare -i i=0
while [ "${UUID_LIST[$i]}" != "" ]; do
NODE=`ls -l /dev/disk/by-id/${UUID_LIST[$i]} | awk '{ print $NF }' | sed -e 's/[/\.]//g'`
echo deadline > /sys/block/$NODE/queue/scheduler
i=i+1
done

Note I have not rebooted to confirm that the script is triggered, but I am sure it will.

Change your UUID_LIST entries with your own device UUIDs and substitute deadline with noop or another io scheduler.

You can confirm the script was triggered by the following:
Code:
cat /sys/block/sdx/queue/scheduler

where x in sdx is the mapping to a device in the UUID_LIST.


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 


All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu