<p>So can you consider a presentation of your findinds and perhaps some testing?<br>
:-)</p>
<div class="gmail_quote">On Oct 13, 2011 10:52 AM, "Ron Frazier" <<a href="mailto:atllinuxenthinfo@c3energy.com">atllinuxenthinfo@c3energy.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<u></u>
<div text="#000000" bgcolor="#ffffff">
Hi guys,<br>
<br>
This thread has prompted me to do a bit of research to try to see if I
can find a consensus on the swap size issue. At the moment, it seems
like ask 100 people and get 100 different opinions. I haven't
uncovered enough data to tabulate and summarize it at this point. I'm
pretty sure my linux machines have plenty of swap for applications. I
have 8 GB of swap on two machines which have 8 GB of RAM. If I look at
the system monitor program in Gnome, it looks like the swap is rarely
ever touched. By the way, having 8 GB of RAM in a laptop is a nice,
new, liberating experience for me. It's really nice to be able to open
several dozen browser tabs and a dozen or more applications without the
machine even breathing too hard. This is my first laptop capable of
that. I also have 8 GB of swap on a machine with 4 GB of RAM, so it
should be sitting pretty, so to speak. I haven't found anything that
says extra swap is harmful. What I don't know, is whether the two 8 GB
machines would be able to hibernate (suspend to disk) properly, if the
swap is equal to the RAM. I may have to increase the swap on those to
10 GB - 12 GB. This is not an issue in Windows since it uses a
separate hibernate file.<br>
<br>
In my research, I found this article (
<a href="http://lukasz.szmit.eu/2009/11/compcache-swap-on-linux-desktop.html" target="_blank">http://lukasz.szmit.eu/2009/11/compcache-swap-on-linux-desktop.html</a> ).
The article is a bit old, but this talks about a fascinating project
called Compcache. Here's a quote from the page:<br>
<br>
---> quote on <---<br>
<br>
Compcache is an open source project implementing an innovative approach
to swap. This has been done before, but not for swap. Users of DOS and
early Windows versions will remember DoubleSpace/DriveSpace, which was
used to virtually expand available disk space, by storing files in a
compressed form. Compcache does exactly that, but for swap, by creating
a new block device in the system which interfaces with the special
compressed memory region in RAM. On the plus side, Compcache can also
be configured to use an alternative swap device when the RAM swap area
is full.<br>
<br>
---> quote off <---<br>
<br>
I think that is a really cool idea for low resource machines. While I
don't know if I'll ever use it, since my modern machines have a decent
amount of RAM, it could really benefit older, smaller machines. For
example, I have an old IBM Thinkpad with 160 MB (yes MB) of RAM. I've
pretty much retired the machine. It does run a GUI based version of
Linux, just barely, but is painfully slow. The old 300 MHz processor
doesn't help much either. I think I have an old version of Lubuntu on
it. Anyway, this type of technology could give the machine more
breathing room by compressing the memory, so it would be like having
256 MB of RAM. I also have an old Toshiba laptop which is topped out
at 1 GB or RAM. Both Ubuntu 10.04 and Windows XP run pretty well.
However, I could compress 512 MB of RAM and then effectively have 512
MB or normal RAM and 1 GB of swap.<br>
<br>
Here's the link for the Compcache project:
<a href="http://code.google.com/p/compcache/" target="_blank">http://code.google.com/p/compcache/</a><br>
<br>
Here's an interesting quote from their site: "With compcache at
hypervisor level, we can compress <i>any</i> part of <i>guest</i>
memory transparently."<br>
<br>
Now, while I'll admit I don't understand all the implications of that
statement, it looks like you could essentially compress all the RAM if
running a lightweight hypervisor and running your OS as a guest.<br>
<br>
The project website also points out that embedded systems could benefit
from the technology, where you have to justify every chip you put into
a device.<br>
<br>
Finally, here is an interesting quote from the original article:<br>
<br>
---> quote on <---<br>
<br>
On my desktop, a Dell Precision S390 with 2GB DDR2 RAM and a Maxtor
Diamond Max 9 80GB drive, I am getting the following hdparm results
(average of three runs) for my disk swap, and my compcache swap:<br>
<ul>
<li>Swap on disk: 58MB/s</li>
<li>Compcache swap: 557MB/s</li>
</ul>
An order of magnitude better bandwidth at no expense? I like that.<br>
<br>
---> quote off <---<br>
<br>
I like that idea too. I'd like to know what you guys think of this
concept.<br>
<br>
Sincerely,<br>
<br>
Ron<br>
<br>
On 10/13/2011 8:58 AM, Rich Faulkner wrote:
<blockquote type="cite">
For me depends upon the system as to swap size, but if I plan on using
hibernation features I have swap just over the size of RAM as in 1-1/2
times as the general (old) rule that I've followed...generally a couple
of gigs for a desktop and I leave it at that. Being as I'm only
building desktops and laptops lately I'm not speaking to servers. An
interesting experiment is to do test installs to various system configs
and see what a given distro will do for a default installation. I
consider this a benchmark from the developers on an "ideal"
configuration given the hardware provided. RinL<br>
<br>
<br>
On Thu, 2011-10-13 at 08:45 -0400, Scott Castaline wrote:
<blockquote type="CITE">
<pre>On 10/12/2011 09:40 PM, Tavarvess Ware wrote:
>
> Scott I read the ram x 2= swap in my Linux classes as well and have
> generally followed that, but with memory soaring as it has lately i am
> starting to rethink that. A system 48gigs of memory would be 96 in
> swap..... I wonder if te old format has changed and I haven't heard yet.
>
I only go RAM x 2 = swap for the 1st 2 GB of RAM so 2GB RAM = 4GB swap.
From there on it's RAM x 1 = swap so 4GB RAM = 6GB swap. So your 48 GB
of RAM = 50GB swap, and yup that's one hell of a lot of swap space.
>
> On Oct 12, 2011 9:32 PM, "Scott Castaline" <<a href="mailto:skotchman@gmail.com" target="_blank">skotchman@gmail.com</a>
> <<a href="mailto:skotchman@gmail.com" target="_blank">mailto:skotchman@gmail.com</a>>> wrote:
>
> On 10/12/2011 04:14 PM, planas wrote:
> > On Wed, 2011-10-12 at 15:13 -0400, Geoffrey Myers wrote:
> >> 'Just so you all know, when determining how much space to assign to
> >> swap: Swap isn't just used for paging or virtual memory
> management; swap
> >> is also used by power management for suspend-to-disk
> (hibernation). '
> >>
> >> I seriously don't know, so I'm asking.
> >>
> >
> > I have seen that a good swap size is ~1.5x the RAM.
> > --
> > Jay Lozier
> > <a href="mailto:jslozier@gmail.com" target="_blank">jslozier@gmail.com</a> <<a href="mailto:jslozier@gmail.com" target="_blank">mailto:jslozier@gmail.com</a>>
> >
> >
> >
> > _______________________________________________
> > Ale mailing list
> > <a href="mailto:Ale@ale.org" target="_blank">Ale@ale.org</a> <<a href="mailto:Ale@ale.org" target="_blank">mailto:Ale@ale.org</a>>
> > <a href="http://mail.ale.org/mailman/listinfo/ale" target="_blank">http://mail.ale.org/mailman/listinfo/ale</a>
> > See JOBS, ANNOUNCE and SCHOOLS lists at
> > <a href="http://mail.ale.org/mailman/listinfo" target="_blank">http://mail.ale.org/mailman/listinfo</a>
> I remember from somewhere that upto 2GB use 2.0x RAM above 2GB of
> RAM go
> with 1:1 ratio so 4Gb RAM = 6GB swap. I don't remember why 2x on the
> first 2GB and this goes back to when 4GB was a lot on pre-configured
> retail boxes. So like Geoffrey I can't see having 18GB of swap for a
> 16GB machine.
>
</pre>
</blockquote>
</blockquote>
<br>
<pre cols="72">--
(PS - If you email me and don't get a quick response, you might want to
call on the phone. I get about 300 emails per day from alternate energy
mailing lists and such. I don't always see new messages very quickly.)
Ron Frazier
<a href="tel:770-205-9422" value="+17702059422" target="_blank">770-205-9422</a> (O) Leave a message.
linuxdude AT <a href="http://c3energy.com" target="_blank">c3energy.com</a>
</pre>
</div>
<br>_______________________________________________<br>
Ale mailing list<br>
<a href="mailto:Ale@ale.org">Ale@ale.org</a><br>
<a href="http://mail.ale.org/mailman/listinfo/ale" target="_blank">http://mail.ale.org/mailman/listinfo/ale</a><br>
See JOBS, ANNOUNCE and SCHOOLS lists at<br>
<a href="http://mail.ale.org/mailman/listinfo" target="_blank">http://mail.ale.org/mailman/listinfo</a><br>
<br></blockquote></div>