Giter Site home page Giter Site logo

zram-tools's People

Contributors

highvoltage avatar jwilk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

zram-tools's Issues

Please add ability to mount /tmp (and simillar temporary folders) on zram device, like zram-config

I've noticed, that zram is a very good solution for /tmp (and maybe other temporary folders, like /var/crash/). There is a zram-config project, which contains an ability to mount /tmp on zram device, see https://git.launchpad.net/~eugenesan/+git/zram-config

Please use patches from zram-config for /tmp mounting. All these improvements already commided to zram-config branch in 2016 by Eugene San, see https://git.launchpad.net/~eugenesan/+git/zram-config
* Rework scripts to utilize built-in zram multi cpu support
* Add support for /tmp mounting on zram device
* Introduce defaults file for setting parameters
I successfully use zram-config with these improvements since 2016 in hundreds computers with Ubuntu and Baltix GNU/Linux distributions!
For more info look at this bugreport: https://launchpad.net/ubuntu/+source/zram-config/+bug/1548424 (and https://bugs.debian.org/930412 )

zram-tools uses outdated by 7 years approach in setting up zram thread count

zram module has max_comp_streams property since around 2011, and nowadays it is (at least on x86/amd64) is autodetected to match the CPU core count.
Setting up multiple zram devices is inefficient even if each one is set to use only one compression stream, but with default settings it will end up using number of threads equal to square of the CPU core count (4 on dual-core, 16 on quad-core, etc.)
Note that I don't have access to any ARM boards or other supported by Debian platforms, so I cannot verify whether zram module has the same max_comp_streams behavior there.
Also note that a more lightweight approach to setting up zram could use udev rule instead, e.g. this is what I've been using on my systems:

KERNEL=="zram0", SUBSYSTEM=="block", DRIVER=="", ACTION=="add", ATTR{initstate}=="0", PROGRAM="/bin/sh -c 'echo $(($(LANG=C free -k | grep -e "^Mem:" | sed -e "s/^Mem: *//" -e "s/ .//")*2))KiB'", ATTR{disksize}="$result", RUN+="/sbin/mkswap $env{DEVNAME}", TAG+="systemd"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.