Jump to content

Memory Size and Configuration


khelm

Recommended Posts

I've been playing with UnRaid on a test machine and really like it.  I'm ready to put UnRaid to use on a server for storing backups.  I  a question before I decided on the hardware.

 

 

Are there any performance benefits for the UnRaid server when using more the 2GB of memory, if no additional application are used with the UnRaid server?  Is there an amount of memory that once you go past it that there are no performance benefits or is more memory always better?  Can the extra memory get used to cache files when writes are made?  Is there a way to set the amount of ram that gets used for cache for file writes?

 

I've noticed on the test machine that when writing a 1Gb file, the speed drops to a low of about 30GB/sec.  When writing a 2Gb file, the speed drops to a low of about 24GB/sec.  From this I'm guessing that some memory is used to cache file writes.

 

Thank,

Kerry

Link to comment

The short answer is no, more memory won't help a stock unRAID server.  Yes the RAM can be used to cache files, but most of us write large media files that are too big to be cached anyway (especially when you are comparing just 1 GB against 2 GB).  If you care about write speeds, consider using a cache disk - see this thread for more details:

 

To Cache drive or not to Cache Drive

 

On an unRAID server with add-ons, more RAM can be very beneficial.  Certain add-ons, such as torrents and virtual machines, will run much quicker with more RAM.

 

My general advice is to use whatever RAM you have laying around.  If you are going to buy new RAM, I recommend that you buy a single 2 GB stick - it doesn't have to be fast, DDR2 800 is plenty.  However, if you ever decide to start using add-ons or some application that needs more RAM, you can upgrade to 4 GB easily by buying a second 2 GB stick.  If you are using 2 x 1GB, you may have to replace one or both sticks (depending on the number of DIMM slots your motherboard has).  Don't worry about dual channel vs single channel, since the difference is fairly negligible in the unRAID environment.  I also don't worry about ECC vs. non-ECC - some people swear by ECC as being more reliable, but I've always used non-ECC budget RAM and I haven't had any problems, even though I run my server 24/7.

 

While 1 GB is plenty of RAM for an unRAID server, a single 2 GB stick is only about $10 more, so you may as well get the more 'future-proof' option.

Link to comment

The short answer is no, more memory won't help a stock unRAID server.  Yes the RAM can be used to cache files, but most of us write large media files that are too big to be cached anyway (especially when you are comparing just 1 GB against 2 GB).  If you care about write speeds, consider using a cache disk - see this thread for more details:

 

To Cache drive or not to Cache Drive

 

On an unRAID server with add-ons, more RAM can be very beneficial.  Certain add-ons, such as torrents and virtual machines, will run much quicker with more RAM.

 

My general advice is to use whatever RAM you have laying around.  If you are going to buy new RAM, I recommend that you buy a single 2 GB stick - it doesn't have to be fast, DDR2 800 is plenty.  However, if you ever decide to start using add-ons or some application that needs more RAM, you can upgrade to 4 GB easily by buying a second 2 GB stick.  If you are using 2 x 1GB, you may have to replace one or both sticks (depending on the number of DIMM slots your motherboard has).  Don't worry about dual channel vs single channel, since the difference is fairly negligible in the unRAID environment.  I also don't worry about ECC vs. non-ECC - some people swear by ECC as being more reliable, but I've always used non-ECC budget RAM and I haven't had any problems, even though I run my server 24/7.

 

While 1 GB is plenty of RAM for an unRAID server, a single 2 GB stick is only about $10 more, so you may as well get the more 'future-proof' option.

Recently I've assisted two different unRAID users in running a file-system check on their disks.  Both had only 512 Meg, neither was able to complete a file-system check on a 2TB disk until they added more memory. Both upgraded to 2GB, but 1GB "might" not be enough for a server with 2TB disks.  We do not know how much it actually takes.  512 Meg is NOT enough to run a full file-system rebuild-tree using reiserfsck on a 2TB disk.  1GB might be, but we do not yet have enough feedback from users to be certain.

 

