M
M
mkone1122021-09-02 19:39:29
linux
mkone112, 2021-09-02 19:39:29

Working with memory and hibernation in linux as in windows?

How to make linux behave like windows?
1. Compressed memory. Windows on the go presses memory, the less memory - the more compressed. Linux has zram, but it bites off a piece of memory that is always inaccessible. How well does it work, and are there alternatives?
2. hiberfil.sys in Windows can be 50% of the memory size. For swap to work on linux, its size must be at least as large as the amount of memory. Is it possible to force linux to go into swap with content compression, and exit the other way around with decompression?
3.superfetch. When you start Windows, it takes a few minutes to load the usual software immediately into memory. As a result, even with a very slow disk and enough memory, you can work quite comfortably. For Linux, there is preload. Question - why is it not enabled by default? The feature seems to be very useful. Are there any pitfalls besides a longer launch? Does preload work as well as superfetch on Windows?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
A
Armenian Radio, 2021-09-02
@gbg

The main thing to understand is that Linux on the desktop is for Linux enthusiasts who know how to experiment and solve problems. Many things cannot be treated remotely, so hoping that everything will be done instead of you is, to put it mildly, naive.
1) Depends on the tasks. I have it, I use it, nraitsa. However, I also have KSM enabled and virtual machines are running under KVM, and all this is on a laptop. Sometimes people in cafes twist their necks, see how I spit in the console in Wim in C ++ and do not understand what it is (probably they think that I am a kakir, or whatever it is).
Once again - to assess the suitability of a particular tool just like that in a vacuum without a specific task and evaluation criteria - is impossible and meaningless. Can you formulate yours works well ?
2) He already presses, and then unclenches. There will be laughter if the swap itself is filled with something, and you also want to put a frame there and it won’t fit.
I would be more worried about all kinds of crooked firewood like NVIDIA, which can wake up every other time or even write GPU has fallen of the bus and that's it
3) Well, turn it on and try it. Or do you think that here you will find an enthusiast who will be engaged in a sports reboot of venda and linux with a stopwatch in different configs to satisfy your curiosity? Maybe this enthusiast is you?
For example, I would say that after loading, rattling with a disk (in the 2020s someone has a system on a pancake disk? Seriously?) And loading a photoshop that I didn’t rest against, just in case, is a so-so occupation.
In general, take an SSD of at least 256 gigabytes, put the system there, cut 64 gigabytes for a swapper and don’t boil your brains with any collective farm.

C
CityCat4, 2021-09-02
@CityCat4

I did not quite understand what the correlation is between hiberfil.sys (which is a copy of the memory at the time of going into hibernation) and swap, which is the paging area. But just in case - zswap ?
To be honest, I do not understand - why all this? A severe lack of memory?

S
Saboteur, 2021-09-02
@saboteur_kiev

1. Compressed memory? Are you sure? it is possible the documentation where it works on a default?
2. hibernation is not a swap. Do not confuse pagefile.sys and hiberfil.sys - they are completely different and independent things.
Swap on Linux can be anything at all.
3. It doesn't quite work that way. With enough memory, Linux takes care of everything. It's just that Linux is not used to being rebooted often. And if you do not rebut, he basically tries to cache everything he can.

V
ValdikSS, 2021-09-06
@ValdikSS

Linux has zram, but it bites off a piece of memory that is always inaccessible.
You are mistaken, do not "bite off".
How well does it work
Works amazing, see https://notes.valdikss.org.ru/linux-for-old-pc-fro...
For swap to work on linux, its size must be at least as large as the amount of memory.
This is also a delusion, it will work with a smaller volume.
Is it possible to force linux to go into swap with content compression, and exit the other way around with decompression?
It seems that this will not work, but you can use the backing file option in zram - incompressible data will be dumped into the file.
The hibernate image on Linux is compressed by default.
For Linux, there is preload. Question - why is it not enabled by default?
In Linux, a lot is not enabled by default: perhaps in the case of preload, the effect is not very noticeable. Readahead was recently removed from systemd due to the lack of HDD developers - everyone switched to SSD.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question