The officially official Devuan Forum!

You are not logged in.

#1 2021-06-09 22:53:53

DevuanUser345
Member
Registered: 2021-06-09
Posts: 14  

[SOLVED] Package: tuned, not working

Hi guys.

First of all. Great distro. Good job. After changing yesterday from debian to devuan I have to tell, devuan feels like a breeze. All is running smooth. Everything is clear structured.

Everything is running so far except a package I have used before called: tuned

Tuned is a daemon that uses udev to monitor connected devices and statically and dynamically tunes system settings according to a selected profile. Tuned is distributed with a number of predefined profiles for common use cases like high throughput, low latency, or powersave. It is possible to modify the rules defined for each profile and customize how to tune a particular device. To revert all changes made to the system settings by a certain profile, you can either switch to another profile or deactivate the tuned service.

Unfortunately this package is installable but not working.
Using the tool tuned-adm to set the desired profile you receive a message, that it's not possible.

Any idea how to fix it or is this packaged too systemd based?
I don't think it is so, as cpu govenor and kernel dynamic settings are not dependent on systemd, AFAIK.

Thank you
Regards
DU345

Offline

#2 2021-06-09 23:29:09

golinux
Administrator
Registered: 2016-11-25
Posts: 3,316  

Re: [SOLVED] Package: tuned, not working

It is in the repos and not on the banned packages list.  So the issue lies elsewhere.  Hopefully someone will have the answer.

Online

#3 2021-06-09 23:50:26

GlennW
Member
From: Brisbane, Australia
Registered: 2019-07-18
Posts: 644  

Re: [SOLVED] Package: tuned, not working

Hi, at the risk of stating the obvious, ...

Have you tried to start the program from a command line? I find it allows me to see any errors in the messages.

Based on golinux's post about the repo and banned list, this would be my next check.

hope this helps


pic from 1993, new guitar day.

Offline

#4 2021-06-10 11:14:43

DevuanUser345
Member
Registered: 2021-06-09
Posts: 14  

Re: [SOLVED] Package: tuned, not working

I touched this thing a little bit like a noob before. Now i made it run. As "tuned" is directly from redhat they are banning init.d scripts in favour of systemd and so "tuned" does not provide any. Therefore the daemon didnt start and so also the tuned-adm daemon control tool didnt work.

So based on this facts i wrote the init.d script on my own. by the way the first init.d script i have written so far. i think its fine. please take a look and enjoy in case you need it:

#! /bin/sh
#
# tuned init.d script
### BEGIN INIT INFO
# Provides:          tuned
# Required-Start:    $remote_fs $syslog
# Required-Stop:     $remote_fs $syslog
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: tuned daemon
# Description:       Daemon for monitoring and adaptive tuning of
#                    system devices.
### END INIT INFO

PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/sbin/tuned
NAME=tuned
DESC="Adaptive tuning daemon"
DAEMON_OPTS="-d -l -P"

. /lib/lsb/init-functions

# Include tuned defaults if available
if [ -f /etc/default/tuned ] ; then
        . /etc/default/tuned
fi

DAEMON_OPTS="$DAEMON_OPTS $OPTIONS"

test -x $DAEMON || exit 0

set -e

ret=0
case "$1" in
  start)
        log_daemon_msg "Starting $DESC" "$NAME"
        start-stop-daemon --start --quiet -u 0 --exec $DAEMON -- $DAEMON_OPTS || ret=$?
        if [ "$ret" = 1 ]; then
                log_progress_msg "already running"
                ret=0
        fi
        log_end_msg $ret
        ;;
  stop)
        log_daemon_msg "Stopping $DESC" "$NAME"
        start-stop-daemon --stop --retry 1 --quiet -u 0 --exec $DAEMON || ret=$?
        if [ "$ret" = 1 ]; then
                log_progress_msg "not running"
                ret=0
        fi
        log_end_msg $ret
        ;;
  reload|force-reload)
        log_daemon_msg "$DESC" "Reloading configuration files"
        start-stop-daemon --stop --signal 1 --quiet -u 0 --exec $DAEMON || ret=$?
        log_end_msg $ret
        ;;
  restart)
        log_daemon_msg "Restarting $DESC" "$NAME"
        start-stop-daemon --stop --oknodo --retry 1 --quiet -u 0 --exec $DAEMON && \
        start-stop-daemon --start --quiet -u 0 --exec $DAEMON -- $DAEMON_OPTS || ret=$?
        log_end_msg $ret
        ;;
  status)
        status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
        ;;
  *)
        N=/etc/init.d/$NAME
        log_success_msg "Usage: $N {start|stop|restart|reload|force-reload|status}" >&2
        exit 1
        ;;