As already mentioned more than 2TB for an unRAID used as a file server will not improve performance.

 

Joe L.

Link to comment

There was mention of using this as a backup server. How will you do the backups?

 

FWIW, any memory over 4GB is not worth it unless you are doing very busy torrent serving.

2GB should be fine.

 

I had a very busy rtorrent environment at one time.

It benefited greatly from 7200 rpm parity disk and 8GB.

As a file server, I took out 4GB and the performance was the same.

 

Where the extra memory helps is with a large number of small files.

These can be cached and directory lookups are cached for as long as possible.

 

This is why I asked about the backup methods.

I use rsync, which synchronizes tons of small files, the extra memory does help with caching directories and file chunks.

Link to comment

There was mention of using this as a backup server. How will you do the backups?

 

FWIW, any memory over 4GB is not worth it unless you are doing very busy torrent serving.

2GB should be fine.

 

I had a very busy rtorrent environment at one time.

It benefited greatly from 7200 rpm parity disk and 8GB.

As a file server, I took out 4GB and the performance was the same.

 

Where the extra memory helps is with a large number of small files.

These can be cached and directory lookups are cached for as long as possible.

 

This is why I asked about the backup methods.

I use rsync, which synchronizes tons of small files, the extra memory does help with caching directories and file chunks.

 

 

 

I will primarly be using Retrospect from the server that I am backing up to backup to the UnRaid Server.  This backup software compress the backups into files with a size of about 640MB.  I will probably also just replicate some of the files on the server as well to the UnRaid Server.

 

 

Link to comment
  • 9 months later...

I'm noticing via 'top', with only a few add ons running (no torrent/newsgroup servers--just webGui, unMenu, and a few other packages from the Pkg Manager) that I have only 25-50 MB of memory left.  No swap space is utilized.  Maybe I don't need more than 2GB of RAM if I can configure it to use swap space? Do I need to create a swap partition, or will it just use my cache/data drives for swap space?

 

I wouldn't mind adding another 2GB of RAM, just seeing what I can do as a temporary patch.

 

Thanks

Link to comment

I'm noticing via 'top', with only a few add ons running (no torrent/newsgroup servers--just webGui, unMenu, and a few other packages from the Pkg Manager) that I have only 25-50 MB of memory left.  No swap space is utilized.  Maybe I don't need more than 2GB of RAM if I can configure it to use swap space? Do I need to create a swap partition, or will it just use my cache/data drives for swap space?

 

I wouldn't mind adding another 2GB of RAM, just seeing what I can do as a temporary patch.

 

Thanks

 

Linux will buffer as much as it possibly can into RAM.  The only time you need to worry about it is if you start to see OOM (Out of Memory) errors in your syslog.  Then you are truly running out of RAM.

Link to comment

4GB installed

 

Top

Mem:   3888080k total,  2977264k used,   910816k free,   121728k buffers

 

root@Tower:~# free -m

            total       used       free     shared    buffers     cached

Mem:          3796       2907        889          0        118       2050

-/+ buffers/cache:        737       3059

Swap:            0          0          0

 

Have I noticed any differences between 2 or 4? Not that I can really tell. ;) Extra 2GB was cheap when I bought it so I just installed it.

 

Link to comment

I'm noticing via 'top', with only a few add ons running (no torrent/newsgroup servers--just webGui, unMenu, and a few other packages from the Pkg Manager) that I have only 25-50 MB of memory left.  No swap space is utilized.  Maybe I don't need more than 2GB of RAM if I can configure it to use swap space? Do I need to create a swap partition, or will it just use my cache/data drives for swap space?

 

I wouldn't mind adding another 2GB of RAM, just seeing what I can do as a temporary patch.

 

Thanks

Linux will ALWAYS use all of the available ram for disk buffer cache.  It is not "really" running out of memory.  I've been running my server with 512 Meg of ram for over 5 years.  You do not need swap space unless you are filling RAM with programs using a lot of memory.

check out the output of the "free" command.  Look at line 2, where the available free space is shown not including the buffer space.

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...