[FEATURE REQUEST] I/O scheduler property for storage namespace.

Nikolay Pavlov qpadla at gmail.com
Tue Jul 31 02:42:33 PDT 2007


Hello all. 
Recently i've discovered very interesting thing with my usb flash.
I have a typical 1GB, USB 2.0 flash with VFAT partition on it. But i have 
found it quite slow both on windows and linux (Kubuntu 7.04). For example 
on Linux i can't even unmount it for about a minute or two after massive 
read/write operations. After some analysis i've found that the source of 
the problem is a CFQ - default Linux I/O scheduler (i'am using 
2.6.20-16-generic). Here is a results of my postmark tests:

root at galileo:/media/vfat# cat /sys/block/sdb/queue/scheduler
noop anticipatory deadline [cfq]
root at galileo:/media/vfat# postmark
PostMark v1.51 : 8/14/01
pm>set size 500 500000
pm>set subdirectories 1000
pm>run
Creating subdirectories...Done
Creating files...Done
Performing transactions..........Done
Deleting files...Done
Deleting subdirectories...Done
Time:
351 seconds total
160 seconds of transactions (3 per second)

Files:
757 created (2 per second)
Creation alone: 500 files (55 per second)
Mixed with transactions: 257 files (1 per second)
257 read (1 per second)
243 appended (1 per second)
757 deleted (2 per second)
Deletion alone: 514 files (2 per second)
Mixed with transactions: 243 files (1 per second)

Data:
69.80 megabytes read (203.62 kilobytes per second)
208.94 megabytes written (609.56 kilobytes per second)
pm>exit

CFQ = 351 seconds

root at galileo:/media/vfat# echo noop > /sys/block/sdb/queue/scheduler
root at galileo:/media/vfat# cat /sys/block/sdb/queue/scheduler
[noop] anticipatory deadline cfq
root at galileo:/media/vfat# postmark
PostMark v1.51 : 8/14/01
pm>set size 500 500000
pm>set subdirectories 1000
pm>run
Creating subdirectories...Done
Creating files...Done
Performing transactions..........Done
Deleting files...Done
Deleting subdirectories...Done
Time:
147 seconds total
1 seconds of transactions (500 per second)

Files:
757 created (5 per second)
Creation alone: 500 files (3 per second)
Mixed with transactions: 257 files (257 per second)
257 read (257 per second)
243 appended (243 per second)
757 deleted (5 per second)
Deletion alone: 514 files (514 per second)
Mixed with transactions: 243 files (243 per second)

Data:
69.80 megabytes read (486.20 kilobytes per second)
208.94 megabytes written (1.42 megabytes per second)
pm>exit

NOOP = 147 seconds

root at galileo:/media/vfat# echo deadline > /sys/block/sdb/queue/scheduler
root at galileo:/media/vfat# cat /sys/block/sdb/queue/scheduler
noop anticipatory [deadline] cfq
root at galileo:/media/vfat# postmark
PostMark v1.51 : 8/14/01
pm>set size 500 500000
pm>set subdirectories 1000
pm>run
Creating subdirectories...Done
Creating files...Done
Performing transactions..........Done
Deleting files...Done
Deleting subdirectories...Done
Time:
279 seconds total
250 seconds of transactions (2 per second)

Files:
757 created (2 per second)
Creation alone: 500 files (17 per second)
Mixed with transactions: 257 files (1 per second)
257 read (1 per second)
243 appended (0 per second)
757 deleted (2 per second)
Deletion alone: 514 files (514 per second)
Mixed with transactions: 243 files (0 per second)

Data:
69.80 megabytes read (256.17 kilobytes per second)
208.94 megabytes written (766.86 kilobytes per second)
pm>exit

deadline = 279 seconds 

root at galileo:/media/vfat# echo anticipatory 
> /sys/block/sdb/queue/scheduler
root at galileo:/media/vfat# cat /sys/block/sdb/queue/scheduler
noop [anticipatory] deadline cfq
root at galileo:/media/vfat# postmark
PostMark v1.51 : 8/14/01
pm>set size 500 500000
pm>set subdirectories 1000
pm>run
Creating subdirectories...Done
Creating files...Done
Performing transactions..........Done
Deleting files...Done
Deleting subdirectories...Done
Time:
266 seconds total
131 seconds of transactions (3 per second)

Files:
757 created (2 per second)
Creation alone: 500 files (166 per second)
Mixed with transactions: 257 files (1 per second)
257 read (1 per second)
243 appended (1 per second)
757 deleted (2 per second)
Deletion alone: 514 files (3 per second)
Mixed with transactions: 243 files (1 per second)

Data:
69.80 megabytes read (268.69 kilobytes per second)
208.94 megabytes written (804.34 kilobytes per second)
pm>exit

anticipatory = 266 seconds

Total:
1) NOOP - 147 sec
2) Anticipatory - 266 sec
3) Deadline - 279 sec
4) CFQ - 351 sec

I think that results may vary on different hardware, but i am unable to 
find any infrastructure to dynamically select I/O scheduler for different 
sorts of storages on Kubuntu (Debian) and i'am not aware of any other 
distros. So i came into conclusion that HAL whould be the best choise for 
that. Is this possible to add I/O scheduler property somewhere into 
storage namespace at least for linux kernel? What do you think? 

-- 

* Best regards, Nikolay Pavlov *

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://lists.freedesktop.org/archives/hal/attachments/20070731/e90cbe9b/attachment.pgp 


More information about the hal mailing list