Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > General

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #11  
Old 13th October 2010, 09:52
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,405
Thanks: 834
Thanked 5,496 Times in 4,326 Posts
Default

Which php method do you use in your sites, cgi, fcgi, mod_php or suphp?
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
Sponsored Links
  #12  
Old 13th October 2010, 13:55
MarkSeger MarkSeger is offline
Junior Member
 
Join Date: Oct 2007
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Trying to figure out what is going on by looking at a few data points over a handful of seconds is a real good way to make the wrong decision. Like I said you have collectl running so if you look at /var/log/collectl you should see a number of files, probably one/day, that contain samples of almost every performance metric on your system. One set every 10 seconds! All you need to do it 'play it back' with the right parameters. You'll be able to see cpu, disk, network, memory, nfs (if you use it), page faults, interrupts and a whole lot more. Even detailed process and slab memory data.

To get started just type:

collectl -p /var/log/collectl/filename -oT

The -scdnm with display 'brief' format for cpu, disk, network and memory.
The -oT switch will include optional timestamps.

You can change the subsystems to see individual CPU, NETWORK or DISK loads by specifying then in uppercase, but you'll get far less compact data.

you can even running with --vmstats instead of -s if you prefer that format.

check out http://collectl.sourceforge.net to learn mode

-mark
Reply With Quote
  #13  
Old 13th October 2010, 14:11
crypted crypted is offline
Senior Member
 
Join Date: Dec 2006
Location: Oklahoma, USA
Posts: 429
Thanks: 3
Thanked 14 Times in 6 Posts
Default

Mark, I'll look into that collectl after while.

Till, I'm using fcgi for the main websites as they're wordpress. The rest use mod-php.
__________________
ISPC3 on Debian! It's great!
Reply With Quote
  #14  
Old 13th October 2010, 14:19
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,405
Thanks: 834
Thanked 5,496 Times in 4,326 Posts
Default

Quote:
Originally Posted by crypted View Post
Till, I'm using fcgi for the main websites as they're wordpress. The rest use mod-php.
Thats a good choice!

Which value have you set under system Server Config on the fastCGI tab for the value "FastCGI Children"? If it is > 1, then set it to 1, then you will have to change a setting in every website, e.g. quota and click on save to apply the new value.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #15  
Old 13th October 2010, 14:26
crypted crypted is offline
Senior Member
 
Join Date: Dec 2006
Location: Oklahoma, USA
Posts: 429
Thanks: 3
Thanked 14 Times in 6 Posts
Default

FCGI children is at 8 with max requests of 5000. Should it be just lesser than 8, or 1?

Changed children, went to the two big sites and changed hdd quota by 1mb.

Now the waiting game.
__________________
ISPC3 on Debian! It's great!
Reply With Quote
  #16  
Old 13th October 2010, 14:28
MarkSeger MarkSeger is offline
Junior Member
 
Join Date: Oct 2007
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

while you're waiting, just type "collectl<return>" and watch the output. very compact, very low overhead. <0.1%.
-mark
Reply With Quote
  #17  
Old 13th October 2010, 14:37
crypted crypted is offline
Senior Member
 
Join Date: Dec 2006
Location: Oklahoma, USA
Posts: 429
Thanks: 3
Thanked 14 Times in 6 Posts
Default

Quote:
Originally Posted by crypted View Post
FCGI children is at 8 with max requests of 5000. Should it be just lesser than 8, or 1?

Changed children, went to the two big sites and changed hdd quota by 1mb.

Now the waiting game.
Till, I made those changes. Now it takes about 4 seconds to access the website inter5.org and areyouliberal.com.

Code:
top - 08:37:57 up 10:15,  2 users,  load average: 2.17, 2.10, 1.67
Tasks: 185 total,   2 running, 182 sleeping,   0 stopped,   1 zombie
Cpu(s): 11.9%us,  8.5%sy,  0.0%ni, 79.6%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:   4063804k total,  2898012k used,  1165792k free,   619852k buffers
Swap:  1951856k total,        0k used,  1951856k free,   670860k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND                                                                
15614 web5      20   0  206m  53m 7768 S   36  1.4   0:29.66 php-cgi                                                                
16287 root      20   0     0    0    0 Z    3  0.0   0:00.10 miniserv.pl <defunct>                                                  
 2933 mysql     20   0  251m  79m 5904 S    1  2.0  13:44.49 mysqld                                                                 
