Click to See Complete Forum and Search --> : RamDisk Question
SevenFortyOne
10-17-2006, 08:00 AM
Greetings,
If one had a server that had 32GB of ram, would it make sense to create a RamDisk of say 20GB and then use that RamDisk as an NFS share?
I have a CAM application that currently stores all of it's active, working data on a centeral server. At the end of the day, the data is backed up to a more permanant location. If I were to replace the current disk-based share with a RamDisk based share would I see any increase in file read/write times?
Thanks,
741
ph34r
10-17-2006, 08:22 AM
Nope, it would probably decrease r/w times.... Of course, if power were to be lost for some reason ....
SevenFortyOne
10-17-2006, 04:55 PM
Why would the r/w times decrease? Looking at this from the perspective of someone who isn't a CS major (me) it seems like the RamDisk should be faster, or maybe at least the same speed when you throw NFS into the mix. I'd like to understand why the RamDisk would be slower....
glasdave
10-17-2006, 09:08 PM
I think you might just want them to decrease.....or happen quicker, right?
SevenFortyOne
10-18-2006, 08:04 AM
Yes - I guess I do wan tthem to happen faster.
I have a somewhat proprietary (and inefficient), Linux based CAM system that has about 15 users. The "jobs" (which are a collection of plain text ASCII files of varying sizes) are stored centrally on a NAS server. When the application accesses a job, it reads the data from this central server into the memory of the workstation that calls for the data. When the job needs to be saved, the data is then written back to the server. If even half of the users try to read or write at the same time, wait times rise dramatically.
So we were thinking that to maximize performance we could put the data on a RamDisk. The data would be periodically written to physical drives to help prevent loss in the case of a catastrophic power failure. The server room is already supported by a pair of stout UPS units that can handle power outage run times of over an hour - and we rarley loose power for longer than that.
We would also increase the network bandwith by using gigabit fiber links between the workstation, network switch, and RamDisk server. With a RamDisk, the network should then become the bottleneck.
Am I all wet or does this sound plausable?
SevenFortyOne
10-18-2006, 08:11 AM
I just reread my first two posts and noticed I was being stupid. Dislexia must have set in as I was interpreting Increase and Decrease backward. :o I just learned Left and Right last week so bear with me....
All that aside - Does the RamDisk idea make any sense? Does anyone have any opinion on whether or not it's worth it?
StarKnight83
10-18-2006, 12:33 PM
like theyve said it has its up and downs; if the server goes down then all the new data from the last write to the hdd is lost but yes the r/w times will decrease. Id make sure that this server was on one of the better ups at that place for that setup. so if power is lost then itll have time to dump the data to the hdd before it has to shutdown. Though for what its worth you could always get a solidstate hdd - only downside then is cost as most of these have battery powered backplanes though the new fram stuff is nice its cost vs density means it wont be used commercially for quite some time
cybertron
10-18-2006, 03:37 PM
Id make sure that this server was on one of the better ups at that place for that setup. so if power is lost then itll have time to dump the data to the hdd before it has to shutdown.
Although even then you don't know if someone's going to walk by, trip on the cable, and unplug it from the UPS (or just plain accidentally unplug the wrong thing when doing maintenance). Unlikely maybe, but it could happen, so if there's going to be any irreplaceable data there I wouldn't use a RAM disk. If, on the other hand it would just be redoing a little work if you lost power and it's going to help performance enough to save significant amounts of time, then go for it.
bwkaz
10-18-2006, 06:12 PM
You're using NFS to get at these files from the clients? I'd guess that NFS is the problem, not the filesystem / backing-store being used by the server.
Linux has disk buffers and a pagecache, which already store the most frequently accessed files' contents in RAM. If your kernel can access 32GB of RAM, then it'll already store approximately 32GB (minus what userspace is using) of data in that RAM as disk buffer and page cache. (And there are already protocols in place in the kernel (e.g. as part of ext3) to ensure that dirty data gets written back to the FS; if you used a ramdisk, you'd have to duplicate all this code or get an inconsistent FS.)
So anyway, I'd guess the problem is the network or the NFS overhead, not the fact that the data's coming off a disk on the server. Because it likely isn't coming off a disk. ;)
cybertron
10-19-2006, 10:09 AM
Ah, good point. I still tend to forget once in a while how awesome Linux's memory management is.:)