Take a look at our
ThinkPads.com HOME PAGE
For those who might want to contribute to the blog, start here: Editors Alley Topic
Then contact Bill with a Private Message
ThinkPads.com HOME PAGE
For those who might want to contribute to the blog, start here: Editors Alley Topic
Then contact Bill with a Private Message
Optimal settings for Swap, ZSwap etc.?
Optimal settings for Swap, ZSwap etc.?
Hey,
does anyone know what would be good values for the following Swap, ZSwap etc. settings:
# in /etc/sysctl.conf:
vm.swappiness=20
vm.vfs_cache_pressure=100
vm.dirty_ratio = ??
vm.dirty_background_ratio = ??
# in /etc/default/grub:
zswap.enabled=1
zswap.compressor=lz4
zswap.max_pool_percent=30
zswap.same_filled_pages_enabled=1
zswap.zpool=z3fold
Also, are there any other interesting parameters to tweak?
I've read about 20 articles/tutorials, but I'm still not really sure about the decision-making regarding many of these settings. And there are conflicting statements, too, for example regarding values for vfs_cache_pressure and max_pool_percent or zsfold vs. zmsalloc for compression.
I'm currently running LMDE4 on an old R60 9461-DXG upgraded with a T7400, 4 GB RAM and an SSD. The machine is used mostly for office work, image processing using GIMP and, of course, web browsing using Firefox (which is a terrible resource hogger). Someone recommended using the h264ify addon with which I can now run 720p (not 720p60) YouTube videos and even 1080p with only sporadic hiccups.
Is it possible to make intelligent guesses for these settings according to the hardware specs or do I have to run measurements?
PS.: What I noticed with certain settings is that the left side of the handrest is getting warmer (probably the CPU/GPU). Does this observation make sense, i.e. can some of these settings have significant impact on heat generation?
does anyone know what would be good values for the following Swap, ZSwap etc. settings:
# in /etc/sysctl.conf:
vm.swappiness=20
vm.vfs_cache_pressure=100
vm.dirty_ratio = ??
vm.dirty_background_ratio = ??
# in /etc/default/grub:
zswap.enabled=1
zswap.compressor=lz4
zswap.max_pool_percent=30
zswap.same_filled_pages_enabled=1
zswap.zpool=z3fold
Also, are there any other interesting parameters to tweak?
I've read about 20 articles/tutorials, but I'm still not really sure about the decision-making regarding many of these settings. And there are conflicting statements, too, for example regarding values for vfs_cache_pressure and max_pool_percent or zsfold vs. zmsalloc for compression.
I'm currently running LMDE4 on an old R60 9461-DXG upgraded with a T7400, 4 GB RAM and an SSD. The machine is used mostly for office work, image processing using GIMP and, of course, web browsing using Firefox (which is a terrible resource hogger). Someone recommended using the h264ify addon with which I can now run 720p (not 720p60) YouTube videos and even 1080p with only sporadic hiccups.
Is it possible to make intelligent guesses for these settings according to the hardware specs or do I have to run measurements?
PS.: What I noticed with certain settings is that the left side of the handrest is getting warmer (probably the CPU/GPU). Does this observation make sense, i.e. can some of these settings have significant impact on heat generation?
Last edited by juliaaa on Wed Mar 17, 2021 10:23 am, edited 2 times in total.
-
- Admin Emeritus
- Posts: 23825
- Joined: Mon Sep 18, 2006 5:17 am
- Location: Loch Garman, Éire
Re: Optimal settings for Swap, ZSwap etc.?
Be courageous, replace Firefox with Brave: https://brave.com/linux/
Lovely day for a Guinness! (The Real Black Stuff)
Re: Optimal settings for Swap, ZSwap etc.?
Hey, thanks for the suggestion. Actually, I used to use Brave for a while on Android, but I heard it's collecting personal information in order to feed their own ad network or something. Also, there was some usability issue which is why I dumped it (although that was 2 years ago)...haven't really tried alternative browsers since except the TOR browser bundle. What speaks for the current Brave version?
-
- Senior ThinkPadder
- Posts: 3832
- Joined: Mon May 28, 2012 5:49 am
- Location: Metro Manila, Philippines
Re: Legit settings for Swap, ZSwap etc.?
Enabling ZSwap adds some CPU load (compressing and decompressing data), though I don't know by how much.
If you want to reduce the temps, then you can try undervolting the CPU.
If you want to reduce the temps, then you can try undervolting the CPU.
Planned Purchase: T480s i5-8350 FHD Touch
Impulse Buy: Thinkpad not named for safety reasons
RIP: X220 4291-C91 X61 7676-A24 760XD-U9E
Impulse Buy: Thinkpad not named for safety reasons
RIP: X220 4291-C91 X61 7676-A24 760XD-U9E
-
- Freshman Member
- Posts: 99
- Joined: Fri Mar 19, 2010 8:07 am
- Location: New York, NY
Re: Optimal settings for Swap, ZSwap etc.?
Not sure I'd be using ZFS on a laptop. There's no gain for single drive and some overhead. Not surprising that system is running hotter. I think most of the tuning can be left to defaults until you need to do something specific.
Egregious overbidder
-
- Senior ThinkPadder
- Posts: 3832
- Joined: Mon May 28, 2012 5:49 am
- Location: Metro Manila, Philippines
Re: Optimal settings for Swap, ZSwap etc.?
I think you've gotten confuseddavidgurvich wrote: ↑Wed Mar 17, 2021 10:46 amNot sure I'd be using ZFS on a laptop. There's no gain for single drive and some overhead. Not surprising that system is running hotter. I think most of the tuning can be left to defaults until you need to do something specific.
It's not the filesystem ZFS, but the in-memory compressed swap cache Zswap. It's useful for systems with low RAM.
Planned Purchase: T480s i5-8350 FHD Touch
Impulse Buy: Thinkpad not named for safety reasons
RIP: X220 4291-C91 X61 7676-A24 760XD-U9E
Impulse Buy: Thinkpad not named for safety reasons
RIP: X220 4291-C91 X61 7676-A24 760XD-U9E
Re: Optimal settings for Swap, ZSwap etc.?
Have you checked out these projects:
https://github.com/ecdye/zram-config
https://github.com/StuartIanNaylor/zram-swap-config
Quite a bit of useful thinking about zram and how to use it. I use it (with Ubuntu Mate) on all my gear.
Cheers
Nik
https://github.com/ecdye/zram-config
https://github.com/StuartIanNaylor/zram-swap-config
Quite a bit of useful thinking about zram and how to use it. I use it (with Ubuntu Mate) on all my gear.
Cheers
Nik
Re: Optimal settings for Swap, ZSwap etc.?
wrt Zswap you can remove the same_pages_filled line as your only stating the default, it's only use if is you want to switch it off, you could also try lzo as compressor.juliaaa wrote: ↑Tue Mar 16, 2021 5:51 pmHey,
does anyone know what would be good values for the following Swap, ZSwap etc. settings:
# in /etc/sysctl.conf:
vm.swappiness=20
vm.vfs_cache_pressure=100
vm.dirty_ratio = ??
vm.dirty_background_ratio = ??
# in /etc/default/grub:
zswap.enabled=1
zswap.compressor=lz4
zswap.max_pool_percent=30
zswap.same_filled_pages_enabled=1
zswap.zpool=z3fold
Also, are there any other interesting parameters to tweak?
I've read about 20 articles/tutorials, but I'm still not really sure about the decision-making regarding many of these settings. And there are conflicting statements, too, for example regarding values for vfs_cache_pressure and max_pool_percent or zsfold vs. zmsalloc for compression.
I'm currently running LMDE4 on an old R60 9461-DXG upgraded with a T7400, 4 GB RAM and an SSD. The machine is used mostly for office work, image processing using GIMP and, of course, web browsing using Firefox (which is a terrible resource hogger). Someone recommended using the h264ify addon with which I can now run 720p (not 720p60) YouTube videos and even 1080p with only sporadic hiccups.
Is it possible to make intelligent guesses for these settings according to the hardware specs or do I have to run measurements?
PS.: What I noticed with certain settings is that the left side of the handrest is getting warmer (probably the CPU/GPU). Does this observation make sense, i.e. can some of these settings have significant impact on heat generation?
to view zswap performance run "sudo grep -R . /sys/kernel/debug/zswap/" or create a bash alias for it to view the zswap cache performance. 30% pool size might be fine for 4G RAM but 2G RAM configs might want to look ar 25%.
Home - Win 10 MSi GF63 Gaming Laptop /Arch GNOME 3/X230 Tablet /X61 [Korean] - Debian 10/T60p - Ubuntu 20.10 Helix 2
Work - Win10/Thinkpad X1 Tablet Gen 2
Work - Win10/Thinkpad X1 Tablet Gen 2
-
- Similar Topics
- Replies
- Views
- Last post
-
-
x201/x200 fanatic - host of issues, thermal pasting with PTM7950 etc
by xannnnnayz » Sat Nov 25, 2023 7:54 am » in ThinkPad X200/X201/X220 and X300/X301 Series - 0 Replies
- 2767 Views
-
Last post by xannnnnayz
Sat Nov 25, 2023 7:54 am
-
-
-
Bios messages being displayed at startup - "Machine Type is invalid" etc.
by axiomcs78 » Thu Jan 11, 2024 10:27 am » in ThinkPad X1 / X1-Carbon / X1-Extreme and later Series - 4 Replies
- 1438 Views
-
Last post by RealBlackStuff
Fri Jan 12, 2024 3:10 am
-
-
-
X2100 loses bios settings if left unplugged
by jamesfawcett » Fri Apr 05, 2024 9:00 am » in 51nb and other modded Thinkpads - 8 Replies
- 532 Views
-
Last post by kfzhu1229
Fri Apr 12, 2024 2:34 pm
-
-
-
Any considerations with this mobo swap?
by canonmasta » Sun Nov 19, 2023 4:36 am » in ThinkPad X230-X280 / X390 Series - 5 Replies
- 5574 Views
-
Last post by mikemex
Sat Dec 16, 2023 10:30 pm
-
Who is online
Users browsing this forum: No registered users and 17 guests