From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id OWwlAg6zm2KlNAAAbAwnHQ (envelope-from ) for ; Sat, 04 Jun 2022 21:31:26 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id 6GAvAA6zm2LJ1QAAG6o9tA (envelope-from ) for ; Sat, 04 Jun 2022 21:31:26 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id F1BD2180A for ; Sat, 4 Jun 2022 21:31:24 +0200 (CEST) Received: from localhost ([::1]:57316 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nxZUZ-0003M1-Qx for larch@yhetil.org; Sat, 04 Jun 2022 15:31:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57940) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nxZUE-0003L8-JW for bug-guix@gnu.org; Sat, 04 Jun 2022 15:31:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:37548) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nxZUE-0001wH-Ae for bug-guix@gnu.org; Sat, 04 Jun 2022 15:31:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nxZUE-0000iY-11 for bug-guix@gnu.org; Sat, 04 Jun 2022 15:31:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#55488: bug#55707: syslogd logging kernel messages slowly? Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sat, 04 Jun 2022 19:31:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55488 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Luis Felipe Cc: 55707@debbugs.gnu.org, 55488@debbugs.gnu.org Received: via spool by 55488-submit@debbugs.gnu.org id=B55488.16543710412726 (code B ref 55488); Sat, 04 Jun 2022 19:31:01 +0000 Received: (at 55488) by debbugs.gnu.org; 4 Jun 2022 19:30:41 +0000 Received: from localhost ([127.0.0.1]:59676 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nxZTt-0000hs-44 for submit@debbugs.gnu.org; Sat, 04 Jun 2022 15:30:41 -0400 Received: from eggs.gnu.org ([209.51.188.92]:44626) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nxZTr-0000hS-MW; Sat, 04 Jun 2022 15:30:39 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:58148) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nxZTm-0001sK-Bq; Sat, 04 Jun 2022 15:30:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=PstkI39Rbr+man4DnPboNKheykNfPMY6YhZz6iEmTwY=; b=eYOD2Y+xCnAF3tY11Fy7 rwCDC6JbbGExiFh3ErsWAGKsmX8+oQoLWCphLpLtFXZNaZSP5lVpUwu91ZytGMwbQzso85Z4YrCGR sO3Ncoq3zKtVlrYaP0E2SJ4ckkRODwT8lSJcXVEg/Egwrs8X9cIObAN8HQeFIghPXzxXl8Rg+S4F3 mGTRY+B2KwFMEADGsxniEBbPxoVv9pBX7QP2zDAD5bPSCE0UrRpxT0rPU8G/vavgSu5t9syOiWQ2Z 6qVLtoAOqPOWVn4VLpmZP6TTlvjSmRG/Crskv3sFaMdbpeWgd/5cNAT3CAANbJ3N3ts+juJ9zH2G5 cu86KictnwAEYQ==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:64122 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nxZTf-0006Ln-0q; Sat, 04 Jun 2022 15:30:33 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <-ERAqngkTp_rn5o9bawg5LQaV0bIQaYkKKbA55nOcyAHmZA88EsuHxKdIrt7k6pauSeGlZH47uE68OXt-xpG_z6yZPs_VCu1qLw_N3Yp9WY=@protonmail.com> <87k0aj44dd.fsf@gnu.org> <87ilpmyrr1.fsf@gnu.org> <87sfootayu.fsf@gnu.org> <87o7zalqxw.fsf@gnu.org> <87wndxfjcw.fsf@gnu.org> <878rqcfjcn.fsf@gnu.org> Date: Sat, 04 Jun 2022 21:30:24 +0200 In-Reply-To: <878rqcfjcn.fsf@gnu.org> ("Ludovic =?UTF-8?Q?Court=C3=A8s?="'s message of "Sat, 04 Jun 2022 19:07:20 +0200") Message-ID: <87sfokdy5r.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1654371085; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=PstkI39Rbr+man4DnPboNKheykNfPMY6YhZz6iEmTwY=; b=Txi7ACpy+c5oEHuGYSgl9Nb38sApNVVR00mNrn9/nQnW65+GDrNIylVnLLRTwF4XkZAZ75 sMu6CUH+o9HnMM/NY0V1jY0vKl7F+QvDOCC/spqG1GHusO/S+LoNwgU9/BVGCovh9SxXHh OYQYlBxnhAZn+1pcrDY89xc7KiXAPUwb5UjFGHSg9OFew+orJSmJS6AMOnri5Obiyw+7E0 7+V2059DK3Afu67f8MzqVHboRbZHe1HZxQSlpPSVFLAHCPBwiuei66Sd9qVJb+xDzPfvnu cIGhruQsz8XxaTZU9nD3A8+4iWrDvTaWnZ5+zEAJ7L8DY4YPcy3JBaXc+NRppQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1654371085; a=rsa-sha256; cv=none; b=h7VYt0dKhHEAsy9OpK1jASzXaD6Uffsb/hMDScK199/umzGOswbaopn1dvtuFDCJByoVvD Ngi9p0kgOg9Xsd6idkY4DR1u5rZLSSrLm6Sdtt/nXxEIRy4Ozohqbjav5wzt3OzuGmomRH 3IUW7+hFSXFVWMaVikoP5ELdWABmtmJh+Iq9LJyV8vL1SD8AWWQQsWSIfeW4DHRr1yxxUp GqE1UCMRDO59UwH3t8EJiAzKqLBEstQtGiKAJG/vcGXsEQCgc3gozWUfmWLFmbZ+yiPbAW SKg2Fu79nltnwmMF9Q6aty4XH/wiR9zaF7Sjgr8tQUHeWC0Vy1oPw9B7OdNzVw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=eYOD2Y+x; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -4.02 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=eYOD2Y+x; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: F1BD2180A X-Spam-Score: -4.02 X-Migadu-Scanner: scn0.migadu.com X-TUID: 2juqFsrLO/hh Ludovic Court=C3=A8s skribis: > 2. Explicitly disable syncing for some of the log files by prepending > a hyphen right before the file name in syslogd.conf (info > "(inetutils) syslogd invocation"). Tried this (in addition to =E2=80=98fdatasync=E2=80=99): --8<---------------cut here---------------start------------->8--- (define %default-syslog.conf (plain-file "syslog.conf" " # Log all error messages, authentication messages of # level notice or higher and anything of level err or # higher to the console. # Don't log private authentication messages! *.alert;auth.notice;authpriv.none -/dev/console # Log anything (except mail) of level info or higher. # Don't log private authentication messages! *.info;mail.none;authpriv.none /var/log/messages *.=3Ddebug -/var/log/debug # Same, in a different place. *.info;mail.none;authpriv.none -/dev/tty12 # The authpriv file has restricted access. authpriv.* /var/log/secure # Log all the mail messages in one place. mail.* -/var/log/maillog ")) --8<---------------cut here---------------end--------------->8--- In addition to the hyphens, notice that now only debugging info goes to /var/log/debug (previously everything going to /var/log/messages would also go to /var/log/debug, which is kinda silly). This halves the number of =E2=80=98fdatasync=E2=80=99 calls and thus double= s the throughput, but we=E2=80=99re still spending ~0.1s on =E2=80=98fdatasync=E2= =80=99 for each line, which is slow. So the next solution is to not =E2=80=98fdatasync=E2=80=99 on /var/log/mess= ages either: --8<---------------cut here---------------start------------->8--- (define %default-syslog.conf (plain-file "syslog.conf" " # Log all error messages, authentication messages of # level notice or higher and anything of level err or # higher to the console. # Don't log private authentication messages! *.alert;auth.notice;authpriv.none -/dev/console # Log anything (except mail) of level info or higher. # Don't log private authentication messages! *.info;mail.none;authpriv.none -/var/log/messages # Log \"debug\"-level entries and nothing else. *.=3Ddebug -/var/log/debug # Same, in a different place. *.info;mail.none;authpriv.none -/dev/tty12 # The authpriv file has restricted access. # 'fsync' the file after each line. authpriv.* /var/log/secure # Log all the mail messages in one place. mail.* -/var/log/maillog ")) --8<---------------cut here---------------end--------------->8--- With this, the system boots much more quickly. I=E2=80=99m tempted to commit the above syslog.conf. From a look at the co= de and doc, it seems that neither rsyslog nor systemd-journald does anything like =E2=80=9Cfsync after each logged line=E2=80=9D, so the config= above sounds like a reasonable default (at any rate, the current default is definitely unreasonable on slow spinning disks). I=E2=80=99m curious to see if it fixes your other boot-up issues, timeouts = and all, Luis. Ludo=E2=80=99.