Comment 404 for bug 620074

Revision history for this message
In , perlover (perlover-linux-kernel-bugs) wrote :

I made a some experiments
And i think that i found main reason of high iowait with cfq scheduler.

I made some tests:

I changed cfg <--> scheduler into my two servers with same hardware & OS (FC6, kernel 2.6.22.14-72.fc6). There same CPUs, motherboard, SAS & RAID controllers & HDDs. But i saw only in one server high iowait & cfq scheduler during 'dd' command.

I think that main reason is A LOT AMOUNT OF USED INODES OF PARTIOTION into HDD.

For example:

The 'OK' server where i counld not reproduce bug:
# df -i

/dev/sda1 524288 8543 515745 2% /
tmpfs 219756 1 219755 1% /dev/shm
/dev/sda6 787200 34068 753132 5% /usr
/dev/sda5 787200 25582 761618 4% /usr/local
/dev/sda7 524288 1993 522295 1% /var
/dev/sda8 30900224 1719787 29180437 6% /wwws
/dev/sda3 1048576 49655 998921 5% /wwws/accel-proxy

I wrote the test testfile.1gb file to /wwws partiotion . There no highest iowait with deadline & cfq schedulers.

The second server, 'BAD' server has a same hardware & soft but there df -i:

Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/sda1 524288 7444 516844 2% /
tmpfs 219756 1 219755 1% /dev/shm
/dev/sda7 787200 35307 751893 5% /usr
/dev/sda6 787200 27520 759680 4% /usr/local
/dev/sda8 524288 2334 521954 1% /var
/dev/sda3 30900224 5332794 25567430 18% /wwws
/dev/sda5 524288 4128 520160 1% /wwws/accel-proxy

I did 'dd' tests to /wwws/ partition too (i get used to write there big files) ... There if i use cfq scheduler and (important) have some worked processes (apaches, mysql - not idle server) that during 'dd' command i have highest iowait (90-99%) and very low speed of writing (9-10 Mb/sec). If i change there to deadline scheduler and write to /wwws/ partition too i have 60-80 Mb/sec speed and not high iowait. But if i wrote testfile.1gb to other partiotion (for example to /var) i have not iowait even with cfq scheduler. Thus cfq scheeduler + a lot used inodes is bad as i think. The deadline scehduler + a lot used inodes is not bad.

So i think that high amount of used inodes in partiotion and cfq scheduler together have some wrong something.

May be if i could have a much used inodes into my other servers (FC7 where i could not reproduce iowait problem) i could reproduce this high iowait bug too.

Please to try make a many many small files in some partiotion (5-6 millions for example) and to test 'dd' & cfq scheduler.