esac

exit 0

Last edited by DevuanUser345 (2021-06-10 12:45:43)

Offline

#5 2021-06-10 13:11:52

Altoid
Member
Registered: 2017-05-07
Posts: 1,581  

Re: [SOLVED] Package: tuned, not working

Hello:

DevuanUser345 wrote:

... "tuned" is directly from redhat they are banning init.d scripts ...
... so "tuned" does not provide any.
... daemon didnt start ...
... the tuned-adm daemon control tool didnt work.

This is (I suppose) mainly for a portable system, so I don't have any use for it it.
But if this is so and there isn't a good reason for this (ie: Devuan package for tuned without the proper scripts) maybe it should not be in the repository.

DevuanUser345 wrote:

... wrote the init.d script on my own.
... first init.d script i have written so far.

Good going! 8^D !
You may want to consider reporting this to those taking care of the packaging at Devuan HQ.
Maybe it was just a slip-up on their behalf, they do have a lot o their hands.

Thanks a lot for your effort.

Best,

A.

Offline

#6 2021-06-10 14:00:09

DevuanUser345
Member
Registered: 2021-06-09
Posts: 14  

Re: [SOLVED] Package: tuned, not working

As there is a desktop mode, im not sure if its only for portable systems. Im not even sure if there is really a change or difference by changing the profiles. I feel like system works faster by using profile: throughput-performance. Thatfore im using it.

Check out the available profiles:

Available profiles:
- accelerator-performance     - Throughput performance based tuning with disabled higher latency STOP states
- atomic-guest                - Optimize virtual guests based on the Atomic variant
- atomic-host                 - Optimize bare metal systems running the Atomic variant
- balanced                    - General non-specialized tuned profile
- cpu-partitioning            - Optimize for CPU partitioning
- default                     - Legacy default tuned profile
- desktop                     - Optimize for the desktop use-case
- desktop-powersave           - Optmize for the desktop use-case with power saving
- enterprise-storage          - Legacy profile for RHEL6, for RHEL7, please use throughput-performance profile
- hpc-compute                 - Optimize for HPC compute workloads
- intel-sst                   - Configure for Intel Speed Select Base Frequency
- laptop-ac-powersave         - Optimize for laptop with power savings
- laptop-battery-powersave    - Optimize laptop profile with more aggressive power saving
- latency-performance         - Optimize for deterministic performance at the cost of increased power consumption
- mssql                       - Optimize for MS SQL Server
- network-latency             - Optimize for deterministic performance at the cost of increased power consumption, focused on low latency network performance
- network-throughput          - Optimize for streaming network throughput, generally only necessary on older CPUs or 40G+ networks
- optimize-serial-console     - Optimize for serial console use.
- oracle                      - Optimize for Oracle RDBMS
- postgresql                  - Optimize for PostgreSQL server
- powersave                   - Optimize for low power consumption
- realtime                    - Optimize for realtime workloads
- realtime-virtual-guest      - Optimize for realtime workloads running within a KVM guest
- realtime-virtual-host       - Optimize for KVM guests running realtime workloads
- sap-hana                    - Optimize for SAP HANA
- sap-netweaver               - Optimize for SAP NetWeaver
- server-powersave            - Optimize for server power savings
- spectrumscale-ece           - Optimized for Spectrum Scale Erasure Code Edition Servers
- spindown-disk               - Optimize for power saving by spinning-down rotational disks
- throughput-performance      - Broadly applicable tuning that provides excellent performance across a variety of common server workloads
- virtual-guest               - Optimize for running inside a virtual guest
- virtual-host                - Optimize for running KVM guests

Im not sure if it should be in the repo or not, because im not skilled enough to decide it. As i see it adjust kernel parameters and other settings (independent from systemd), so i think there is no reason to remove it from the repo. So far everything works good. Logfiles looks okay. No complaints.

As i see all packages (buster, bullseye, sid) do not have a sysvinit script.

Offline

#7 2021-06-10 14:16:08

