You are not logged in.

#1 2014-04-15 13:06:34

BradPJ
Member
Registered: 2013-06-05
Posts: 25

Systemd Boot Time Slows Down Over Time

Hi, I'm not really sure where to post this but this seems like the most appropriate place though a few others could potentially be the correct place. I'm not too sure.

Recently I had been experiencing slow boot times. If you look in my post history you might see that I have always experienced slow down regarding boot time and have asked several times how to keep Arch Linux 'clean'. Indeed this question was rather silly as I didn't have any evidence to back up why I thought my boot time was slowing down. Every time prior to this I reinstalled when the issue got too bad. This is, of course, a silly way to operate. I have found other people with a similar problem to mine. The blame was always with NetworkManager.

https://bugs.archlinux.org/task/33791
https://bbs.archlinux.org/viewtopic.php?id=152261&p=2

I think I have seen other examples of this over time, although people have found other workarounds or fixes, I don't believe I have seen this one anywhere on the Arch forums or Wiki . I can't find the source but I know it was the opensuse forums. The solution is to set the max file size limit for journald. My journal was now approaching 2GB and NetworkManager was taking around 17-20 seconds to boot, brining my userspace total to around 30 seconds. Sometimes this took over 1 minute. Polkit also saw long boot times. After removing the journal and putting a file size limit of 50M for my journal NetworkManager now takes 2-3 seconds to boot with only 9 seconds in userspace.

The person who listed the bug on my first link said they reinstalled Arch Linux in order to fix it, I think this may of been the cause of that as well since the system was running fine after that.

I want to post this on the Arch Wiki under troubleshooting in case it is a possible fix and if people have been having similar issues, but:

1) I know that recommending to remove the journal is not good advice. Where should it be copied too and for how long would it be necessary to hold a copy?

2) I can't be sure that this fix will work for anyone else yet. This is just from my own experience. Does this still make it acceptable to post onto the Wiki? I guess not since it hasn't been tested against other people.

3) Where would this belong on the Wiki? Systemd, NetworkManager, Improve Boot Performance, or even a note on the Beginners Guide to set a journal limit at the begininng of the install?

Sorry for so many questions. I just don't want to edit the Wiki without being sure that this is acceptable advice. I mean, this may not even be a fix and may just be a peculiarity of my system.

Thanks for your time, I know it's a bit long winded!

EDIT: Added bold text.

Last edited by BradPJ (2014-04-15 13:09:03)

Offline

#2 2014-04-15 14:11:04

Stebalien
Member
Registered: 2010-04-27
Posts: 1,237
Website

Re: Systemd Boot Time Slows Down Over Time

BradPJ wrote:

1) I know that recommending to remove the journal is not good advice. Where should it be copied too and for how long would it be necessary to hold a copy?

2) I can't be sure that this fix will work for anyone else yet. This is just from my own experience. Does this still make it acceptable to post onto the Wiki? I guess not since it hasn't been tested against other people.

3) Where would this belong on the Wiki? Systemd, NetworkManager, Improve Boot Performance, or even a note on the Beginners Guide to set a journal limit at the begininng of the install?

1. The journal is only useful if it is read and no one will read through 2GiBs of logs. While keeping an old journal around can still be useful to determine when something went wrong, keeping logs indefinitely is only really necessary on security critical servers.
2. See who replies to this thread.
3. Systemd > Troubleshooting. I doubt that this is NetworkManager specific.


Steven [ web : git ]
GPG:  327B 20CE 21EA 68CF A7748675 7C92 3221 5899 410C
Do not email: honeypot@stebalien.com

Offline

#3 2014-04-17 15:03:18

BradPJ
Member
Registered: 2013-06-05
Posts: 25

Re: Systemd Boot Time Slows Down Over Time

That's great. Thanks for the reply. If no one else does reply how else could I find out how if this is a fix for other people? I assume it would be advisable to leave it from the Wiki until other people have confirmed it as a fix. Would checking the forums, waiting for other people with similar problems and suggest this as a solution be a good way to do it?

Last edited by BradPJ (2014-04-17 15:20:02)

Offline

#4 2014-04-17 19:37:29

lahwaacz
Wiki Admin
From: Czech Republic
Registered: 2012-05-29
Posts: 749

Re: Systemd Boot Time Slows Down Over Time

The recommendation to set a size limit to the journal is not a troubleshooting, but a regular post-installation tip. There could be a discussion about the size itself, from my experience 64MB is a sane value (I mean for the whole journal, i.e. not per-file limit).

As for NetworkManager: I don't see any way how a service start-up time could depend on log size...

Last edited by lahwaacz (2014-04-17 19:40:09)

Offline

#5 2014-04-18 07:37:08

BradPJ
Member
Registered: 2013-06-05
Posts: 25

Re: Systemd Boot Time Slows Down Over Time

Yeah I know it seems weird for NetworkManager to slow down when the Journal gets high but I have had this problem many times now and only reinstalling has worked (which would of course give me a new journal). This is the first time that when I have experienced this slow down (which has ALWAYS been because of NetworkManager according to systemd-analyze) that I have managed to properly reduce the boot time again.

I'll try and find the discussion on the opensuse forums when I'm back at home. I'm away for a few days at the moment so don't have the time to be able to find it.

Last edited by BradPJ (2014-04-18 07:37:27)

Offline

#6 2014-04-24 12:31:08

BradPJ
Member
Registered: 2013-06-05
Posts: 25

Re: Systemd Boot Time Slows Down Over Time

Okay so I found two links:

http://forums.opensuse.org/showthread.p … low-bootup
https://forums.opensuse.org/showthread. … d-laptop-3

The first one links to the second one. In the second one they are discussion removing the log and setting a file size. In the first the OP gets linked to the discussion and says that his boot time was halved by removing the log and setting a file size limit.

EDIT: Okay so I added it to the Wiki. It fixed the problem for me and following them links shows that it has helped other people so it does seem to be a fix. I hope I done everything right, this is my first time editing the Wiki. I added it under Systemd, Troubleshooting.
https://wiki.archlinux.org/index.php/Sy … _over_time

Last edited by BradPJ (2014-04-24 16:00:42)

Offline

Board footer

Powered by FluxBB