3

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?

JonathanLIVE
  • 197
  • 2
  • 5
  • 10
  • Why on earth are you using RAID 01 instead of RAID 10? [RAID 01 is never a good idea.](http://serverfault.com/questions/339128/what-are-the-different-widely-used-raid-levels-and-when-should-i-consider-them) – Skyhawk Mar 14 '12 at 05:08

2 Answers2

4

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.

sysadmin1138
  • 131,083
  • 18
  • 173
  • 296
2

Linux is going to use your unallocated RAM as a cache by default... but your scenario raises two questions immediately in my mind:

  • The network is likely going to be a bottleneck
  • What happens to your cache when the server reboots? unexpected? how are writes committed to disk?

You could certainly setup ramfs to be available over the network, but you really need to be sure to flush it to more permanent storage as well. If your data set is read only (or just occasional writes even), then this might work perfect. But for user data or general file shares - yikes!

I don't know what your specific environment looks like, but you might be much better off virtualizing that server if it has excess capacity. Another play/proving/test ground is generally quite welcome.

Goyuix
  • 3,164
  • 5
  • 28
  • 37