Skip to main content

Tune system performance

 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

Popular posts from this blog

Linux basic commands

 Linux basic commands: du  -sh  *  |  sort  -h  -r   |  head  -n  40  :    list out first 40 files in the directory that are taking more space in the directory.  cd : change directory Is-l listing the items in long listing format  pwd : print working directory Is-I format: type :no of links:owner : group:size :month :day :time :name cd/: go to/directory whoami: tells us by which username we are logged in. touch jerry: creates the file named jerry in present working directory. cp jerry lex: copy the content of jerry file and paste it to lex file. vi text1: creates the file text1 and open it in vi editor mkdir superman: creates the directory called superman mkdir abc def  : creates 2 folder in one command. touch filename wont work in /etc/ folder if logged in by normal account. man cp: shows manual for cp command. echo "india is my country"> file1 puts the text in file1. rm filename: remove the filename  mv lex luther renames the file from lex to luther  mv luther /h

patching tasks

 Patching a Linux system is a critical task to ensure that the system remains secure, stable, and up-to-date with the latest features and fixes. Here’s a comprehensive guide to the tasks involved in Linux patching: 1. Pre-Patching Preparation Backup System : Ensure you have a full system backup, including critical data, configuration files, and applications. Test the backup to verify its integrity. Check Disk Space : Verify that you have enough disk space, particularly on /var , /tmp , and /boot partitions. Review Current Patch Level : Determine the current patch level and installed packages using package management tools like yum , apt , dpkg , or rpm . Check System Logs : Review system logs to identify any issues that might affect the patching process. Test in a Staging Environment : If possible, apply patches in a staging environment that mirrors production to identify potential issues. Notify Stakeholders : Inform stakeholders about the scheduled maintenance window and expected do