Solved

Linux server performance issue

Posted on 2010-08-19
7
792 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
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

This document is written for Red Hat Enterprise Linux AS release 4 and ORACLE 10g.  Earlier releases can be installed using this document as well however there are some additional steps for packages to be installed see Metalink. Disclaimer: I hav…
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 get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
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.

758 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

21 Experts available now in Live!

Get 1:1 Help Now