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: 21974
- Joined: Mon Sep 18, 2006 5:17 am
- Location: Wexford, Éire
- Contact:
Re: Optimal settings for Swap, ZSwap etc.?
Be courageous, replace Firefox with Brave: https://brave.com/linux/
Still NOT a great day for a Guinness! (the Real Black Stuff). And I have TWO (closed) pubs within 500 meters/yards!
Ireland remains on FULL lockdown until 2nd half of May 2021!
Covid-19: Stay safe, so Mask it or Casket!
Ireland remains on FULL lockdown until 2nd half of May 2021!
Covid-19: Stay safe, so Mask it or Casket!
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: 2867
- 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.
Daily driver: X220 4291-C91 i7-2620M
Backup: X601 Core 2 Duo T8100
Toy: X60F Core Solo U1300
On loan: X220 4291-P79 i5-2520M
In pieces: two retired but working X61Ts
RIP: 760XD 9546-U9E; X61 7676-A24; and a BOE-Hydis HV121P01-100 in failed SXGA+ mod
Backup: X601 Core 2 Duo T8100
Toy: X60F Core Solo U1300
On loan: X220 4291-P79 i5-2520M
In pieces: two retired but working X61Ts
RIP: 760XD 9546-U9E; X61 7676-A24; and a BOE-Hydis HV121P01-100 in failed SXGA+ mod

-
- Freshman Member
- Posts: 97
- 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: 2867
- 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.
Daily driver: X220 4291-C91 i7-2620M
Backup: X601 Core 2 Duo T8100
Toy: X60F Core Solo U1300
On loan: X220 4291-P79 i5-2520M
In pieces: two retired but working X61Ts
RIP: 760XD 9546-U9E; X61 7676-A24; and a BOE-Hydis HV121P01-100 in failed SXGA+ mod
Backup: X601 Core 2 Duo T8100
Toy: X60F Core Solo U1300
On loan: X220 4291-P79 i5-2520M
In pieces: two retired but working X61Ts
RIP: 760XD 9546-U9E; X61 7676-A24; and a BOE-Hydis HV121P01-100 in failed SXGA+ mod

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
-
-
WTB: UltraBay II HDD adapter and TP770 HDD caddy etc.
by Edward Mendelson » Sat Mar 06, 2021 1:14 pm » in Marketplace - Forum Members only - 5 Replies
- 359 Views
-
Last post by Edward Mendelson
Fri Mar 12, 2021 2:55 pm
-
-
-
LF/WTT EU X300/X301 working, broken etc
by digmorepaka » Mon Apr 05, 2021 2:22 pm » in Marketplace - Forum Members only - 0 Replies
- 108 Views
-
Last post by digmorepaka
Mon Apr 05, 2021 2:22 pm
-
-
- 2 Replies
- 351 Views
-
Last post by WellLookieHere
Sun Apr 11, 2021 9:46 am
-
-
Touchpad settings for Win10?
by wrybread » Thu Jan 28, 2021 6:55 pm » in ThinkPad W530/W540/W541/W550 Series - 3 Replies
- 593 Views
-
Last post by wrybread
Fri Jan 29, 2021 6:08 pm
-
Who is online
Users browsing this forum: No registered users and 4 guests