[nSLUG] Load spikes, X bogs down. Why? Fix?

Dop Ganger nslug at fop.ns.ca
Thu Apr 7 13:19:30 ADT 2016


On Thu, 7 Apr 2016, Mike Spencer wrote:

> The problem is that, on a new setup, the system bogs down so badly
> under some conditions (appareently during HD access) that the X cursor
> takes seconds to respond and X window manipulations take even longer.

I've found that some of the settings in Linux are not great for slower 
storage hardware under heavy writes. Two things to do that may help are 
reduce read ahead from 128kB to 4kB:

for i in `find /sys | grep read_ahead_kb` ; do echo 4 > $i ; done

and reduce the max number of requests in flight from 128 to 4:

for i in `find /sys | grep nr_requests$` ;  do echo 4 > $i 2>/dev/null; 
done

You may also see some advantage in running IO heavy apps with the 
eatmydata utility; this essentially turns off all sync abilities so you 
sync manually, eg:

eatmydata make -j4 ; sync

Cheers... Dop.


More information about the nSLUG mailing list