I think I figured out an update safe way. In case anyone else needs this, 
here's how I solved it:

Create a new directory in the `/etc` systemd configuration folder. This 
directory will store our `bareos-fd` custom configuration:

$: sudo mkdir /etc/systemd/system/bareos-fd.service.d

Overwrite the default process priority by setting the *Nice* configuration 
option in a new file, stored in the created custom configuration directory:

$: sudo vi /etc/systemd/system/bareos-fd.service.d/nice.conf
# Lower the priority of bareos-fd to
# mitigate user performance issues
# in case the backup needs to run
# during work hours.

[Service]
Nice=10

Force systemd to reload its configuration files and restart bareos-fd:

$: sudo systemctl daemon-reload
$: sudo systemctl restart bareos-fd

Check if the new niceness level of 10 is applied (it's the `NI` column):

$: ps -el | grep bareos-fd
# F S   UID   PID   PPID  C PRI  NI  ADDR SZ    WCHAN  TTY  TIME CMD
1 S     0     25701 1     0 90   10  -    44578 poll_s ?    00:00:00 bareos-
fd




Am Dienstag, 30. Juli 2019 08:55:33 UTC+2 schrieb Marco Betschart:
>
> Hi @all!
>
> I'm currently experiencing users claiming performance issues. The root 
> cause is bareos-fd, which sometimes needs to run during work hours if 
> something went wrong with the backup during the night. To mitigate this, I 
> was planning to set the niceness level of bareos-fd to 10, which basically 
> just lowers its priority.
>
> I was thinking of:
> 1. Removing the symlink in /etc/systemd/system/bareos-filedaemon.service 
> which points to /usr/lib/systemd/system/bareos-fd.service
> 2. Copy the original file to the symlink location
> 3. Add the NICE=10 setting to the copied file
>
> While this may work, I'm wondering if theres a better way to stay update 
> safe?
>
> Thanks in advance,
>   Marco
>
>
> BTW: Talking about CentOS v7.x here.
>

-- 
You received this message because you are subscribed to the Google Groups 
"bareos-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/bareos-users/9c8b275f-2647-41f5-8880-95d18d5a5485%40googlegroups.com.

Reply via email to