Help in monitoring performance problem in Linux


 
Thread Tools Search this Thread
Operating Systems Linux Help in monitoring performance problem in Linux
# 1  
Old 01-31-2010
Help in monitoring performance problem in Linux

hello,

i'm having some performance problem on one of my linux machines and i hope someone will be able to help me analyzing the problem.

machine info:
Linux fedora, cpu x 4 cores of 1.6Ghz, 8G memory, 8G swap.

i've enabled sar on my machine and created a graph using ksar utility for the last week.

the sar -A command actually monitored everything on my machine.
now, i'm trying to understand what was the problemSmilie

my problem was that on 2 days at that week my application hanges and we had to restart the machine in order to solve this.
now, i'm trying to understand its its i/o problem due which related to my disk, or perhaps memory problem.

the problem occured at 15:00PM on one of the days i've monitored. i will write down the resluts:
Code:
CPU monitor: (0.0 - 30.0) 
   cpu used: 17%.
context: (0-31,000)
   cswch/s: 17,000
i/o: 
  transerf/s (0- 5000) : 3000
  block read/write (0-300,000) : 100,000
  read/write/s (0 - 4000) : 1500
memory:
  memused: 7.8G (97%)
memory misc:
   buffers: (0-700m) : 200m
   cached: (0-7.5G): 7G
swap:
   swapfree: 8G
   swapused: 40kb
 
load:
  runq-sz (0-3): 2.5
  plist-sz(0-400): 350
  load average (0-40) : 30
 
page:
  frmpg/s((-)1000 - 1000) : (-)1000
  bugpg/s: ((-)150 - 150): 50
  campg/s ((-)1000 - 1000): 1000
 
paging: 
   pgpgin/pgpgout  /s (0-80,000) : 30,000
   fault/majflt / s (0-55,000) : 1000
 
processes:
  proc/s (0-60.00): 1

i hope it was clearSmilie
i can see there is not enough memory cause he used almost all the memory, and the runq-sz is high so a lot of process running/waiting to run i think, so perhaps it might indicate the problem?

please help...Smilie

10x

Last edited by Scott; 01-31-2010 at 08:26 AM.. Reason: Please use code tags
# 2  
Old 01-31-2010
Looking at what you are showing us the CPU is not being overloaded and you are not drastically short of memory, as you say the run queue size is not good, I think you need to look at the figures for CPU I/O wait and I/O service time (svctm) and see what devices are not responding very quickly (disk storage perhaps?)?
Do you consider your application to be doing a lot of I/O?
# 3  
Old 01-31-2010
hi,

what did you mean about "my application hanges"??

do you mean "application crashes" then it's not a performance issue,
maybe it's software issues, OS bug or Application Bug,
or Hardware Failure, Memory or CPU Failure,
# 4  
Old 02-08-2010
hi,
thanks a lot for you answer tony.
sorry for the late response i didnt see you answered me.
anyway, how can i check the cpu i/o. i have all this statistics of ksar output.
i though this is all the statistics i can have.
how can i check if the disk are the problem?

thanks
# 5  
Old 02-08-2010
This may be different for your Unix but for Unbuntu sar(1) you can run:
Code:
sar -d

for today's I/O stats or:
Code:
sar -d -f /var/log/sysstat/sa16

for the I/O stats from the 16th.
The simple thing to look for is if the figures for one volume are worse than the others and may benefit from being moved to a dedicated disk or even onto a striped volume?


Also take a look at:
Code:
sar -n ALL

for network device stats.

The other one to look at is:
Code:
sar -q

and see if the run queue size (runq-sz) gets larger when the I/O stats are at there worse.
# 6  
Old 02-09-2010
hi tony,
thanks a lot for your help!

i've tried to execute sar -d -f <sa file> and it gives me the error:
Requested activities not available in file

i though that this is due to my sysstat configuration. i've added the SA1_OPTIONS="-d" on my /etc/init.d/sysstat file so it will know to check device statistics, restart sysstat service and run the crontab entry "sa1 -d -I 1 1" but i'm still getting the same error on the sar commandSmilie

