Giter Club home page Giter Club logo

Comments (6)

ikaruswill avatar ikaruswill commented on June 16, 2024 1

Alright thanks for your inputs. I'll study the code by Armbian and perhaps find out what they're doing right, and maybe open a PR if I find anything.

from zram-config.

ecdye avatar ecdye commented on June 16, 2024

Is there any way to avoid locking up the file system?

When it becomes full, no. This is standard Linux behavior to make a FS read-only when it has no more space available. My suggestions to you would be to reduce the logging to the /var/log/container directory that you mentioned in your post or by increasing the memory allocation to that directory.

which leaves a zram device (e.g. zram0)

This is a issue that I cannot solve, I wish I could but because of the nature of it I cannot.

The root of the issue is that zramctl will NOT remove any zram device that is in use in any way shape or form and when you restart zram while your Kubernetes cluster is running it will not reset because it thinks that it is still in use. It has been very frustrating and I wish it was not how it behaved but I can't do anything about it.

Outside of increasing your memory allocation there is not much you can do as zstd is about as good as it gets for zram compression right now.

I hope this makes sense, please let me know if you have any more questions.

from zram-config.

ikaruswill avatar ikaruswill commented on June 16, 2024

I see. Thanks for your detailed answer Ethan. I guess there's no other way for now than to just increase the memory allocation.

Actually I wonder at times how the guys at Armbian managed to do it. I have a bunch of nodes running Armbian and they've survived on the default 50MB zstd for as long as I remember. I tried digging around but couldn't see why. They have standard log rotation schedules and all. Would appreciate some help with studying their implementation.

Also this may be standard linux behavior, but is it expected that the space used as displayed in zramctl is not freed up upon deletion of some files? My guess is that this has something to do with OverlayFS right?

from zram-config.

ecdye avatar ecdye commented on June 16, 2024

My guess is that this has something to do with OverlayFS right?

Without going to look and make sure, that sounds right. It is likely because of the way overlayFS handles file deletes.

from zram-config.

polarathene avatar polarathene commented on June 16, 2024

Not familiar with what's going on with the feature here (I don't use it), but I did come across this regarding using a file system mount on zram instead of using zram for swap:

When files are removed, Zram doesn't remove the compressed pages on memory because it's not notified that the space is not used for data anymore.
The discard option performs discard when a file is removed. If you use the discard mount option Zram will be notified about the unused pages and will resize accordingly.

Though I'm not sure if that's of any relevance with overlayfs involved?

I have seen mem_limit mentioned in this project README and issues, if that's being applied with some default other than 0, then that could contribute to a lock up in my experience (only with zram and swap), whereas with no mem_limit set, OOM triggered to keep the system responsive.

from zram-config.

yutayu avatar yutayu commented on June 16, 2024

Use zram only for swap.
file size in zramswap is dynamic.

from zram-config.

Related Issues (20)

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.