Git Product home page Git Product logo

Comments (8)

djh42 avatar djh42 commented on June 11, 2024 3

Actually, I just came across this project and was wondering what this is all about. I mean, I know that people are trying to avoid disk-writes on their SSDs and SD-Cards, but AFAIK that is completely possible with /etc/systemd/journald.conf (e.g. Storage=volatile).

It's about the opposite. The purpose of the project as a whole is to stop all applications, not just journald, from logging to SD card. The purpose of this discussion is to request an exception so that journald DOES log to SD card, since it understands how to minimise writes to the card anyway, and since it can be important to have a persistent log of the last messages in a system crash.

from log2ram.

djh42 avatar djh42 commented on June 11, 2024 1

My goal is to avoid SDcart write, and I don't know how journald manage that

It already has a sensible mechanism to minimise writes, whilst also guaranteeing that as much as possible makes it to disk in the event of a system crash. That's why I believe /var/log/journal should be bound to persistent storage. Full details are at https://www.freedesktop.org/software/systemd/man/journald.conf.html but basically it writes to disk at a configurable period - SyncIntervalSec - that defaults to 5 minutes but can of course be adjusted by the user.

from log2ram.

arendtio avatar arendtio commented on June 11, 2024 1

@azlux Actually, I just came across this project and was wondering what this is all about. I mean, I know that people are trying to avoid disk-writes on their SSDs and SD-Cards, but AFAIK that is completely possible with /etc/systemd/journald.conf (e.g. Storage=volatile).

from log2ram.

azlux avatar azlux commented on June 11, 2024

Hi @djh42 .

I will try to answers all your questions:

  1. Log2ram already use a bind mount.
  2. I didn't know about the systemd-journal-flush.service, I will check that. Is there are any conflict to use it the way I've done it ?
  3. Apache2 was an old example when you have others services. Since few mounth, Log2Ram start before the journal, It's now useless. Almost every service start after the journal service.

Az

from log2ram.

djh42 avatar djh42 commented on June 11, 2024

Log2ram already use a bind mount.

For /var/log/journal? To place it on persistent storage.

Is there are any conflict to use it the way I've done it ?

Not as far as I know, but I'm no expert.

Apache2 was an old example when you have others services. Since few mounth, Log2Ram start before the journal, It's now useless. Almost every service start after the journal service.

I'm not sure what you mean here. You mean the before=apache2 is useless? If so, I think that's good news. :)

from log2ram.

azlux avatar azlux commented on June 11, 2024

Your right, /var/log/journal isn't on Disk. But I don't like place it on persistent storage.
My goal is to avoid SDcart write, and I don't know how journald manage that.

from log2ram.

Barabba11 avatar Barabba11 commented on June 11, 2024

May I add here a question?
Do ram2log write enterely the ram log folder into the log.hdd folder on sd every hour? I mean, does it overwrite all files including the pnes that aren't untuched, or only the ones that have more recent modified time (from the last backup, the last hour, as default). Shortly, does ram2log reduces the writes on SD avoiding to rewrite files that haven't been modified?
Thank you

from log2ram.

azlux avatar azlux commented on June 11, 2024

Hi,
If you check this line https://github.com/azlux/log2ram/blob/master/log2ram#L21
You will see I only sync the modified file.

The main issue with SDcart is to have constant write, file are always open into the system.

You can move the cron from hourly to daily if you want (Or remove it, for no cron write, data will be write on Raspberry stop/start)

from log2ram.

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.