Tune system performance:
what is tuned?
Pronounced as tune-d.
Tune is for system tuning and d is for daemon.
It is a systemd service that is used to tune linux system performance.
It is installed in Centos /redhat version 7 and 8 by default.
tuned package name is tuned
The tuned service comes with predefined profiles and settings.
Based on the selected profile the tuned service automatically adjust system to get the best performance.
The tuned daemon applies system settings when the service starts or upon selection of the new tuning profile.
• Check if the tuned package has been installed:
rpm -qa | grep -i tuned
•Install the tuned package:
yum install tuned -y
•play with the tuned service:
systemctl status / enable/disable/start/stop tuned
•command to change the setting for the tuned daemon:
tuned-adm
•to check which profile is active:
tuned-adm active
•to list the available profiles:
tuned-adm list
•some of the tuned profiles given below:
balanced
desktop
throughput-performance
latency-performance
network-latency
network-throughput
powersave
oracle
virtual-guest
virtual-host
•to change to desired profile :
tuned-adm profile profile-name
•check for tuned recommendation:
tuned-adm recommend
•turn off tuned setting daemon:
tuned-adm off
.....................................................................
• Another way of keeping your system fine-tuned is by prioritizing processes through nice and renice command.
• If the server has 1 cpu then it can execute 1 process at a time as they come in first come first server while the other processes wait.
•with nice and renice commands we can make the system to give preference to certain processes than others.
• This priority can be set at 40 different levels.
• The nice level value range from -20(highest priority) to 19(lowest priority) and by default, processes inherit their nice level from their parent, which is usually 0.
•top command can be used to check the process priority.
•nice value is a user space and priority PR is the process's actual priority that is used by linux kernal. In linux system priorities are 0 to 139 in which 0-99 are for real time and 100-139 are for users.
• process priority can be viewed through ps command as well with the right Options:
ps axo pid,comm,nice,cls --sort=-nice
•To set the process priority:
nice -n # process-name
• To change te process priority
renice -n # process-name
.................. .....................................
Comments
Post a Comment