<div dir="ltr">Hi, <div><br></div><div style>I'm replying yet again to this email because, I must say, our community seems 'still confused' about zRAM and things are getting lost in the translation - I know how hard it is, sometimes to explain in purely writing but let's hope we can all agree about what is zRAM? and how it works?</div>
<div style><br></div><div style><a href="http://en.wikipedia.org/wiki/ZRam">http://en.wikipedia.org/wiki/ZRam</a><br></div><div style><br></div><div style><p style="margin:0.4em 0px 0.5em;line-height:22.5px;color:rgb(0,0,0);font-family:sans-serif;font-size:15px">
<b><u>What is zRAM?</u></b></p><p style="margin:0.4em 0px 0.5em;line-height:22.5px;color:rgb(0,0,0);font-family:sans-serif;font-size:15px"><b>zRam</b> is a module of the <a href="http://en.wikipedia.org/wiki/Linux_kernel" title="Linux kernel" style="text-decoration:none;color:rgb(11,0,128);background-image:none">Linux kernel</a>, previously called "compcache". </p>
<p style="margin:0.4em 0px 0.5em;line-height:22.5px;color:rgb(0,0,0);font-family:sans-serif;font-size:15px"><br></p><p style="margin:0.4em 0px 0.5em;line-height:22.5px;color:rgb(0,0,0);font-family:sans-serif;font-size:15px">
<b><u>What does zRAM do?</u></b></p><p style="margin:0.4em 0px 0.5em;line-height:22.5px;color:rgb(0,0,0);font-family:sans-serif;font-size:15px">zRam increases performance by avoiding <a href="http://en.wikipedia.org/wiki/Paging" title="Paging" style="text-decoration:none;color:rgb(11,0,128);background-image:none">paging</a> on disk and instead uses a compressed <a href="http://en.wikipedia.org/wiki/Block_device" title="Block device" class="" style="text-decoration:none;color:rgb(11,0,128);background-image:none">block device</a>in <a href="http://en.wikipedia.org/wiki/Random-access_memory" title="Random-access memory" style="text-decoration:none;color:rgb(11,0,128);background-image:none">RAM</a> in which paging takes place until it is necessary to use the swap space on the <a href="http://en.wikipedia.org/wiki/Hard_disk_drive" title="Hard disk drive" style="text-decoration:none;color:rgb(11,0,128);background-image:none">hard disk drive</a>. </p>
<p style="margin:0.4em 0px 0.5em;line-height:22.5px;color:rgb(0,0,0);font-family:sans-serif;font-size:15px"><br></p><p style="margin:0.4em 0px 0.5em;line-height:22.5px;color:rgb(0,0,0);font-family:sans-serif;font-size:15px">
<b><u>How does it work?</u></b></p><p style="margin:0.4em 0px 0.5em;line-height:22.5px;color:rgb(0,0,0);font-family:sans-serif;font-size:15px">Since using RAM is faster than using disks, zRam allows Linux to make more use of RAM when swapping/paging is required, especially on older computers with less RAM installed.<sup id="cite_ref-WebUpd802Oct11_1-0" class="" style="line-height:1em"><a href="http://en.wikipedia.org/wiki/ZRam#cite_note-WebUpd802Oct11-1" style="text-decoration:none;color:rgb(11,0,128);background-image:none;white-space:nowrap">[1]</a></sup><sup id="cite_ref-comp_2-0" class="" style="line-height:1em"><a href="http://en.wikipedia.org/wiki/ZRam#cite_note-comp-2" style="text-decoration:none;color:rgb(11,0,128);background-image:none;white-space:nowrap">[2]</a></sup><br>
</p><p style="margin:0.4em 0px 0.5em;line-height:22.5px;color:rgb(0,0,0);font-family:sans-serif;font-size:15px">Even though the cost of RAM hardware is relatively low this feature still offers advantages for <a href="http://en.wikipedia.org/wiki/Netbook" title="Netbook" style="text-decoration:none;color:rgb(11,0,128);background-image:none">netbooks</a> and other lower-powered laptops, <a href="http://en.wikipedia.org/wiki/Virtualization" title="Virtualization" style="text-decoration:none;color:rgb(11,0,128);background-image:none">virtualization</a> and in the case of<a href="http://en.wikipedia.org/wiki/Embedded_device" title="Embedded device" class="" style="text-decoration:none;color:rgb(11,0,128);background-image:none">embedded devices</a>, especially those that use <a href="http://en.wikipedia.org/wiki/Flash_memory" title="Flash memory" style="text-decoration:none;color:rgb(11,0,128);background-image:none">flash memories</a> that have a limited lifespan, dependent on write-use and thus wear out quickly when used as a swap device.<sup id="cite_ref-comp_2-1" class="" style="line-height:1em"><a href="http://en.wikipedia.org/wiki/ZRam#cite_note-comp-2" style="text-decoration:none;color:rgb(11,0,128);background-image:none;white-space:nowrap">[2]</a></sup></p>
<p style="margin:0.4em 0px 0.5em;line-height:22.5px;color:rgb(0,0,0);font-family:sans-serif;font-size:15px"><br></p><p style="margin:0.4em 0px 0.5em;line-height:22.5px;color:rgb(0,0,0);font-family:sans-serif;font-size:15px">
Also, please see below:</p></div><div class="gmail_extra"><div class="gmail_quote">On Sun, Jun 9, 2013 at 12:44 PM, Leszek Lesner <span dir="ltr"><<a href="mailto:leszek.lesner@web.de" target="_blank">leszek.lesner@web.de</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Am Sonntag, 9. Juni 2013, 12:14:27 schrieb Ali Linx:<br>
<div class="im">> On Sun, Jun 9, 2013 at 11:08 AM, <<a href="mailto:leszek.lesner@web.de">leszek.lesner@web.de</a>> wrote:<br>
> > Ok a simple suggestion from me. Why don't we decidebto enable zram (with<br>
> > zram-config) for the alpha version and see how itnworks out for the<br>
> > testers. We can disable this afterwards if the test fails.<br>
> > But I highly doubt that you will see any downside in using zram.<br>
> > And btw. as I don't think it os clear to everyone zram enabled means a<br>
> > virtual swap partition gets mounted into the system. The location of this<br>
> > swap partition is however instead of the traditional one a virtual<br>
> > compressed ram drive. I hope that this is understandable.<br>
> > Please +1 if you also want zram enabled by default in the alpha images.<br>
><br>
> Hello Leszek,<br>
><br>
> Thank you for your suggestion, I like the idea but ... Before we take a<br>
> vote, may I ask something?<br>
> If someone with 512MB RAM and has 1GB SWAP Partition, how zRAM will do any<br>
> help in this case?<br>
<br>
</div>It will raise the SWAP size. This in particular will not help much(if you<br>
already have 1 GB). But for SWAP files/partitions you can set priorities. So<br>
that for swap it should use zram first and then the hdd or ssd in your<br>
computer.<br>
And one rule that applies always RAM is faster than hdd/ssd. So swapping out<br>
to a compressed ramdrive might be a little bit slower than directly writing to<br>
your memory (this depends on the cpu and the number of cpus) but it is<br>
definitely faster then writing to your harddrive.<br>
On much workload which uses lots and lots of memory (usually the webbrowser is<br>
a memory hungry beast no matter if chromium or firefox or xyz) this could<br>
dramatically help the performance. (especially also when you think about live<br>
usb sticks with persistency files/partitions + swap file/partiton on it - I<br>
admit this might be a rare case but I have seen this before more than once<br>
already)<br>
<div class="im"><br>
><br>
> When I first starting using Ubuntu and Lubuntu, when I first joined the<br>
> Ubuntu Forms, the GURUs and the Expert people over there taught me<br>
> something.<br>
> If you have 1GB-2GB RAM or more, SWAP Partition = RAM<br>
> If you have LESS than 1GB RAM, SWAP Partition = 2 * RAM<br>
<br>
</div>It depends.<br>
Chromium for example sometimes needs lots and lots of ram and in this case it<br>
might be wise to also have more SWAP space for this.<br>
As /tmp nowadays also tends to be written to ram it might be also helpful to<br>
have a bigger swap file/partition depending on how you work and what<br>
applications you use.<br>
Audacity (the audio editor) for example writes everything to /tmp if you don't<br>
save your project somewhere. This can fill the /tmp directory very fast if you<br>
are cutting an interview or a large music file.<br>
<div class="im"><br>
><br>
> Whenever I use my test machines with 512MB RAM, I always set SWAP Partition<br>
> to be 1GB RAM. NO MATTER how much my HDD Size is.<br>
> Having that said, I do have NO problems at all whether installing from a<br>
> LiveCD or LiveUSB.<br>
<br>
</div>Not everyone who wants to install Lubuntu has a swap space on disk for it on<br>
first installs. It might be very convenient then to double the memory available<br>
just by enabling zram (which uses the same amount as RAM is available as<br>
virtual swap space compressed in RAM). At least it is more convenient than<br>
telling those people to firstly create a swap partition with gparted and either<br>
enable it with the terminal or reboot the live system to be able to install<br>
the system on the pc.<br>
<br>
I hope that explains some things .<br>
Ah and btw. we here at ZevenOS also tested zram in Neptune (yeah I am the main<br>
dev of Neptune & ZevenOS) for about half a year and it worked fine so far and<br>
we made particullary good experiences with live systems + persistency (which<br>
is one of Neptunes primary goals).<br>
<div class=""><div class="h5"><br></div></div></blockquote></div><div class="gmail_extra"><br></div><br clear="all"><div style>From all the above, I came to understand:</div><div style>zRAM in order to work, does not need SWAP partition. Why? because "<span style="font-size:15px;color:rgb(0,0,0);font-family:sans-serif;line-height:22.5px">zRam increases performance </span>by <b><u>avoiding paging on disk</u></b> and instead uses a <b><u>compressed block device in RAM</u></b> in which paging takes place <b><u>until it is necessary to use the swap space on the hard disk drive</u></b>. "</div>
<div style><span style="font-size:15px;color:rgb(0,0,0);font-family:sans-serif;line-height:22.5px"><br></span></div><div style><span style="font-size:15px;color:rgb(0,0,0);font-family:sans-serif;line-height:22.5px">So, it does not depend on the SWAP Partition. In fact, zRAM will create a SWAP but NOT on the HDD, but on the RAM.</span></div>
<div style><span style="font-size:15px;color:rgb(0,0,0);font-family:sans-serif;line-height:22.5px"><br></span></div><div style><span style="font-size:15px;color:rgb(0,0,0);font-family:sans-serif;line-height:22.5px">So, let's all please agree about that before we carry on with any test :)</span></div>
<div style><span style="font-size:15px;color:rgb(0,0,0);font-family:sans-serif;line-height:22.5px"><br></span></div><div style><font color="#000000" face="sans-serif"><span style="line-height:22.5px">From the emails, I see people are still confused or at least are confusing me!!!</span></font></div>
<div style><font color="#000000" face="sans-serif"><span style="line-height:22.5px"><br></span></font></div><div style><font color="#000000" face="sans-serif"><span style="line-height:22.5px">Whether you turn SWAP ON or OFF, that is NOT the point.</span></font></div>
<div style><font color="#000000" face="sans-serif"><span style="line-height:22.5px">We need to test without having SWAP partition anyway so that we can tell whether adding zRAM is worthy or not.</span></font></div><div style>
<font color="#000000" face="sans-serif"><span style="line-height:22.5px"><br></span></font></div><div style><font color="#000000" face="sans-serif"><span style="line-height:22.5px">If I'm wrong, please correct me. If this is correct, please tell me as well. I need to to make sure we are all on the same boat. </span></font></div>
<div class="gmail_extra"><br></div><div class="gmail_extra" style>Thanks!</div><div class="gmail_extra" style><br></div>-- <br><div dir="ltr"><div><p style="margin:0px 0px 1em;font-family:'Ubuntu Beta',UbuntuBeta,Ubuntu,'Bitstream Vera Sans','DejaVu Sans',Tahoma,sans-serif;line-height:19px">
<span style="background-color:rgb(255,255,255)"><font color="#000000"><big>"All of us are smarter than any one of us."</big><span></span><span></span></font></span></p><p style="margin:0px 0px 1em;font-family:'Ubuntu Beta',UbuntuBeta,Ubuntu,'Bitstream Vera Sans','DejaVu Sans',Tahoma,sans-serif;line-height:19px">
</p></div><div><b style="font-family:'trebuchet ms',sans-serif"><span style="color:rgb(11,83,148)">Best Regards,</span></b><br></div><div><span style="font-family:'trebuchet ms',sans-serif"><b><span style="color:rgb(11,83,148)"><a href="https://wiki.ubuntu.com/amjjawad/" target="_blank">amjjawad</a></span></b><br>
</span></div><span style="font-family:'trebuchet ms',sans-serif"><b><a href="https://wiki.ubuntu.com/Lubuntu/CommunicationsTeam/WOWLubuntu/StartUbuntu" target="_blank"><span style="color:rgb(204,0,0)">Start Ubuntu</span></a></b><br>
</span><div><span style="font-family:'trebuchet ms',sans-serif"><br></span></div><div><i><span style="font-family:'trebuchet ms',sans-serif">Test Machine: ASUS F3F Laptop - </span></i><span style="font-family:arial,helvetica,sans-serif"><span><i>Intel Core Duo T2350 @ 1.86GHz with 489MB RAM</i><br>
</span></span></div><div><br></div></div>
</div></div>