-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Writeback cache high memory usage halting OS #71
Comments
Tested another VM only using ext4 having the same issue. |
To avoid the problems above only avoid run "dmsetup suspend" and create flush scripts to run in shutdown. |
Again, thank you for doing this research. It is very good details to know. I invite you to create a branch with a shutdown script but it will need to be intelligent enough to find all writeback cache devices (dm_writecache). |
@pkoutoupis In OS startup is displayed message Is good enabling rapiddisk.service because is possible use command line about status. Another detail is when is being done written using writeback the OS cache is very high, but not exact problem. Is how if in each disk written the OS is caching in RAM or is being done OS writeback cache plus rapiddisk cache. I have created a script writeback flush in "shutdown", but had happened problems. OS shutdown or restart run in sequence :
Script configured to run in shutdown or restart the writeback flush command will be done before shutdown.target being all file system are umounted and even thus you see disk led displaying disk write activity. Thus the correct is configure script to run before OS stop local file system pre if user have created writeback to anothers partitions and also for root. I need the exact name of systemctl done when stopping local file system pre to add in the script and after I post here all details, but yet trying find information about it. In moment waiting reply in few forums about the correct target name to be used. [Unit] [Service] [Install] In moment using umount.target. Have a nice week. |
The 4K error is covered here: #59 |
I had tested several times in a Virtual Box with Lubuntu 20.04.3 creating 4 writeback caches and in some times the OS had halted at point needing force a VM shutdown.
Thus need test installing in a "real" computer.
Using a 80 GB disk empty was installed Lubuntu 20.04.3 in 4 GB RAM.
Disk partitions
sda1 1 MB unformatted boot grub
sda2 400 ext2 boot
sda3 btrfs root
sda4 btrfs opt
sda5 btrfs home
sda6 btrfs data
3 writeback caches
rd1 sdb3 128
rd2 sdb4 32
rd4 sdb5 256
In tests not was loaded softwares in memory and the OS use less of 1 GB.
I had created 3 writeback caches for 3 partitions and when installing the initramfs scripts the default root wa cache was configured in a partition unformatted to avoid issues when using wb and wa in same root partition (In VM tests root file system damage was "fixed" avoiding wa and wb in same root).
Lubuntu have a widget "system statistics" configured to report OS memory usage.
When the OS is started
OS and applications 10 %
Buffers 0 %
Cache 14 %
Swap %
Testing only installing softwares the OS usage wlll be much high even not loading any software.
OS and applications 14 %
Buffers 0 %
Cache 65 %
Swap usage 0
If dmesetup flush is done few times when restarting the OS not boot and the OS startup process stop before load the GUI user login. Not is possible load the OS.
Thus I want try another command and was used also "dmsetup suspend" to each cache and in few seconds the OS is totally halted only is possible move the mouse pointer. Start menu or load any software not is work. Even pressing computer power button not shutdown OS. Few times also happen the same result above.
Is how if the OS is halted because mapper device is in activity.
Writecache not is moved to swap file thus swap continue being 0 %.
I had done a test when the cache is 65 % loading a software using more than 2 GB memory and the OS not was halted.
Again the same test with OS and another software total usage was 75 % and cache goes from 65 to 15 % not halting the OS.
Closing the application the cache begin to reach high memory usage.
Also was configured vm settings below without solution
vm.dirty_background_bytes=1024
vm.dirty_bytes=1024
vm.dirty_expire_centisecs=100
dirtytime_expire_seconds=1
vm.dirty_writeback_centisecs=100
Now testing in OS being used ext4.
@pkoutoupis
Rapiddisk being a wrapper for dm-writeback use a command.
Please you can share the command used when creating writecache caches ?
Only for information and understand anothers details in memory management.
Only reporting all above for your and others users.
Have a nice day and thanks for creating rapiddisk amazing utility.
The text was updated successfully, but these errors were encountered: