LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
LinkBack Search this Thread
Old 11-13-2012, 05:27 AM   #1
Fajkowsky
LQ Newbie
 
Registered: Nov 2012
Posts: 5

Rep: Reputation: Disabled
Measure load of ubuntu server


I have Ubuntu server and apache2 installed on it. I want to benchmark it using ab tool from another machine. I want to know how measure load of this program. In top is showing this:

Code:
top - 06:02:19 up 3 min,  2 users,  load average: 0.28, 0.26, 0.12
Tasks:  94 total,   2 running,  92 sleeping,   0 stopped,   0 zombie
Cpu(s): 67.2%us,  5.5%sy,  0.0%ni, 26.3%id,  0.5%wa,  0.0%hi,  0.5%si,  0.0%st
Mem:    499320k total,   342028k used,   157292k free,    42504k buffers
Swap:   514044k total,        0k used,   514044k free,    71388k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
 1521 www-data  20   0 49180  22m 4144 S   23  4.6   0:00.68 apache2
 1520 www-data  20   0 49180  22m 4152 S   22  4.6   0:00.66 apache2
 1124 www-data  20   0 49180  22m 4152 S   22  4.6   0:00.70 apache2
 1519 www-data  20   0 49180  22m 4152 S   20  4.6   0:00.70 apache2
 1525 www-data  20   0 49180  22m 4144 S   16  4.6   0:00.47 apache2
 1123 www-data  20   0 49168  22m 4152 S    9  4.6   0:00.78 apache2
 1125 www-data  20   0 49168  22m 4152 S    9  4.6   0:00.77 apache2
 1126 www-data  20   0 49168  22m 4152 S    9  4.6   0:00.73 apache2
 1127 www-data  20   0 49168  22m 4152 S    9  4.6   0:00.74 apache2
 1523 www-data  20   0 42896  14m 3388 R    5  3.1   0:00.14 apache2
 1038 whoopsie  20   0 24476 3720 2856 S    0  0.7   0:00.01 whoopsie
 1089 root      20   0 34060 6988 3640 S    0  1.4   0:00.05 apache2
 1338 ubuntu    20   0  2832 1192  944 S    0  0.2   0:00.30 top
 1417 ubuntu    20   0  9652 1456  824 S    0  0.3   0:00.02 sshd
    1 root      20   0  3540 1876 1248 S    0  0.4   0:00.83 init
    2 root      20   0     0    0    0 S    0  0.0   0:00.00 kthreadd
    3 root      20   0     0    0    0 S    0  0.0   0:00.03 ksoftirqd/0
    4 root      20   0     0    0    0 S    0  0.0   0:00.00 kworker/0:0
    5 root      20   0     0    0    0 S    0  0.0   0:00.48 kworker/u:0
    6 root      RT   0     0    0    0 S    0  0.0   0:00.00 migration/0
    7 root      RT   0     0    0    0 S    0  0.0   0:00.00 watchdog/0
    8 root      RT   0     0    0    0 S    0  0.0   0:00.00 migration/1
    9 root      20   0     0    0    0 S    0  0.0   0:00.00 kworker/1:0
   10 root      20   0     0    0    0 S    0  0.0   0:00.01 ksoftirqd/1
   11 root      20   0     0    0    0 S    0  0.0   0:00.17 kworker/0:1
   12 root      RT   0     0    0    0 S    0  0.0   0:00.00 watchdog/1
   13 root       0 -20     0    0    0 S    0  0.0   0:00.00 cpuset
   14 root       0 -20     0    0    0 S    0  0.0   0:00.00 khelper
   15 root      20   0     0    0    0 S    0  0.0   0:00.00 kdevtmpfs
   16 root       0 -20     0    0    0 S    0  0.0   0:00.00 netns
   17 root      20   0     0    0    0 S    0  0.0   0:00.32 kworker/u:1
   18 root      20   0     0    0    0 S    0  0.0   0:00.00 sync_supers
   19 root      20   0     0    0    0 S    0  0.0   0:00.00 bdi-default
   20 root       0 -20     0    0    0 S    0  0.0   0:00.00 kintegrityd
   21 root       0 -20     0    0    0 S    0  0.0   0:00.00 kblockd
   22 root       0 -20     0    0    0 S    0  0.0   0:00.00 ata_sff
   23 root      20   0     0    0    0 S    0  0.0   0:00.00 khubd
So its difficult to do it without any script or program. How can I do this?
 
Old 11-13-2012, 06:19 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,345

Rep: Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945
generally the load average value would be good enough: "load average: 0.28, 0.26, 0.12" this shows the 1m 5m and 15m load averages
 
Old 11-13-2012, 06:50 AM   #3
Fajkowsky
LQ Newbie
 
Registered: Nov 2012
Posts: 5

Original Poster
Rep: Reputation: Disabled
But I want measure load only for specific time not all uptime of srver.
 
Old 11-13-2012, 07:01 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,345

Rep: Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945
why is that a but? did you read my reply??
 
Old 11-13-2012, 12:39 PM   #5
Fajkowsky
LQ Newbie
 
Registered: Nov 2012
Posts: 5

Original Poster
Rep: Reputation: Disabled
Thanks sorry I was reading in hurry. But this can't help me make charts.
 
