Hey, boys and girls, and welcome to Tuned System Performance Video Linux system comes fine tune by
default when you install it for the first time.
However, there are a few tweaks that can be done based on system performance and application requirements.
In this lesson, we will learn how to optimize system performance by selecting a tuning profile managed
by tuned daemon and prioritized or deprived of specific processes with nice and very nice commands.
What is tuned tuned deeper now as tune and at the end tune is for system tuning and is for Deman.
And as if you remember, Deman is something that continuously run in the background of your system.
It is system disservices that is used to tune Linux system performance.
It is installed in S.O.S RedHat version seven and eight by default.
Tuned package name is Tune D.
As its name sounds, the tuned service comes with predefined profiles and settings.
The list of profile we will be discussing in the next page based on selected profile that is given to
you by AT&T service.
It automatically adjusts system to get the best performance, for example, to you and will adjust networking
if you are downloading a large file like ISO file or something like that.
Or it will adjust iOS setting if it detects high storage, read and write.
So tune deman apply system setting when the service starts or upon selection of a new tuning profile.
So what are those profiles that are given to us by default?
When you install or when you have tuned service or daemon running, it gives you some of the predefined
profile out of the box for you on the first one is balanced D, which deals for system that require
a compromise between power saving and performance.
Desktop profile drive from the balance profile provides faster response for of interactive application
throughput performance.
Tunisa System for Maximum Throughput Latency Performance Networking Network Throughput Power Save Oracle
which are for Oracle database or application related virtual guest.
If you're running your machine as a virtual machine virtual host, tune the system for maximum performance
if it acts as a host for virtual machine.
So these are all the tune profiles they are there could be added more depending on the application.
For example, let's say if you're running SFP application on your system or any other application,
you could actually get the profile from the vendor and add that to your tune.
A system to manage it.
OK, so moving on, how do we check if tuned package has been installed?
The command is simple is R.P.M. minus key ways to query all, which will give you the list of all the
packages.
Then you could just simply put tune D.
So let's go right into our system.
I have my system open right here.
And my terminal window is already open, I had two terminal windows open, if you don't, you could
open another one because we will be testing some other commands and check it from the other terminal
anyway.
Let's start with the first window terminal and we will check if we have a package installed, which
is R.P.M. dash keyway and grep for TNT.
OK, so we got the result back and here is the package and its version of the package and is right now
it's telling me that is Enterprise Linux eight.
That's the name of the package our operating system is still on.
OK, so moving going for the down install tune package if not installed already.
So we already installed, if it didn't have it, we would have used this command.
Youm installed Yandi or for newer version, the DNF installed tuned.
Then check tuned service status if that service is running, the command is System CTL, you'll check
the status, enable it started or stop at the tune.
So let's check the status of our Cundy.
System CTL Status Deontae and right here is loaded and active running beautiful.
OK, moving on.
And to enable the tune disservice to enable at Abu Time, which we already have, so command to change,
setting foot tuned deman that is tune D a.T.M, that's the command that is used to set the profile based
on your system requirement.
So to check which profile is active right now that Tienda is using the command for that is tuned dash
a.T.M space active.
So let's run that command and we do a tune.
Let me clear the screen then our untuned that a.T.M active and right now it's telling me current active
profile that's been active is virtual guest.
So my machine right here where I'm running the Linux machine, it is running as a virtual machine.
So by default, it has selected this profile and it will the system or the operating system will fine
tune or changes the setting based on the profile it has selected.
Then we have to list all available profiles that we have.
The profiles that we listed in the last slide will see most of those profiles listed when we run this
command.
So let's go back in and run clear the screen again.
So this we will have a clear command visible.
So tuned dash a.T.M list.
OK, see right here, you see all these profiles that we talked about in the last slide Balas desktop
and there are a few more Intel latency performance are the same one network latency network throughput.
I want you to read every one of them and understand what is the purpose of each profile and whether
you should select of which profile based on the system requirement.
If you really want some of the network performance and you are downloading IAS or big image file, then
you probably want to go with network throughput optimized for streaming network throughput generally
only necessary on older CPU or forty plus gig network.
So read through it, understand each one of them.
But this will give you by default all the tuning settings that you wanted to enable instead of you going
into the configuration file and making your own changes.
OK then moving on to the next slide to change the desired profile.
So if I wanted to switch to a different profile, all you have to do is tune dash, EDM profile space,
the profile name.
So let's do that.
These are the profiles that I have available, so if I want to change it, for example, to desktop
or balance, for example, I would do tune ATM profile balanced.
It'll take a second and it came back.
Now, if you run the command Hune Dash a.T.M active and you will see the profile that has been selected
is balanced instead of what we had, we had virtual.
Machine selected before radio sorry, Wortzel guessed that that's what it was selected.
Next one, we have check for tuned recommendation.
So sometimes you change certain things, but then when you run this command, it will tell you what
profile you should select based on the system that you are running.
OK, let's go to our system, clear the screen, tuned a.T.M, recommend recommend me the profile that
I should be using and is telling you you should be using virtual guest.
Yes, it detects that I'm using a virtual machine.
So it should that we should select virtual guest profile.
OK, turn off tuned setting demon, if you don't want the system to select any profile, you want to
do things manually, you could turn that off.
So you do tuned and simply off.
Now, if you wanted to check which profile has been selected, you will do Tunji Adam again, same thing
to active.
And we'll tell you, you know, current active profile.
Then we have a change profile through VEB Council, so we could also change the profile through the
GUI, the Web console, that we could get access from the the cockpit package, which allows us to get
access to Web console.
So how do you have to log in?
You could just simply go to Asia to be as Colins as the IP address of your machine and the port nine
zero nine zero, and then you will go there and select overview configuration and performance profile.
So let's quickly check.
I have my Firefox open and I have already entered the IP address of my machine, which is 10 253 one
dot eighteen Port nine zero nine zero.
And it will brought me to the login page.
I entered my username and password and it brought me to this main dashboard.
So if you wanted to check the IP address of your machine so you could enter it to your browser, you
could just simply do if config.
S&P zero as three, I know the interface that's using is ENP is three, so you'll run it and you'll
see it's ten to three one eighteen when you entered that IP in your browser and you're not getting access
to this page and most likely your firewall is enabled up and running.
So to check the firewall, if it's enabled and running, you do system CTL status firewall D.
OK, by looking at this you could see.
It's loaded and it's inactive, if it if it was active, then most likely I would not have access to
this page, then you actually have to go into the firewall and allow that port 1990 to get access through
the Web browser page.
So the easiest way, if you are doing everything on non production or your lab environment, then I
would suggest then simply go ahead and do a system ctrl stop firewall and you will be able to access
your Web page or web portal management.
OK, anyway, coming back to the Web portal right here, you go to overview and the overview.
You go to configuration and in the configuration you will see right here says Performance Profile,
virtual guest.
Click on this one.
And select which profile you want to select.
So let's say if you want to select a balanced and click change profile and it will change it to a balanced
profile, you don't have to reboot the machine.
You don't have to make any changes whatsoever.
And it will be applied right away.
OK, the next thing is another way.
OK, so pretty much going back.
This is all about system tuning through tune D Deman or the service.
All these profiles have are available to you or you have to do is select the desired application or
desired profile based on your application and enable that profile.
All right.
Moving on to nice and is another way of keeping your system fine tuned is by prioritizing process to
nice and re nice command.
If a server has one CPU, then it can execute one computation or process at a time as they come and
they select first come, first serve, while other processes must wait or they have to wait.
That's how one CPU would take the execution of a process one at a time.
So of course it does run other processes one by one and round-robin way.
But what if you wanted to prioritize that, the process, the comment?
Because one process could be more valuable or more important than the other.
So with nice and very nice command, we could make that system to give preference to certain processes
than others.
This priority can be set at very different levels.
Yes, there are many different levels on that priority.
The nice level value range from minus 20, which is the highest priority to 19, which is the lowest
priority.
So the minus the negative sign gives you the highest priority and by default processes inherent there
nice level from their parent, which is usually zero.
OK, to check process priority, you can run command top.
That will give you which priority each process is running.
So when you going to run top, you're going to see two columns in the top.
So let me go into the Linux machine and I will run the command.
So let me clear the screen and I'll run top now here in the top command.
You're going to notice the first column appeared, which is a process ID, the user who is running that
command, the PR and and I.
So the P r is the system priority level.
Then the end is the actual user setting, the nice level that you actually set.
So what a difference between this one and that one.
What is the difference?
So let's go to our diagram right here and you'll see in the nice level we have higher priority minus
20, lower priority 19.
But system has its own priority that actually aligns it to the user.
Nice level.
And that goes from R T minus nine now all the way to 39.
So nice value is a user space and priority user space.
And priority part is the process is actually a priority that is used by Linux kernel and then system
priorities are zero to 139 n, which is zero to 99 for real time processes and 100 to 139 are for the
users.
So hopefully you understand that for the nice level, you only have up from minus 20 to 19, whereas
the system has its own priority alignment from zero to 139.
OK, process priority can be viewed through command as well with the right options if supplied.
So what are those options here?
The options piece space X Opata comma C o comma.
Nice Carmichaels dash short equal minus nice.
So let's go and run the command.
Clear the screen, a zero ped karma, karma, karma, nice karma, clx, dash, dash, and what is after
that sort?
Equal nice, and you will see all the process that are running in your system with priority level assigned
to them.
As you move up, you're going to see starting from 19 to five one zero zero all the way to minus 20.
OK, then get into their real commands.
What if you want to set the priority of a process to set the priority of a process of a desired process?
If you have one process running, for example, Oracle process and you want that Oracle process to get
the highest priority, then you have to run the command nice with minus N then number of the actual
number of the priority and the process name.
So for example, nice minus N minus 15 and top top is actually a process itself.
So let's run that and not Linux machine.
And here we will use two Windows.
That's why I had two Windows open.
Let's clear the screen.
So I want you to run and just stop right now and hit enter and you're going to see the top command itself
is being displayed in the priorities as system priority to zero and nice level to.
Assistant Susan prior to 20 and nice level to zero.
Now, what if you want to change it to minus 15 priority, so just quit out of it, but by hitting just
Kyuki, go back here and I want you to go to the other window.
I want you to type nice minus and fifth minus 15, because minus 15 is the highest priority.
And then on top, OK, it is running that top command and you're going to see right here, this is our
top command.
The system assigned process priority is five and the user assigned nice priority level is minus 15.
Now, what if you want to change that?
You don't want to stop the process, but you wanted to change his priority.
So to change prior to you have to use the command.
René's same way with minus end priority number and process name, for example, Trenyce minus N twelve.
And in this case, you cannot use a process name.
You have to use a process, Aidid, of that process that's been running.
OK, so let's go to our machine again and here if.
If I'm coming here to the nice command right here, sorry, to the top command, it has five and minus
15.
The only way we could change that if you could find out this process and this process, it's 90 360.
Beautiful.
OK, so let's clear the screen here and do Renai minus N and instead of minus 15, we have to change
it to 12, for example.
So what was that process, Heidi?
I forgot.
OK, nine three six zero sorry, nine three six zero hit enter, and right away you're going to see
nine three six zero process, Heidi, all priority minus was minus 15.
Now, the new priority is, well, let's verified.
There you go, so the user assigned nice number is 12, system assigned priority is 32.
So that's how you change the priority of a process and that's how you make your Linux system do the
fine tuning and get the best system performance out of your box.