public inbox for development@lists.ipfire.org
 help / color / mirror / Atom feed
From: Robin Roevens <robin.roevens@disroot.org>
To: development@lists.ipfire.org
Subject: Re: [PATCH] collectd: Do not sync
Date: Tue, 30 Jan 2024 20:50:02 +0100	[thread overview]
Message-ID: <e7c6bffc3ac66756d89e41ca7f0732e9756ee14c.camel@sicho.home> (raw)
In-Reply-To: <20240130180152.4161491-1-michael.tremer@ipfire.org>

[-- Attachment #1: Type: text/plain, Size: 2413 bytes --]

Hi Michael, all

First, this mail does not contain critique, I'm only trying to learn,
if I'm wrong. But I think your remark about fixing hardware is not
correct?

In my understanding, sync synchronizes the not-yet-written data
currently in kernel managed cache memory (hence in volatile system
memory) to permanent storage. 
Normally storage hardware also has its own cache, which I presume you
are referring to, but I don't think sync cares or even knows about that
and that is/should be handled within the hardware itself. 
As soon as storage hardware returns an ACK on a write operation, sync
is happy. Not actually guaranteeing any physical write, only that all
to-be-written data is actually delivered to the storage hardware. 

I do agree that a (full) sync there is probably overkill. The content
of the config will be available to the collectd daemon whether it is
actually written on disk or still in cache, so no sync needed. 
If the server crashes/powercycles/... on that point, I think a possible
commented line that should be uncommented in that config is then
probably of the least concern.
On the other hand, a sync that blocks forever, is probably more of an
indicator that the hardware should be fixed, as this would mean sync
doesn't get all the ACK's it expects.

Please correct me if I'm wrong.


Regards
Robin

Michael Tremer schreef op di 30-01-2024 om 18:01 [+0000]:
> Calling a global sync operation manually is generally a bad idea as
> it
> can block for forever. If people have storage that does not retain
> anything that is being written to it, they need to fix their
> hardware.
> 
> Signed-off-by: Michael Tremer <michael.tremer(a)ipfire.org>
> ---
>  src/initscripts/system/collectd | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/src/initscripts/system/collectd
> b/src/initscripts/system/collectd
> index bb8a2f54f..56b799d56 100644
> --- a/src/initscripts/system/collectd
> +++ b/src/initscripts/system/collectd
> @@ -146,9 +146,6 @@ case "$1" in
>  			sed -i -e "s|^#LoadPlugin swap|LoadPlugin
> swap|g" /etc/collectd.conf
>  		fi
>  
> -		# sync after config update...
> -		sync
> -
>  		if [ $(date +%Y) -gt 2011 ]; then
>  			boot_mesg "Starting Collection daemon..."
>  			/usr/sbin/collectd -C /etc/collectd.conf
> -- 
> 2.39.2
> 
> 

-- 
Dit bericht is gescanned op virussen en andere gevaarlijke
inhoud door MailScanner en lijkt schoon te zijn.


  reply	other threads:[~2024-01-30 19:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-30 18:01 Michael Tremer
2024-01-30 19:50 ` Robin Roevens [this message]
     [not found] <f0d193df606966cb12fa12d98d80f8799f898532.camel@sicho.home>
2024-02-01 16:32 ` Michael Tremer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e7c6bffc3ac66756d89e41ca7f0732e9756ee14c.camel@sicho.home \
    --to=robin.roevens@disroot.org \
    --cc=development@lists.ipfire.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox