Deleting lots of files
I’d do something like this: import os os.nice(19) dir = “/var/lib/php5/” bad_files = [os.join(dir, file) for file in os.listdir(dir) if is_bad(os.join(dir, file))] for … Read more
I’d do something like this: import os os.nice(19) dir = “/var/lib/php5/” bad_files = [os.join(dir, file) for file in os.listdir(dir) if is_bad(os.join(dir, file))] for … Read more
Blk_wrtn/s really depends on the type of workload. Linear write is much faster, random write can be really slow. So you will not … Read more
Does IO prioritise by the very nature of renicing a task?
As it turns out, pv is the perfect tool here (at least pv 1.6.0). With the -l (line mode) flag, -L limits become … Read more
In case of > eg. cat abc.txt > pqr.txt The contents of pqr.txt will be replaced with that of abc.txt In case of … Read more
Why can’t I do ls -a 1>&-?
How can I prevent disk I/O from taking over my CPU?
Use cgroups mkdir -p /sys/fs/cgroup/blkio/g1 echo “8:0 1048576” > /sys/fs/cgroup/blkio/g1/blkio.throttle.read_bps_device pgrep -f tar > /sys/fs/cgroup/blkio/g1/cgroup.procs https://andrestc.com/post/cgroups-io/
$ pidstat -d 5 Should print processes and their disk activity every 5 seconds. Pidstat can be found in the sysstat package. $ … Read more
ext4 jbd2 and I/O priority