<div dir="ltr">On Sat, Aug 3, 2013 at 5:59 AM, Mauro Sanna <span dir="ltr"><<a href="mailto:mrsanna1@gmail.com" target="_blank">mrsanna1@gmail.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="im">On 3 August 2013 05:13, Christofer C. Bell <span dir="ltr"><<a href="mailto:christofer.c.bell@gmail.com" target="_blank">christofer.c.bell@gmail.com</a>></span> wrote:<br>
</div><div class="gmail_extra"><div class="gmail_quote"><div class="im">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>On Fri, Aug 2, 2013 at 1:24 PM, Liam Proven <span dir="ltr"><<a href="mailto:lproven@gmail.com" target="_blank">lproven@gmail.com</a>></span> wrote:<br>
</div><div class="gmail_extra"><div class="gmail_quote"><div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>On 2 August 2013 19:14, Mauro Sanna <<a href="mailto:mrsanna1@gmail.com" target="_blank">mrsanna1@gmail.com</a>> wrote:<br>
> You don't use swap on servers too?<br>
<br>
</div>It's a fileserver. Just a fileserver. With 3GB of RAM, it doesn't /need/ swap.<br>
<br>
Just for an easy life, I have the full Unity desktop on there, too. It<br>
idles at under 500MB of usage. In other words, full loaded, it uses<br>
about one-sixth of its memory: the rest is disk cache.<br>
<br>
Who needs swap any more?<br clear="all"></blockquote><div><br></div></div><div>While it may work for you, a blanket recommendation to have no swap should be avoided. Please look into how Linux handles memory allocations (specifically look into vm.overcommit_memory and vm.overcommit_ratio). For modern Linux systems with large amounts of RAM, a good rule of thumb is to have 2GB of swap.</div>
</div></div></div></blockquote><div><br></div></div><div>2G of swap?</div><div>If I have a large amount of ram why do I need so much swap?</div></div></div></div></blockquote><div><br></div><div>I'm not sure under what circumstances one would consider 2GB to be a lot of swap. I would encourage you to look into how Linux manages memory. Specifically vm.overcommit_memory and vm.overcommit_ratio. The purpose of having 2GB of swap is to give your system some buffer virtual memory so real processes that end up requesting more physical RAM than you have available, yet will not use it, will still be able to start.<br>
<br>For example, let's say you have 8GB of RAM in your system. Currently, 6GB of RAM are in use (leaving 2GB free). You want to start a process that will use no more than 1GB of physical RAM when running, but will request 3GB of memory for itself, exceeding the availability of physical RAM by 1GB. Without swap, this program will not start, and the kernel will give you an insufficient memory error (ENOMEM). With a 2GB buffer provided by swap (so the system's total virtual memory size is 10GB), this program will be able to request 3GB of RAM (as 4GB are available), be started, and happily use the 1GB of RAM it really needs.<br>
</div><div><br>-- <br></div></div><div dir="ltr"><div>Chris<br><br></div>"If you wish to make an apple pie from scratch, you must first invent the Universe." -- Carl Sagan<br><div><br><br></div></div>
</div></div>