Can you Utilize Server RAM for NAS Cache

cachememorynetwork-attached-storageraidramdisk

I have a 4 CPU 16GB RAM system with an Areca 1230 RAID card and 6 HDs in a RAID 0+1 configuration with 1 hot spare.

System has 2 onboard 1Gpbs nics

I want to turn the system into a NAS.

It seems like 16GB RAM for a NAS is a waste though.

Is there any way to possibly turn a good portion of that extra RAM into cache, or maybe some kind of RAMDRIVEs for some extra fast swap space?

Host controller uses Ubuntu.

What method is most reliable and relatively simple to setup?

Will I see a noticeable improvement in performance if I had some kind of cache utilizing the system RAM for the NAS?

Best Answer

That kind of depends on what service is providing the NAS functionality. Samba? NFS? All of the above? At its very base, Linux will use all available unallocated memory to serve as the file cache. That amount of memory will be used by default through the normal cache mechanisms of linux. Especially if a 64-bit kernel is used.

16GB is quite a lot of RAM for that problem. And yet, it can be just right for what you need. It all depends on how much of your data is in active use at any given time. If your 'working set' of active/open files is over 12GB, then 16GB of RAM is perfect. Ideally you want to have all of the open files able to fit into server-cache in order to provide maximum performance. What level that's at depends on your environment so there isn't any set answers.

It's good to have all that data fit in RAM for several reasons, but one of which is for writes. It allows the server to do I/O reordering to minimize HD latency, something that the RAID card will also do.

Related Topic