Altoid
Member
Registered: 2017-05-07
Posts: 1,581  

Re: [SOLVED] Package: tuned, not working

Hello:

DevuanUser345 wrote:

As there is a desktop mode ...

Well ...
The Linux kernel has quite a few things enabled by default which (imho) are not needed, save in a server setup.
eg: apparmor, etc.

DevuanUser345 wrote:

... not sure if it should be in the repo or not ...
... not skilled enough ...

Nonsense ...
You were skilled enough to write a script to make it work, the first time around.  8^D

That's certainly not my case.
I would not have been able to use a package installed from the Devuan repository due to its (apparently) missing a vital part.

So ...
Does it make sense that it be in the repository if it is (apparently) incomplete?

DevuanUser345 wrote:

... all packages (buster, bullseye, sid) do not have a sysvinit script.

Then it is a very good thing that you discovered this, wrote and shared the necessary script.
Like I said earlier, maybe it is a slip-up on behalf of the packagers.

Best,

A.

Offline

#8 2021-06-10 17:33:14

Head_on_a_Stick
Member
From: London
Registered: 2019-03-24
Posts: 3,125  
Website

Re: [SOLVED] Package: tuned, not working

DevuanUser345 wrote:

As "tuned" is directly from redhat they are banning init.d scripts in favour of systemd and so "tuned" does not provide any.

^ This is incorrect: https://github.com/redhat-performance/t … init/tuned

EDIT: perhaps submit a bug report to Debian and ask for the init script to be included in the package.

It's already in their sources: https://salsa.debian.org/debian/tuned/- … init/tuned

Last edited by Head_on_a_Stick (2021-06-10 17:35:03)


Brianna Ghey — Rest In Power

Offline

#9 2021-06-10 18:47:12

DevuanUser345
Member
Registered: 2021-06-09
Posts: 14  

Re: [SOLVED] Package: tuned, not working

Ok, then im sorry. I searched google for it. I couldnt find it. Even in the file list of the debs:
https://packages.debian.org/buster/all/tuned/filelist

(maybe we should move it to the hardware & system configuration category, as i found out later, i have chosen the wrong or - or delete it)

Last edited by DevuanUser345 (2021-06-10 20:06:02)

Offline

#10 2021-06-11 09:16:39

DevuanUser345
Member
Registered: 2021-06-09
Posts: 14  

Re: [SOLVED] Package: tuned, not working

I contacted the package maintainer and he answered me, that he found the (maybe unmaintained) tuned init script on github/redhat-performance/tuned too, but he would prefer not to ship it in debian was he is not able to debug things as he does not have sysvinit machines around.

He suggests that Devuan add it as a local change to the package.

Offline

#11 2021-06-11 13:13:02

Altoid
Member
Registered: 2017-05-07
Posts: 1,581  

Re: [SOLVED] Package: tuned, not working

Hello:

DevuanUser345 wrote:

... he would prefer not to ship it in debian was he is not able to debug things as he does not have sysvinit machines around.

This is where it all starts.
It's a sign of Things To Come©.    ---> 8^/

A.

Last edited by Altoid (2021-06-11 13:15:50)

Offline

#12 2021-06-11 13:53:37

Head_on_a_Stick
Member
From: London
Registered: 2019-03-24
Posts: 3,125  
Website

Re: [SOLVED] Package: tuned, not working

DevuanUser345 wrote:

he would prefer not to ship it in debian was he is not able to debug things as he does not have sysvinit machines around

Hmm. Understandable but disappointing. At least this thread has a link to the init script so that people can add it manually.


Brianna Ghey — Rest In Power

Offline

#13 2021-06-14 13:12:51

bgstack15
Member
Registered: 2018-02-04
Posts: 205  

Re: [SOLVED] Package: tuned, not working

Somebody had mentioned a sysvinit orphaned scripts package that might be in Debian? Maybe this script can go in there.


This space intentionally left blank.

Offline

#14 2021-06-16 16:36:57

DevuanUser345
Member
Registered: 2021-06-09
Posts: 14  

Re: [SOLVED] Package: tuned, not working

Hmm. Understandable but disappointing. At least this thread has a link to the init script so that people can add it manually.

Yes but after replacing my own tuned-init script with the original from github i found out that the original has a lot of errors/mistakes

Pidfile is not correct, variable $TUNED is not available -> should be $NAME ..

Offline

Board footer