2 Apr 2007 03:15
LFS "smooth" syncer workaround/performance tuning
Blair Sadewitz <blair.sadewitz <at> gmail.com>
2007-04-02 01:15:54 GMT
2007-04-02 01:15:54 GMT
I'd grown annoyed at how LFS would blast data to the disk according to vfs.sync.*delay settings. A while ago, I thought, "why not just disable the sync delay altogether?" Try setting: vfs.sync.delay = 0 vfs.sync.filedelay = 0 vfs.sync.metadelay = 0 vfs.sync dirdelay = 0 Then, find out how much bandwidth you have at the inside and outside of your disk. That is, run newfs_lfs -ANF on a partition close to cylinder 0, then do the same on a partition close to the last cylinder. Average the two, then calculate the LFS "page trip" with the following formula (thanks tls): t=(avg_bandwidth_in_bytes / PAGE_SIZE) / 4 I'd imagine that averaging is more or less moot if you don't plan on using > %50 of your disk's capacity, or if you are using a partition smaller than a majority of the disk. Set vfs.lfs.pagetrip=t, and notice how data is now written much more smoothly to the disk. You can fiddle with vfs.lfs.pagetrip according to the amount of latency you want. This works especially well with BUFQ_PRIOCSCAN or BUFQ_READPRIO. For further optimization, I'd recommend using BUFQ_PRIOCSCAN and tweaking the burst values using xtraeme's bufq sysctl patch: http://www.xtrarom.org/patches/bufq_sysctl.diff(Continue reading)
RSS Feed