perhaps i'm not doing something right.
i've used the ksar to generate a PDF with all the statistics and i am missing i/o wait for disks graphs. so i've added the SA1_OPTIONS="-d" to the file i've told you in order to enable this options. isnt that enough?

thanks

i will
# 7  
Old 02-09-2010
If you've only just configured sar to collect device I/O stats then none of the previous days sar files will contain that information, presumably on the next day you will be able to run:
Code:
sar -d

and see something for that day at least?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Red Hat

HELP - Resource/Performance Monitoring Script - Red Hat Enterprise Linux Server

Hi all, ------------------------- Linux OS Version/Release: ------------------------- Red Hat Enterprise Linux Server release 5.5 (Tikanga) Linux <hostname> 2.6.18-194.8.1.el5 #1 SMP Wed Jun 23 10:52:51 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux I have a server that hosts 30+ Oracle... (1 Reply)
Discussion started by: newbie_01
1 Replies

2. Solaris

Performance / Batch monitoring

What tools can I use to look "deeper" into a process to see if the job is actually running or just hanging. What is the best method to accomplish this? SunOS 5.10 Generic_142900-14 sun4v sparc SUNW,T5240 (2 Replies)
Discussion started by: Harleyrci
2 Replies

3. AIX

Performance Monitoring of FileSystem

As I am new to the Unix field, I would like to get the clarification regarding the Filesystem. The scenario is.. The filesystem (/drbackup) is getting monitored and if it exceeds the threshold, we will receive an alert from it. The issue is that we receive an alert with the description of... (2 Replies)
Discussion started by: A.Srenivasan
2 Replies

4. Shell Programming and Scripting

Performance monitoring help needed.

How would i check for following? 1)open ports in my linux machine. 2)Hard disk read speed. 3)Hard disk write speed. (2 Replies)
Discussion started by: pinga123
2 Replies

5. Solaris

Performance Monitoring

Hi all, I am planning to give a presentation on performance measure. I have decided to focus on the commands which are used to know the performance of the server. I have a idea of prstat,vmstat,netstat, and iostat. Could anybody suggest me any other commands which are used for perforamance... (7 Replies)
Discussion started by: priky
7 Replies

6. Linux

Linux/Unix performance monitoring

This is my first post (yes I'm a newbie).... :D I'm looking for a list of Linux and Unix commands for performance monitoring and a good sight or area on this site that would have man pages and or information on those commands..... Thanks if anyone can take the time to post..... :cool: (14 Replies)
Discussion started by: harrisjl
14 Replies

7. UNIX for Dummies Questions & Answers

Performance monitoring

Hello, I am trying to find a way to view current CPU and disk usage. I used to use nmon which worked fine but since an upgrade to our servers this is no longer available. I have tried to get it reinstalled to no avail! Are there any other commands you can use within unix which will allow me... (4 Replies)
Discussion started by: johnwilliams
4 Replies

8. UNIX for Advanced & Expert Users

Performance Monitoring

Hi all The place I work for is about to to place there database server under heavy load for testing and would like the effect recorded as much as possible. Can anyone point me in the right direction with respect to real time system monitoring. I am aware of of 'sar', vmstat etc and hope to... (2 Replies)
Discussion started by: silvaman
2 Replies

9. AIX

Performance monitoring

Hi All I am looking for a script that would collect statistics in a summarised format. CPU, Memory,Swap, Wait queue, Run queue and disk activity. Something that would allow me to profile the environment based on a 1 line output that I could run every 15 min. Thx Junaid (1 Reply)
Discussion started by: jhansrod
1 Replies

10. UNIX for Advanced & Expert Users

performance monitoring

hi, can any one tell me, is there is any way i can check the performance of my solaris 8 os on an Ent 3500. Other than top to check for the top most processes, how to make the calculations with vmstat, iostat, mpstat and nfsstat. Or is there any other tools that i can use? cheers. (3 Replies)
Discussion started by: i2admin
3 Replies
Login or Register to Ask a Question