15630 www-data  20   0  248m  10m 1796 S    1  0.3   0:00.10 apache2                                                                
    1 root      20   0 10316  752  620 S    0  0.0   0:01.14 init                                                                   
    2 root      15  -5     0    0    0 S    0  0.0   0:00.00 kthreadd                                                               
    3 root      RT  -5     0    0    0 S    0  0.0   0:00.08 migration/0                                                            
    4 root      15  -5     0    0    0 S    0  0.0   0:00.14 ksoftirqd/0
Code:
waiting for 1 second sample...
#<--------CPU--------><----------Disks-----------><----------Network---------->
#cpu sys inter  ctxsw KBRead  Reads KBWrit Writes   KBIn  PktIn  KBOut  PktOut 
 100  28    59   8282      0      0    168     20      5     52      4      44 
  96   9    49   9013     28      3    172     10      4     27      4      17 
 100   9   100  11693      0      0    332      8      3     28      5      21 
  87  14    71   2287      0      0    704     30      4     44      5      37 
  50  18    49   1217      0      0     80     14      3     22      3      16 
  24  12   101    857      0      0      0      0      3     31      7      28 
   0   0    80    148      0      0    196     27      5     52     37      56 
   0   0    75    150      4      1    148     14      4     29      7      19 
  45   2    77   5209      0      0    252     18      5     36      8      28 
  82   5    53  10375      0      0    216     12      5     39      3      21 
  79   5    40   9537      0      0     52      8      3     27      2      13 
  48   3    61   7862      0      0    296     17      2     21      5      12 
   0   0    35    112      0      0     64     10      3     24      3      18 
   0   0    33    100      0      0      0      0      1     17      1       9 
  24   2   178    104      0      0    928    151      1     16      2      12 
  87  11    52   2327      0      0    496      8      2     22      1      13 
Ouch!
__________________
ISPC3 on Debian! It's great!
Reply With Quote
  #18  
Old 13th October 2010, 14:51
MarkSeger MarkSeger is offline
Junior Member
 
Join Date: Oct 2007
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

well I see you got collectl going.

btw - if you want to see what your memory is doing at the same time just add the switch -s+m. if you want time stamps just include -oT. more suggestions later if you care.

clearly you don't have a network or disk problem. All your CPUs are certainly getting hammered though since the CPU number is reported is a average of all of them. In fact if you have 4 and collectl reports 25%, 1 could be at 100%. To see individual CPU loads, use "collectl -sC". Unfortunally this can be a pain to view so it you add the --home switch it will provide a display similar to top, but with no history.

one thing that is curious is I've never seen interrupts so low! Typically you see 1000 on an idle system because the clock interrupts 1K times/second. being a web hosted environment, perhaps you're running in a VM and the clock is being processed by the hypervisor? no big deal, just a curiousity.

getting back to the high cpu load, it feels like this is indeed a case where the application needs to be tuned or simply needs more cpu. in any event, as you try to tune you can always run collectl in another window and be able to observe immediate results.

enjoy
-mark
Reply With Quote
  #19  
Old 13th October 2010, 16:42
crypted crypted is offline
Senior Member
 
Join Date: Dec 2006
Location: Oklahoma, USA
Posts: 429
Thanks: 3
Thanked 14 Times in 6 Posts
Default

I'll tell you I notice a response difference when I kill off the most popular website, inter5.org. (just deactivated it again to watch)

its online in this one
Code:
top - 10:38:55 up 12:16,  2 users,  load average: 0.83, 1.06, 1.14
Tasks: 180 total,   2 running, 178 sleeping,   0 stopped,   0 zombie
Cpu(s): 62.7%us, 18.7%sy,  0.0%ni, 18.1%id,  0.3%wa,  0.0%hi,  0.2%si,  0.0%st
Mem:   4063804k total,  1847300k used,  2216504k free,   245612k buffers
Swap:  1951856k total,     1792k used,  1950064k free,   370840k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND                                                                
24176 web5      20   0  207m  53m 7992 S   55  1.3   4:28.24 php-cgi                                                                
23646 web8      20   0  194m  40m 7984 S   54  1.0   4:25.35 php-cgi                                                                
20516 web5      20   0  209m  55m 7996 R   39  1.4   6:05.86 php-cgi                                                                
 2933 mysql     20   0  261m  81m 5988 S   14  2.1  20:36.26 mysqld
