Solved

Linux server performance issue

Posted on 2010-08-19
7
809 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
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 
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 Worsham
Michael Worsham 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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Linux VM 6 101
lunix and unix command 21 90
AWS EC2 HTTP & HTTPS 2 46
How does PHP Storm display on Linux high resolution laptops? 1 41
1. Introduction As many people are interested in Linux but not as many are interested or knowledgeable (enough) to install Linux on their system, here is a safe way to try out Linux on your existing (Windows) system. The idea is that you insta…
Fine Tune your automatic Updates for Ubuntu / Debian
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

821 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