Load Average is the value which represents the load on your system for a specific period of time. Also it can be considered the ratio of the number of active tasks to the number of available CPUs.
How to check?You can use either top or uptime command to view the load average. The output would look like as shown below
00:07:00 up 4 days, 6:14, 1 user, load average: 0.11, 0.14, 0.09
top - 00:07:12 up 4 days, 6:15, 1 user, load average: 0.09, 0.13, 0.09
What are the three values?As you can see three values representing the load average column. These show the load on your system over a significant period of time (one or current, five and fifteen minutes averages).
How do you know your system has a high load?The most important question as in most cases I have seen how do you determine your system has high load.
Does a high value represents high load average and that your system requires atention?
What is the threshold value for load average?
How can we conclude if the load average value is good or bad?
Before I answer these question first let us understand about multi core and multi processor CPU.
A Central Processing Unit in earlier days used to be having only one processor and the core concept was not their in those days. But with the advancement in technology and the urge of higher speed to meet up demands of IT industry multiple processor were integrated in the same CPU making it multi-processor.
However increasing the no. of processor did increased the working speed of many tasks and performance but it also leads to increase in size, complexity and heat issues. So, in order to continue improvement of performance the core concept was introduced.
Instead of having two CPUs and a motherboard capable of hosting them, two CPUS are taken together and combined to form a dual core processor which will utilize an individual socket using less power and size capable of performing the same amount of task as dual processor CPU.
Bottom Line is that Load value depends on the no. of cores in your machine. For example a dual core is relevant to 2 processor or 2 cores and quad core is relevant to 4 processor or four cores as the maximum value for load.
How do I check the no. of cores on my Linux system?The information which you see under /proc/cpuinfo can be confusing at times. If you run the below command
$ less /proc/cpuinfo | grep processor
processor : 0
processor : 1
processor : 2
processor : 3
processor : 4
processor : 5
processor : 6
processor : 7
processor : 8
processor : 9
processor : 10
processor : 11
processor : 12
processor : 13
processor : 14
processor : 15
So as per the above command my system has 16 processors in it. However it really has 8 processors with hyper threading enabled. The hyper threading presents 2 logical CPUs to the operating system for each actual core so it effectively doubles the no. of logical CPU in your system
How to find if hyper threading is enabled
Look out for "ht" in the flags section inside cpuinfo with the below command
$ less /proc/cpuinfo | grep flags | uniq | grep -i "ht"
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall nx rdtscp lm constant_tsc nonstop_tsc pni monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr sse4_1 sse4_2 popcnt lahf_lm
Next let us continue on the calculation of no. of core
The fields we need to compare to find the no. of core are "physical id" and "core id". Run the below command
$ less /proc/cpuinfo | grep "physical id" | sort|uniq | wc -l
$ less /proc/cpuinfo | grep "core id" | sort|uniq | wc -l
So the no. of cores would be 2x4 = 8 cores
Coming back to our primary question
Understanding Load AverageIf the number of active tasks utilizing CPU is less as compared to available CPU cores then the load average can be considered normal but if the no. of active tasks starts increasing with respect to available CPU cores then the load average will start rising.
For example in my case I can see
00:43:58 up 212 days, 14:19, 4 users, load average: 6.07, 7.08, 8.07
So as per the no. of cores I calculated i.e 8 cores and seeing the value 6.07 I shouldn't be worried much unless it crosses the red line value i.e. 8 for my case.
I hope I made myself clear.
Tutorial for Monitoring Tools SAR and KSAR with examples in Linux
9 examples to help you understand top command usage in Unix/Linux
15 tips to enhance security of your Linux machine
How to check all the currently running services in Linux
Follow the below links for more tutorialsHow to secure boot loader (grub menu) with password in RHEL 6
How to check last login time for users in Linux
What is the difference/comparison between Unix and Linux ?
RAID levels 0, 1, 2, 3, 4, 5, 6, 0+1, 1+0 features explained in detail
Step by Step Linux Boot Process Explained In Detail
What is GRUB Boot Loader ?
Why is Linux more secure than windows and any other OS
What is the difference between "su" and "su -" in Linux?
What is kernel-PAE in Linux?
What is swappiness and how do we change its value?
How to secure Apache web server in Linux using password (.htaccess)
How to register Red Hat Linux with RHN (Red Hat Network )
How to do Ethernet/NIC bonding/teaming in Red Hat Linux
How to install/uninstall/upgrade rpm package with/without dependencies
What is the difference between ext3 and ext4 filesystem in Linux ?