Old 11-13-2012, 01:33 PM   #6
Habitual
Senior Member
 
Registered: Jan 2011
Distribution: Slack14_64_Multilib
Posts: 2,735
Blog Entries: 3

Rep: Reputation: 629Reputation: 629Reputation: 629Reputation: 629Reputation: 629Reputation: 629
Quote:
Originally Posted by Fajkowsky View Post
But I want measure load only for specific time not all uptime of srver.
sar is a tool that can do as you are asking. In the package sysstat.

NOTE: default install values only collect data every Ten Minutes for 7 days.
During that time, you can inspect the CPU Load for any 10 minute time period by issuing a
Code:
sar -f /var/log/sysstat/sann -q
where nn in /var/log/sysstat/sann above is one of the last 7 days log file.

Getting a "window" of CPU activity Report using sar on a system on the 5th between 3am and 5am is:
Code:
sar -f /var/log/sysstat/sa05 -q -s 03:00:00 -e 05:00:00
and spits out
Code:
Linux 2.6.31-302-ec2 (mysql12)     11/05/2012     _x86_64_    (8 CPU)

03:05:01 AM   runq-sz  plist-sz   ldavg-1   ldavg-5  ldavg-15   blocked
03:15:01 AM        24       318     12.86     15.39     15.03         0
03:25:01 AM         7       274      7.25      7.13     11.13         0
03:35:01 AM        20       274      3.34      5.17      8.33         0
03:45:01 AM         5       282      2.67      3.55      6.00         0
03:55:01 AM         8       278      0.32      0.92      3.50         0
04:05:01 AM         4       281      0.25      0.41      2.04         0
04:15:01 AM         4       280      0.89      3.69      3.44         0
04:25:01 AM        26       307     10.98      7.64      5.06         0
04:35:01 AM        27       317      5.85      8.40      7.18         0
04:45:01 AM         3       268      1.87      3.82      5.43         1
04:55:01 AM        15       296      1.83      3.01      4.35         0
Average:           13       289      4.37      5.38      6.50         0
Code:
sudo apt-get install sysstat
I documented some of the various switches that seemed important for Reports here...

I hope that is helpful,

JJ

NOTE0:
Code:
Package isag - Interactive System Activity Grapher for sysstat

Last edited by Habitual; 11-13-2012 at 01:34 PM.
 
Old 11-13-2012, 04:27 PM   #7
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,345

Rep: Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945
Quote:
Originally Posted by Fajkowsky View Post
Thanks sorry I was reading in hurry. But this can't help me make charts.
If you wanted to chart it, why didn't you say so? It certainly CAN help you chart things, but depends on what other tools or frameworks you're working within.
 
Old 11-17-2012, 06:29 AM   #8
markseger
Member
 
Registered: Jul 2003
Posts: 232

Rep: Reputation: 25
benchmark is in interesting term as it can mean a lot of things to a lot of people.

as previously mentioned loadavg can produce interesting numbers but if you don't really understand what it's telling you it can be more misleading than anything else. I first found this when it was reporting a load of over 80 on a perfectly normal running nfs server.

sar can be helpful but not at a 10 minute interval. personally I think to get an accurate picture of what an application is doing to your system you want to look at everything from cpu, to disk, to memory to network and perhaps other things as well like the number of sockets in use, files open, etc... probably plot them over a reasonable period of time. then you run your application (whatever that means) for some period of time and take measurements and plot them again to compare the two. Also, if the application does some sort of transaction processing, or reading/processig of data, etc, of course you want to load it and see where it falls over. this can all be very complex.

of course I use collectl which I designed for this very type of thing and then pump its output through colplot to get very detailed plots. I use it every day and collect data samples once a second on a ton of servers and make the data available as text through collectl's cli as well as graphics via colplot.

-mark
 
Old 11-17-2012, 07:00 AM   #9
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 11,821

Rep: Reputation: 924Reputation: 924Reputation: 924Reputation: 924Reputation: 924Reputation: 924Reputation: 924Reputation: 924
Is this not veering a little off-track maybe ?.
Quote:
Originally Posted by Fajkowsky View Post
I have Ubuntu server and apache2 installed on it. I want to benchmark it using ab tool from another machine.
Not knowing the least about apache, a quick search found this little gem
Quote:
ab is a tool for benchmarking your Apache Hypertext Transfer Protocol (HTTP) server. It is designed to give you an impression of how your current Apache installation performs. This especially shows you how many requests per second your Apache installation is capable of serving.
The loadavg thing is a bit of a side-track here - possibly true of all loadavg discussions.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Attempt to load 2.6.37-rc1 under Xen 4.0.1 on top of Ubuntu 10.04.01 Server LXer Syndicated Linux News 0 11-02-2010 12:50 PM
LXer: Ubuntu: How to Measure Canonical's Business Progress LXer Syndicated Linux News 0 04-19-2010 09:50 AM
How do I measure our cache server performance? terrytibbs Solaris / OpenSolaris 8 10-04-2009 03:12 PM
File server security measure bobykv Linux - Security 2 01-03-2008 05:40 PM
Why is memory load hard to measure? MasterOfTheWind Linux - General 4 06-01-2007 05:27 AM


All times are GMT -5. The time now is 01:11 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration