Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Is it good idea to use ZRAM on a old laptop?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Goshanecr
Apprentice
Apprentice


Joined: 17 Aug 2005
Posts: 158
Location: Russia

PostPosted: Thu Aug 06, 2015 5:41 pm    Post subject: Is it good idea to use ZRAM on a old laptop? Reply with quote

Good day friends!

I have a laptop with Intel Pentium-M 1.6Ghz processor and 256MB RAM. I want to ask you, since I read that using ZRAM allow virtually extend availaible high-speed memory to system. And I want to consult with yours, is it will be useful for my hardware? If yes, how much RAM I need to use as ZRAM swap?

My typical environments are: LXDE+Epiphany+Audacious+Pidgin.
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 7133
Location: almost Mile High in the USA

PostPosted: Thu Aug 06, 2015 9:53 pm    Post subject: Reply with quote

Zram is a compressed ramdisk.

Really only you can tell. How much swap do you use?

One problem is though regular disk swap, swaps to disk which is disjoint from the shared resource. Zram will use even more RAM. The hope is that swapped pages are highly compressible, if it is then it would be a benefit (minus CPU cycles, especially on a single core CPU like the Pentium-M. On a properly working DMA system your system can continue to compute other stuff when waiting for disk if you're multitasking, but now has to be used for compression for zdisk.)

I don't think it should be too hard to just try it! Let us know. I might try it on some of my ram limited machines, perhaps my 64MB SC520 SBC could benefit... then again it has even less CPU to work with...
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
szatox
Veteran
Veteran


Joined: 27 Aug 2013
Posts: 1746

PostPosted: Fri Aug 07, 2015 8:20 pm    Post subject: Reply with quote

Quote:
256MB RAM.
well, first thing is you definitelly want to get rid of CPU hungry programs.
Second, ramdisk only takes as much data as it contains rather than what it is allowed to take. Why not give it like 90% and set swappines to, say, 10-20 instead of default 50? It's a guess rather than a silver bullet, but lower swappines will keep more data in uncompressed RAM, while non-zero value should still push it out to ZRAM before you atualy run out of space.
As you consume more and more RAM, more and more of it will go to ZRAM growing your SWAP (and reducing available RAM pushing more data out to ZRAM) in turn degrading performance, possibly slowing you to crawl. Give it a try and look at behaviour :)

On the bright side, under "typical" desktop workload CPU is doing nothing most of te time and decompression is signifficantly faster than compression, so if you use some data that doesn't change frequently it can stay in swap for a long time with little impact on performance.
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 7133
Location: almost Mile High in the USA

PostPosted: Fri Aug 07, 2015 10:02 pm    Post subject: Reply with quote

But you do have to watch out, running emerge --update world could benefit more from real RAM than zram swap...

Maybe try to first find out how much you typically go into swap, add a little fudge factor, divide that by three, and use that number as a starting point for your zram swap. And keep some regular swap in case it overflows...
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
Goshanecr
Apprentice
Apprentice


Joined: 17 Aug 2005
Posts: 158
Location: Russia

PostPosted: Fri May 25, 2018 3:44 am    Post subject: Reply with quote

Finally I can tell that zRam on a laptop with Pentium-m 1.6Ghz + 256MB Ram is a very, fantastic solution!
All tasks which I have on it (php, lighttpd, mysql, browser, updating @world) are much responsive. Because just one browser often eats all ram and swapping freezes system, but now such effect is gone.
Back to top
View user's profile Send private message
mv
Watchman
Watchman


Joined: 20 Apr 2005
Posts: 6281

PostPosted: Fri May 25, 2018 4:08 am    Post subject: Reply with quote

Goshanecr wrote:
Finally I can tell that zRam on a laptop with Pentium-m 1.6Ghz + 256MB Ram is a very, fantastic solution!

Mind to share your configuration? (E.g. how much ram have you reserved, which compression algorithm have you chosen)?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum