Comments (10)
This not a bug, check:
cat /sys/block/zram0/max_comp_streams
Official kernel documentation:
https://kernel.googlesource.com/pub/scm/linux/kernel/git/next/linux-next/+/refs/heads/akpm/Documentation/blockdev/zram.txt
quote:
2) Set max number of compression streams
Compression backend may use up to max_comp_streams compression streams,
thus allowing up to max_comp_streams concurrent compression operations.
By default, compression backend uses single compression stream.
Examples:
#show max compression streams number
cat /sys/block/zram0/max_comp_streams
#set max compression streams number to 3
echo 3 > /sys/block/zram0/max_comp_streams
from systemd-swap.
Agree I'm a little confused.
The previous version was the option zram_num_devices=$cpu_count.
And even when the option was commented out was two zram devices.
The latest version is only one zram device. Is that correct?
The system has two CPUs.
from systemd-swap.
Yes, previously i use several zram devices like https://aur.archlinux.org/packages/zramswap
After i found max_comp_streams options and rewrite some code for using kernel side feature.
And now, setup several zram devices for swap no needed, i can only set compression streams count with one zram device.
And even when the option was commented out was two zram devices. - if options commented and script setup several devices -> this is a bug of previously version.
The latest version is only one zram device. Is that correct?
The system has two CPUs.
Latest version setup only one device and if options for multi compression streams enabled, set 2 threads in max_comp_streams for your system.
This is right behavior.
from systemd-swap.
About zram[streams] option.
- How to set max_comp_streams correctly systemwide?
- Not very logical that if in config zram[streams] more than max_comp_streams, then the zram device is not created.
from systemd-swap.
- Systemwide? Only with hands :)
echo | sudo tee /sys/block/zram*/max_comp_streams - I repeat again, zram[streams] == max_comp_streams
in script echo ${zram[streams]} > /sys/block/zram${[dev]}/max_comp_streams
Value from zram[streams] sets to max_comp_streams
if you set zram[streams]=4, after starting systemd-swap in max_comp_streams you have 4.
We no need to create several device, 1 enough.
Or in your system after set zram[streams]=4 zram device not setup? May be you not install zramctl? (this is external depends for systemd-swap, and this heeded for setups zram devices in script)
from systemd-swap.
FS#41361:
no zram devices with uncommented zram[streams]=${sys[cpu_count]} in /etc/systemd-swap.conf
And one /dev/zram0 with this string commented.
Second line means that zramctl is installed, isn't it?
from systemd-swap.
I am confused, in arch bug tracker you create bug because my tool no setup zram devices if you set streams count in config, on github you say what my tool must setup several device.
I retest on my system and all working perfect. If you have trouble please provide additional info, like steps for reproduce. Config copy paste, logs, some thing, what I can using for fix that.
one line command:
sudo bash -cx 'uname -a; modprobe --first-time zram; cd /etc/modprobe.d/; grep . *; ls /sys/block/; mount; swapon; zramctl status; cat /etc/systemd-swap.conf; bash -x /usr/lib/systemd/scripts/systemd-swap.sh stop; bash -x /usr/lib/systemd/scripts/systemd-swap.sh start; mount; swapon; zramctl status; ls /sys/block/; ls /sys/block/zram0/; strace zramctl find 1024M lz4 4;' &> ~/systemd-swap.log
from systemd-swap.
if you using kernel => 3.15 and not set zram[alg] option, and set zram[streams] - you can get case where zramctl can't work properly, i fix that in 2.24.5
from systemd-swap.
I apologize for the delay. I do not have access to the system right now.
Yes, the system has been in up to date conditions of a week ago (kernel ~3.15.5)
And I did not set zram[alg] option.
Thank you.
from systemd-swap.
Happy to help, so can you close issue and bug report? https://bugs.archlinux.org/task/41361
from systemd-swap.
Related Issues (20)
- Parse error HOT 1
- Suggestion: update zram algo list in default config HOT 7
- TypeError HOT 1
- systemd-swap fails after install. HOT 11
- daemon notify TypeError on armbian HOT 2
- Inproper configurations can cause infinite loop
- swapfc_priority reaching negative values on long running systems
- Chrome-based browsers do not use swap HOT 1
- subprocess.CalledProcessError: Command '['systemctl', 'start', 'var-lib-systemd\x2dswap-swapfc-x.swap']' returned non-zero exit status 1. HOT 12
- systemd-swap fails to start as service (exit code 203) HOT 3
- Recommendation for Swapfc defaults
- ModuleNotFoundError: No module named 'systemd'
- FileNotFoundError /run/systemd/system/var-lib-systemd\\x2dswap-swapfc-1.swap HOT 1
- Failed deactivating swap at shutdown HOT 1
- long boot times with zram_count=16 HOT 6
- subprocess.CalledProcessError: Command '['mkswap', '-L', 'SWAP_f2fs_1', '/var/lib/systemd-swap/swapfc/1']' returned non-zero exit HOT 1
- Cannot Create SwapFC on non-root Drive HOT 2
- Systemd-swap doesn't handle swap_fc path already existing on btrfs HOT 1
- ERRO: swapfc_path is located on an unknown filesystem
- Swapfc path in another partition(? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from systemd-swap.