Optimizing Linux with cheap flash drives
Optimizing Linux with cheap flash drives
Posted Feb 21, 2011 19:44 UTC (Mon) by nix (subscriber, #2304)In reply to: Optimizing Linux with cheap flash drives by Tara_Li
Parent article: Optimizing Linux with cheap flash drives
The best way to speed up reads on current systems is probably to use RAID: add lots of disks and reads speed up enormously, given a fast enough bus (at a cost in write speed). e.g. my four-way RAID-5 here combines four fairly slow low-power disks to given an aggregate read speed between 190Mb/s and 250Mb/s. That knocks the socks off any single disk: even high-speed ones at the fast outer edge of the disk are slower than this RAID array is at the slow inside.
It might also be worth trying cachefs, caching onto a USB key (and not caching the filesystem on which your media files are located), but I'm not sure that this will actually gain you anything. (Worth trying though.)
If you turn off swap and the system is already short of memory performance will hit a wall, because all of a sudden rarely used but dirtied pages of non-file-backed memory *have* to be held in RAM, rather than being swapped to disk once and forgotten about. (glibc creates several hundred Kb of these for every program that might use locales, which pretty much means anything that calls printf(), i.e. everything). So all of a sudden your available memory plunges and lots of frequently-used but read-only pages of program text get forced out of memory, leading to major thrashing as they get pulled back off disk all the time. (So you will probably find iostat and/or blktrace reporting major *reads* in this situation, but not major *writes*.)
Posted Feb 21, 2011 21:58 UTC (Mon)
by Tara_Li (guest, #26706)
[Link] (1 responses)
Posted Feb 22, 2011 0:24 UTC (Tue)
by nix (subscriber, #2304)
[Link]
-- unfortunately it needs specific support for each filesystem, and it doesn't look like this has been added for any non-networked filesystems. Curses.
(See Documentation/filesystems/caching/.)
Optimizing Linux with cheap flash drives
Optimizing Linux with cheap flash drives