Solved

Linux server performance issue

Posted on 2010-08-19
7
799 Views
Last Modified: 2013-12-16
I have a server running cacti with 2 cpu & 2 gb memory. It is showing me 100% cpu utilized for some perl scripts getting information from storage luns. memory also 98-99 % utilized. I tried to tune vm.swappiness to 80, as i thought that the memory is less so swapping the pages out may help, but still the performance is killing. kindly let me know wht all parameters can be checked to tune the linux system. I am using nmon tool.
0
Comment
Question by:pankajgadhari
7 Comments
 
LVL 23

Expert Comment

by:savone
ID: 33476362
I would check the perl scripts.  Seems like one of them might be in some kind of infinite loop.

0
 
LVL 1

Author Comment

by:pankajgadhari
ID: 33476477
These perl scripts are standard template. We are in a process of checking the scripts, but apart from that, is there any kernel parameters which we can tune to increase the performance based on output of iostat, vmstat or sar.
0
 
LVL 1

Author Comment

by:pankajgadhari
ID: 33476608
[root@server ~]# sar -B 2 3
Linux 2.6.18-164.el5 (epnetmon4.vvtv.com)       08/19/2010

10:45:17 AM  pgpgin/s pgpgout/s   fault/s  majflt/s
10:45:19 AM   8450.25     38.19   8664.82    371.86
10:45:21 AM   8078.00    220.00   8401.50    367.00
10:45:23 AM   7990.00     82.00   8307.00    389.00
Average:      8172.29    113.52   8457.43    375.96
[root@server ~]# cat /proc/sys/vm/swappiness
60

Sar is showing that the system is swaping very much, i changed the value from 60 to 80 yesterday without reboot & today i changed it back to 60 without reboot, as I was not getting any performance gain. kindly suggest. Do i need to tune vm.swappiness & vm.overcommit_memory for performance gaining. kindly suggest
0
Complete Microsoft Windows PC® & Mac Backup

Backup and recovery solutions to protect all your PCs & Mac– on-premises or in remote locations. Acronis backs up entire PC or Mac with patented reliable disk imaging technology and you will be able to restore workstations to a new, dissimilar hardware in minutes.

 
LVL 3

Accepted Solution

by:
ssapkota earned 200 total points
ID: 33478089
Okay it is clear that those perl-process are memory-hog.
In this case you might wanna tune following kernel-params:
vm.overcommit_memory=2
and
increase vm.overcommit_ratio to somewhat like 80.

Regarding vm.swapiness. Remember "The higher the vm.swappiness value, the more the system will swap." And if the system swaps more, its obviously going to hit the system performance. Keep it low (20-40) if most of the memory is consumed by active process.

You might wanna go through the following articles:
http://www.linuxvox.com/2009/10/what-is-the-linux-kernel-parameter-vm-swappiness/
http://www.win.tue.nl/~aeb/linux/lk/lk-9.html

And remember -- only modify one vm parameter at a time and monitor the performance.
0
 
LVL 25

Assisted Solution

by:madunix
madunix earned 150 total points
ID: 33486148
you could  try some of the following settings (mentioned above)
vm.min_free_kbytes = 16384
vm.overcommit_memory = 2
vm.overcommit_ratio = 75
vm.lower_zone_protection = 100
vm.vfs_cache_pressure = 10000
http://www.linuxinsight.com/proc_sys_vm_overcommit_memory.html
http://www.redhat.com/magazine/001nov04/features/vm/
0
 
LVL 29

Assisted Solution

by:Michael W
Michael W earned 150 total points
ID: 33487179
Also, as root, try flushing the pagecache and slabcache:

echo 3 > /proc/sys/vm/drop_caches


/etc/sysctl.conf configuration way:

vm.drop_caches = 3
0
 
LVL 1

Author Closing Comment

by:pankajgadhari
ID: 33526437
Met the expectation
0

Featured Post

Get up to 2TB FREE CLOUD per backup license!

An exclusive Black Friday offer just for Expert Exchange audience! Buy any of our top-rated backup solutions & get up to 2TB free cloud per system! Perform local & cloud backup in the same step, and restore instantly—anytime, anywhere. Grab this deal now before it disappears!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Guacamole and browser performance 1 62
linux crontab output 3 65
Determine Who is Runnig my Bash Shell Script 4 60
wipe a usb using python 5 21
If you use Debian 6 Squeeze and you are tired of looking at the childish graphical GDM login screen that is used by default, here's an easy way to change it. If you've already tried to change it you've probably discovered that none of the old met…
The purpose of this article is to fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

947 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now