mystilleef / fedorazram Goto Github PK
View Code? Open in Web Editor NEWScripts that enable zram for Fedora
Scripts that enable zram for Fedora
The spec file version is 1.0.0, which results in an error, since the tarball is now named zram-1.0.1.tar.bz2, instead of zram-1.0.0.tar.bz2, which the spec file is looking for.
By writing to /sys/block/zram$i/comp_algorithm, ZRAM can be made to use the faster lz4 compression algorithm (if available).
Right now I've just put a line:
echo lz4 > /sys/block/zram$i/comp_algorithm
in the first line of the last for loop in zramstart, but since this is compilation dependent, then I'm not sure how this change could/should best be made. But I figured I would document my changes here for anyone interested.
Hey,
I tried building the rpm (after setting up the rpm-build environment) with 'make rpm' on Fedora 18 and got this
Fehler beim Bauen des RPM:
Datei nicht gefunden: /home/christian/rpmbuild/BUILDROOT/zram-1.0.0-0.fc18.x86_64/usr/lib/systemd/system/zram.service
Which is German and translates to (though probably not verbatim):
Error while building the RPM:
File not found: /home/christian/rpmbuild/BUILDROOT/zram-1.0.0-0.fc18.x86_64/usr/lib/systemd/system/zram.service
Not sure what do do here. Any help appreciated. Thanks!
The script sets the disksize value, which is the size of the zram block device, not the amount of memory used (which is allocated dynamically). The memory can be limited by the mem_limit parameter. (Setting Factor to even 200 won't cause OOM, unless lots of hard to compress data is written to the zram device) (mem_limit can prevent that, but is not supported on some older kernels (Like CentOS7's 3.10))
See https://www.kernel.org/doc/Documentation/blockdev/zram.txt
It would be helpful to not only know how to set the algorythm (like a note in the readme how to do that)
but also show the compression used in zramstat (like a colmn after the compression ratio)
The license on this is unclear
I found this in my (Fedora 21) system today:
$ dnf whatprovides /usr/lib/systemd/system/zram.service
Using metadata from Tue May 19 15:25:37 2015 (9 days, 18:24:36 hours old)
anaconda-core-21.48.22-1.fc21.x86_64 : Core of the Anaconda installer
Repo : @System
So I think it would be more correct to install zram.service into /etc/systemd/system/
which is where Local Configuration
units should be installed (and will mask the anaconda one).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.