Ramdisk performance problem
Hi guys!
I have a question regarding ramdisks. So, my problem is this: I have multiple scripts that write multiple pictures (PNGs) (about 3 PNGs per second x 4 scripts = 12 PNGs per second). These PNGs are then converted to JPGs (in realtime). The disks ,even though they are SAS 15000 RPM, RAID 5, were kinda` struggling to keep up with the high load but performance was still pretty good. I decided a few days ago to create a ramdisk and configure those scripts to write the PNGs/Converted JPGs there (thinking it would be much faster)... Well, it ain`t ! Performance was MUCH better when writing to the physical disks. I tried various file systems for the ramdisk (ext2, ext3, ext4)... it doesn`t seem to matter, performance is still pretty bad. So my question is, am I missing something? Aren`t ramdisks supposed to be faster than physical disks? Btw, I'm using Fedora 13 x64. |
Ram disks are way faster than a real hard drive. I see a few issues that I need to understand. One is where are you getting the files from? A hard drive? Also what about this real time conversion. Is it using cpu bandwidth? Could your tasks be overloading the memory buss or taxing the cpu?
|
I haven't used ramdisk in years, but they are still conceptually a physical (spinning) disk. And by the sounds of it you have funnelled all the I/O from several disks to one. Bad karma in any environment. I'd be betting the I/O scheduler is still sorting all the I/O by sector and trying to optimise the head movement ... :doh:
Try using a tmpfs instead and see if that helps. |
Nope!!
RAMdisks are created in "memory," and that means ... virtual memory ... and that means, soon enough ... swapping (to disk!). Not good. Switch back to the old way of doing things and let it be a lesson learned. |
CPU and RAM usage are below 20%, so it`s not a problem. Like I said, when writing to the HDD, performance is very good, but on a ramdisk is much slower. It`s a program that is generating the PNGs and some scripts convert them to JPEGs.
|
Quote:
|
Are all the files in the ramdisk or are you moving them in and out via a hard drive?
|
All times are GMT -5. The time now is 05:10 AM. |