Comments (5)
As in tmpfs ?
Or a ramdisk?
tmpfs is sort of cool as its seems complete and will push idle pages to swap.
zram would if the writeback cache option wasn't disabled for some reason in raspbian the pi alarm arch linux for arm it works but even then it is only partition based and would seem it was supposed to offer more but stopped there.
Then again its idle control is manual so could be quite useful for mounted drives with a writeback cache as you mark all as idle and if accessed the idle mark is lost.
At stages you can push out to swap all still marked as idle.
Never tried it but that could be pretty cool in creating a zdrive where often files become old and static and just take space but still there in the file system namespace without visible change or location difference..
As a swap backed compressed ram zram is not as good as zswap but zswap is not enabled for the pi even though it is better.
Prob might make an appearance in buster with a bit of luck, but its only better as its push to swap actually has an age algorithm.
To be honest not many actually understand zram & zswap as the ubuntu package is an obvious example of that, zswap really is understood as really you set size and enable.
With zswap many say it should not be more than a 3rd of the memory my advise is to ignore what anyone says especially from ubuntu or mainline distro's ignore all and play with it yourself.
If it was anything to do with ubuntu we would all believe that it is still single stream and you need a zram device or zswap for each core which actually multi-stream was implemented in 3.15.
If it does turn up in buster the first thing I will try with zswap is to use half of memory with total mem 1.5x disk space with page-cache set to zero and a swappiness of 80 or higher.
I will be told no but from experience testing and finding out yourself is better to listening to what is likely a series of Chinese whispers.
ramdisk doesn't have tmpfs push idle to swap and unless you are using ntfs and file compression its uncompressed.
Zram really should be compressed tmpfs but seems development stopped at a dedicated swap partition whilst really it should interface to the kernel 'frontspace'? 'frontswap'? my memory and terminology but the kernel namespace for the system swap interface.
from zram-config.
Yes - tmpfs vs ramdisk, good question! I was researching ramdisk (what is it used for?), and the thread I linked to above showed up in my search result. At the time I read it, I was not clear on the difference between ramdisk and tmpfs. And so I assumed the thread was about ramdisk, and didn't read closely enough to realize my incorrect assumption. Bottom line: sorry for the confusion.
But just so I'm clear: Is it true that zram
and therefore zram-config
are not applicable to ramdisk?
from zram-config.
Not sure at all why you are interested in ramfs as the newer tmpfs is likely a better alternative.
Zram is basically ramfs with compression but yeah ramdisk will not be included in zram-config as can not see the point but I have been thinking of including tmpfs as it has all the functions of ramfs but also the frontspace / frontswap system swap interface that still I can not remember its exact name.
zram_conf and all the other zram examples are exactly that main thing was to show zram is multistream and that zram services should be able to co-exist.
You are welcome to hack, clone and copy any of it.
If you want ramf just change the mount options and mkfs options in the script
from zram-config.
I got interested in RAM disks (which is not exactly the same as ramfs) because I discovered that RAM disks are allocated in the Raspbian kernel, and no one seems to know why - or what these RAM disks are used for.
I discovered they were there when I ran fdisk -l
. I saw 16 RAM disks allocated:
Disk /dev/ram0: 4 MiB, 4194304 bytes, 8192 sectors
...
for ram0 - ram15. Since then, I've read that several Linux distros allocate RAM disks, but not all of the kernels list RAM disks in /proc/partitions
(which is apparently why they show up in the fdisk -l
output. Some have said listing them is erroneous kernel behavior.
Allocating RAM disks would make sense (to me at least) if they were used to reduce write activity to the SD card. But that explanation is largely absent as their raison d'Γͺtre - at least as far as I've read so far.
And as far as ramfs vs tmpfs, I don't know enough yet to have an informed opinion regarding which is "best". That's actually why I'm researching this :) It's fascinating really - a bit like watching the inside of an anthill... all the ants working hard, but not really understanding the purpose of all of it. But I digress :)
from zram-config.
If you want a really unknowable account in /boot an image of the kernel+modules is created, initramfs and various other names depending on distro.
Arch linux is always a great reference https://wiki.archlinux.org/index.php/Mkinitcpio
from zram-config.
Related Issues (20)
- F2FS filesystem compatibility HOT 3
- missing dependencies HOT 1
- install.bash should cleanup after itself HOT 1
- OpenRC init script HOT 2
- Lots of output after sudo zram-config "stop" / "start" HOT 4
- Any way to avoid locking up zram volume when full? HOT 6
- what does exactly your software ? HOT 1
- Not mounting any target HOT 4
- Any way to create multiple devices per core? HOT 2
- Difference to openhabian-zram HOT 2
- Service is active, but no zrams are mounted HOT 6
- no longer works on ubuntu 21.10 (raspberry pi 4) HOT 5
- Add ability to sync files to disk periodically HOT 6
- missing dependency
- read-only zram fs IN operations ?? HOT 6
- Failing to sync on shutdown but works on demand HOT 9
- install (from openhabian) fails HOT 1
- gpg Can't check signature: No public key A2A3BF1A7D8D7AD47E939274B13E6AF0E31D89F8 HOT 2
- Allow update.bash without git fetch/pull HOT 7
- Replace fts-dev with musl-fts-dev under alpine HOT 4
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 zram-config.