Bugzilla – Bug 9087
[PATCH] Disk I/O drain by stating the same files over and over again
Last modified: 2012-03-20 08:11:50 UTC
This patch reduces the number of stats by caching the results when you are looking at lots of files in the same dir. stat("/stor/content/My Music/LOCAL/__ARTIST__/", {st_mode=S_IFDIR|0777, st_size=4096, ...}) = 0 stat("/stor/content/My Music/LOCAL/__ARTIST__/cover.png", 0x915d140) = -1 ENOENT (No such file or directory) stat("/stor/content/My Music/LOCAL/__ARTIST__/cover.jpg", 0x915d140) = -1 ENOENT (No such file or directory) stat("/stor/content/My Music/LOCAL/__ARTIST__/cover.jpeg", 0x915d140) = -1 ENOENT (No such file or directory) stat("/stor/content/My Music/LOCAL/__ARTIST__/cover.gif", 0x915d140) = -1 ENOENT (No such file or directory) stat("/stor/content/My Music/LOCAL/__ARTIST__/Cover.png", 0x915d140) = -1 ENOENT (No such file or directory) stat("/stor/content/My Music/LOCAL/__ARTIST__/Cover.jpg", 0x915d140) = -1 ENOENT (No such file or directory) stat("/stor/content/My Music/LOCAL/__ARTIST__/Cover.jpeg", 0x915d140) = -1 ENOENT (No such file or directory) stat("/stor/content/My Music/LOCAL/__ARTIST__/Cover.gif", 0x915d140) = -1 ENOENT (No such file or directory) stat("/stor/content/My Music/LOCAL/__ARTIST__/thumb.png", 0x915d140) = -1 ENOENT (No such file or directory) stat("/stor/content/My Music/LOCAL/__ARTIST__/thumb.jpg", 0x915d140) = -1 ENOENT (No such file or directory) stat("/stor/content/My Music/LOCAL/__ARTIST__/thumb.jpeg", 0x915d140) = -1 ENOENT (No such file or directory) stat("/stor/content/My Music/LOCAL/__ARTIST__/thumb.gif", 0x915d140) = -1 ENOENT (No such file or directory) stat("/stor/content/My Music/LOCAL/__ARTIST__/Thumb.png", 0x915d140) = -1 ENOENT (No such file or directory) stat("/stor/content/My Music/LOCAL/__ARTIST__/Thumb.jpg", 0x915d140) = -1 ENOENT (No such file or directory) stat("/stor/content/My Music/LOCAL/__ARTIST__/Thumb.jpeg", 0x915d140) = -1 ENOENT (No such file or directory) stat("/stor/content/My Music/LOCAL/__ARTIST__/Thumb.gif", 0x915d140) = -1 ENOENT (No such file or directory) stat("/stor/content/My Music/LOCAL/__ARTIST__/album.png", 0x915d140) = -1 ENOENT (No such file or directory) stat("/stor/content/My Music/LOCAL/__ARTIST__/album.jpg", 0x915d140) = -1 ENOENT (No such file or directory) stat("/stor/content/My Music/LOCAL/__ARTIST__/album.jpeg", 0x915d140) = -1 ENOENT (No such file or directory) stat("/stor/content/My Music/LOCAL/__ARTIST__/album.gif", 0x915d140) = -1 ENOENT (No such file or directory) stat("/stor/content/My Music/LOCAL/__ARTIST__/Album.png", 0x915d140) = -1 ENOENT (No such file or directory) stat("/stor/content/My Music/LOCAL/__ARTIST__/Album.jpg", 0x915d140) = -1 ENOENT (No such file or directory) stat("/stor/content/My Music/LOCAL/__ARTIST__/Album.jpeg", 0x915d140) = -1 ENOENT (No such file or directory) stat("/stor/content/My Music/LOCAL/__ARTIST__/Album.gif", 0x915d140) = -1 ENOENT (No such file or directory) stat("/stor/content/My Music/LOCAL/__ARTIST__/folder.png", 0x915d140) = -1 ENOENT (No such file or directory) stat("/stor/content/My Music/LOCAL/__ARTIST__/folder.jpg", 0x915d140) = -1 ENOENT (No such file or directory) stat("/stor/content/My Music/LOCAL/__ARTIST__/folder.jpeg", 0x915d140) = -1 ENOENT (No such file or directory) stat("/stor/content/My Music/LOCAL/__ARTIST__/folder.gif", 0x915d140) = -1 ENOENT (No such file or directory) stat("/stor/content/My Music/LOCAL/__ARTIST__/Folder.png", 0x915d140) = -1 ENOENT (No such file or directory) stat("/stor/content/My Music/LOCAL/__ARTIST__/Folder.jpg", 0x915d140) = -1 ENOENT (No such file or directory) stat("/stor/content/My Music/LOCAL/__ARTIST__/Folder.jpeg", 0x915d140) = -1 ENOENT (No such file or directory) stat("/stor/content/My Music/LOCAL/__ARTIST__/Folder.gif", 0x915d140) = -1 ENOENT (No such file or directory)
Ahm... did you forget the patch? :-)
Created attachment 3771 [details] cache stats That would help :)
A quick test (one pass only) didn't reveal any real advantage on "decent" systems, and little on a NAS: XP, 11k tracks on USB2 disk: 2'57 (without) vs. 2'50 (with patch) MacBook, 3.5k on internal disk: 30'' vs. 31'' ReadyNAS, 11k on one disk only: 14'25 vs. 13'33 Please note that the full scan on the ReadyNAS was taking 2h17. Thus that minute isn't really much of an improvement... The difference on the two more powerful machines imho is negligible.
On Linux with NFS its the difference from being able to type on the terminal and not.
Moving 7.4 bugs to 8.0.
i don't understand... if its better, why not simply use it, even if it is a small difference? and he says on linux its a big difference.