its offline in this one
Code:
top - 10:41:34 up 12:19,  2 users,  load average: 0.35, 0.81, 1.03
Tasks: 164 total,   1 running, 163 sleeping,   0 stopped,   0 zombie
Cpu(s): 50.0%us,  0.0%sy,  0.0%ni, 50.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:   4063804k total,  1443496k used,  2620308k free,   246112k buffers
Swap:  1951856k total,     1792k used,  1950064k free,   372280k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND                                                                
30509 root      20   0 18960 1324  940 R  254  0.0   0:00.46 top                                                                    
    1 root      20   0 10316  752  620 S    0  0.0   0:01.20 init                                                                   
    2 root      15  -5     0    0    0 S    0  0.0   0:00.00 kthreadd                                                               
    3 root      RT  -5     0    0    0 S    0  0.0   0:00.10 migration/0                                                            
    4 root      15  -5     0    0    0 S    0  0.0   0:00.20 ksoftirqd/0
collectl showing where i turned the website back on. you will see the cpu spike and some disk spike.
Code:
   0   0    65    125      0      0    576     17      1     16      1       5 
   0   0    53    127      0      0      0      0      2     27      2      21 
   1   0    44    127      4      1    108     10      3     38      3      33 
   0   0     9     42      0      0      0      0      1     10      1       4 
   1   0    62    157      0      0      0      0      1      8      0       2 
   0   0    44     89      0      0      0      0      3     38      3      32 
   0   0    36     88      0      0     88      9      3     24      3      15 
  37   5    30    334     16      4      0      0      2     20      1      12 
  49  11    33    472      8      2      0      0      1     15      1      12 
  50  24    24   1673      0      0      0      0      1     17      1      13 
   0   0    43     82      0      0      0      0      1     12      4      10 
   1   0    68    111      0      0    476     16      2     34     33      30 
   0   0    29     68      0      0      0      0      3     28     13      23 
   0   0    26     95      0      0      0      0      2     19      2      10 
   1   0    25     61      0      0      0      0      1     15      1       8 
#<--------CPU--------><----------Disks-----------><----------Network---------->
#cpu sys inter  ctxsw KBRead  Reads KBWrit Writes   KBIn  PktIn  KBOut  PktOut 
  24   6    45    488      0      0    660     14      2     20      1      10 
  14   7    43    214      0      0      0      0      3     21      3      17 
  32   3    12    152      4      1      0      0      2     21      1      10 
   5   1    16     75      0      0      0      0      1      9      0       3 
  57  17    32    728      0      0      0      0      1     11      1       5 
  84  25   142   1585    340     72   1604     30      2     25      1      12 
  97  15    70   4485     32      6      0      0      2     24      7      20 
 100  29    65   5916      0      0      0      0      4     53     27      40 
  76  29    41   4397      8      2      0      0      2     30      2      19 
  62  16    55    904      0      0      0      0      2     32     24      23 
  34  18    41   1225      0      0    464     13      3     37     39      35 
  20   0    30    106      0      0      0      0      1     19      1       9 
  96  16    31   4941     24      3      0      0      2     20      5      14 
  84  25    58   7904      0      0      4      1      2     19      2       8
Also, check out the graphs for anything interesting I'm not seeing:
http://monitor.derekgordon.com/munin...com/index.html
__________________
ISPC3 on Debian! It's great!

Last edited by crypted; 13th October 2010 at 16:46.
Reply With Quote
  #20  
Old 13th October 2010, 17:17
MarkSeger MarkSeger is offline
Junior Member
 
Join Date: Oct 2007
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
 
Default

I took a quick look at your graphs and I'm afraid they're not going to be very useful. The sample times for the data are far too infrequent to see anything meaningful such as spikes. Furthermore, you're using RRD which normalizes the data it plots - a fancy name for 'it lies!!!'.

Perhaps the next thing you might want to look into is downloading collectl-utils which contains a tool called colplot, which uses gnuplot and a web interface to display very detailed and accurate plots from collectl data. The way that works is you use collectl to turn the collected data into something plottable (or even loadable into a spreadsheet). Just use the playback command like this:

collectl -p /var/log/collectl/filename -P -f/tmp

and that will create a plottable file in /tmp. Then you run colplot, point it to /tmp and tell it to draw all plots. There is a sample of one of plots on the collectl webpage as well as more info here:
http://collectl-utils.sourceforge.net/colplot.html

-mark
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
problems with suexec gobokster Installation/Configuration 7 7th May 2009 13:33
Question about the hardware requirement for mysql cluster with load balancing??? johN5Five^ HOWTO-Related Questions 3 12th April 2007 17:06
Mandriva 10.2 Perfect Setup Install Problems... ctroyp Installation/Configuration 12 30th December 2005 16:04
Apache with MYSQL trouble mandarin14 Installation/Configuration 4 4th December 2005 20:18
MySQL 5.0 and Apache 2.0.xx Lil'Brudder General 2 11th November 2005 01:08


All times are GMT +2. The time now is 01:26.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.