Jump to content

Recommended Posts

Posted

Hi All,

 

I have an Ubuntu 6.06 Lamp Server running Moodle 1.8.2 and have been testing it this morning with a class to see how it handles and to put it mildly VERY BAD.

 

The server itself is a dual Xeon 3ghz with 2Gb DDR2 memory and 100Gb RAID5 but even with this I am seeing:

 

top - 10:26:30 up 21:56,  1 user,  load average: 22.63, 12.73, 5.84
Tasks:  74 total,   9 running,  65 sleeping,   0 stopped,   0 zombie
Cpu(s): 98.7% us,  1.3% sy,  0.0% ni,  0.0% id,  0.0% wa,  0.0% hi,  0.0% si
Mem:   2076004k total,   720676k used,  1355328k free,   109156k buffers
Swap:  1469908k total,        0k used,  1469908k free,   135780k cached

 PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
15765 www-data  16   0 37796  24m 4772 R   46  1.2   1:10.84 apache2
14491 www-data  16   0 40444  27m 4836 R   35  1.3   1:04.42 apache2
16055 www-data  16   0 37236  24m 4688 S   32  1.2   1:00.79 apache2
16069 www-data  16   0 37236  24m 4760 S   18  1.2   1:00.32 apache2
16053 www-data  15   0 39104  25m 4736 S   18  1.3   1:10.59 apache2
16068 www-data  15   0 37552  24m 4740 S   14  1.2   1:10.05 apache2
16036 www-data  16   0 38388  25m 4796 S   11  1.2   1:10.62 apache2
15790 www-data  16   0 37436  24m 4768 R    6  1.2   0:57.44 apache2
15778 www-data  15   0 39040  25m 4760 S    6  1.3   1:01.68 apache2
15788 www-data  15   0 37540  24m 4800 S    5  1.2   1:17.28 apache2
14346 www-data  16   0 41256  27m 3820 R    5  1.3   1:13.78 apache2
13733 www-data  16   0 38364  25m 4740 R    3  1.2   1:06.87 apache2
16058 www-data  15   0 37840  24m 4808 S    1  1.2   1:06.84 apache2
3862 mysql     15   0  132m  24m 4772 S    1  1.2   0:25.81 mysqld
   1 root      22   0  1568  528  460 S    0  0.0   0:01.52 init
   2 root      RT   0     0    0    0 S    0  0.0   0:00.08 migration/0
   3 root      34  19     0    0    0 S    0  0.0   0:00.00 ksoftirqd/0

 

I really want to use this and get the whole school to use it but if a class of 20 cause this much trouble then I stuck, anyone got any ideas at all??

Posted

Sorry guys getting the following when trying to run as suggested:

 

Reading package lists... Done

Building dependency tree... Done

E: Couldn't find package apachetop

 

??

 

@Webman: Tell me about it

Posted

ok have it installed, what is the command to run it??

 

Have run apachetop but keep getting:

 

Cannot connect to fam: connection refused

Posted

Ooh, I remeber this bug. FAM isn't listed as a dependancy for apachetop (when it really should be).

sudo apt-get install fam

:)

Posted

Seems it's already there:

 

Reading package lists... Done
Building dependency tree... Done
fam is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 49 not upgraded.

Posted

Results of grep fam

 

root     27210  0.0  0.0   2880   800 pts/0    S+   11:11   0:00 grep fam

 

results of restart

 

* Restarting file alteration monitor...                                 [ ok ]

Posted
Well if there was an underlying configuration error with PHP, apache or mysql we are better off finding it, rather than papering over the cracks with a reverse proxy or a php accelerator. The machine really should be able to cope with that load.
Posted

Sorry geoff apachetop still doers not work.

 

Might I also say that this is a complete vanilla install of LAMP and moodle with the only config changes being LDAP auth for moodle and a template change, other than that, out of the box install

Posted

uname -a output:

 

Linux 4428-web1.jkhs-pd.local 2.6.15-26-server #1 SMP Thu Aug 3 04:09:15 UTC 2006 i686 GNU/Linux

 

cat /proc/cpuinfo output

 

processor       : 0
vendor_id       : GenuineIntel
cpu family      : 15
model           : 2
model name      : Intel(R) Xeon(TM) CPU 3.06GHz
stepping        : 9
cpu MHz         : 3066.950
cache size      : 512 KB
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 2
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe cid xtpr
bogomips        : 6138.60

processor       : 1
vendor_id       : GenuineIntel
cpu family      : 15
model           : 2
model name      : Intel(R) Xeon(TM) CPU 3.06GHz
stepping        : 9
cpu MHz         : 3066.950
cache size      : 512 KB
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 2
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe cid xtpr
bogomips        : 6133.74

Posted

P4 eh? With Hyperthreading too... Right.

sudo apt-get install linux-686

See if that runs things any better (you'll need to reboot). I suspect the hyperthreading is fubaring stuff.

Posted

Thanks Geoff,

 

Will try this, have another test sessions this afternoon (P5) so will let you know how it goes under stress

Posted

Well good news is that under load I am getting nowhere near the high load as before (25+) now seems to hold around 5.30 2.20 0.80 with a peak of 9.06 4.18 1.78

 

This still seems a little high to me or am i panicking??

 

output from apachetop:

last hit: 15:20:01         atop runtime:  0 days, 00:01:10             15:20:02
All:          405 reqs (   5.8/sec)       4045.5K (   57.8K/sec)   10228.5B/req
2xx:     377 (93.1%) 3xx:      28 ( 6.9%) 4xx:     0 ( 0.0%) 5xx:     0 ( 0.0%)
R ( 30s):     166 reqs (   5.5/sec)       2112.8K (   70.4K/sec)      12.7K/req
2xx:     162 (97.6%) 3xx:       4 ( 2.4%) 4xx:     0 ( 0.0%) 5xx:     0 ( 0.0%)

REQS REQ/S    KB KB/S URL
  45  1.50 152.3  5.1*/vle/mod/chat/gui_header_js/jsupdate.php
  17  0.59  1459 50.3 /vle/theme/standard/styles.php
  11  0.52   7.1  0.3 /vle/theme/standardwhite/styles.php
   8  0.28  88.4  3.0 /vle/mod/chat/gui_header_js/users.php
   8  0.28   2.5  0.1 /vle/mod/chat/gui_header_js/insert.php
   7  0.30  62.1  2.7 /vle/mod/chat/beep.wav
   4  0.16   0.8  0.0 /vle/mod/chat/empty.php
   3  0.18   0.7  0.0 /vle/pix/s/smiley.gif
   3  0.19  43.4  2.7 /vle/mod/chat/view.php
   2  0.11   4.0  0.2 /vle/user/pix.php/6/f2.jpg
   2  0.07   0.2  0.0 /vle/pix/t/switch_minus.gif
   2  0.07   0.1  0.0 /vle/lib/javascript-mod.php
   2  0.07  62.8  2.2 /vle/lib/overlib.js
   2  0.07   4.7  0.2 /vle/lib/cookies.js
   2  0.09  29.8  1.4 /vle/course/view.php
   2  0.07  22.0  0.8 /vle/lib/ufo.js
   2  0.07   0.1  0.0 /vle/pix/spacer.gif
   2  0.07   0.7  0.0 /vle/theme/standardwhite/gradient.jpg
   2  0.11   2.8  0.2 /vle/user/pix.php/5/f2.jpg
   1  0.03  10.4  0.4 /vle/
   1  0.25   0.0  0.0 /nagios/images/logos/printer.png
   1  0.25   0.0  0.0 /nagios/images/logos/switch.png
   1  0.04   0.4  0.0 /vle/pix/i/rss.gif
   1  0.25  42.9 10.7 /nagios/cgi-bin/status.cgi
   1  0.25   0.0  0.0 /nagios/stylesheets/status.css
   1  0.04   0.3  0.0 /vle/theme/standard/pix/tab/left.gif
   1  0.04   3.2  0.1 /vle/theme/standard/pix/tab/right.gif
   1  0.50   8.9  4.5 /vle/mod/survey/index.php
   1  0.04   0.1  0.0 /vle/pix/i/cross_red_small.gif
   1  0.04   0.3  0.0 /vle/pix/i/cross_red_big.gif
   1  0.03   0.7  0.0 /vle/theme/standard/styles_ie7.css
   1  0.03  12.6  0.4 /vle/lib/javascript-static.js
   1  0.05   5.9  0.3 /vle/course/enrol.php
   1  0.14  10.1  1.4 /vle/mod/quiz/view.php
   1  0.04   0.3  0.0 /vle/theme/standard/pix/tab/tabrow1.gif
   1  0.20   6.2  1.2 /vle/login/index.php
   1  0.07   0.2  0.0 /vle/calendar/overlib.cfg.php
   1  0.07   2.6  0.2 /vle/pix/moodlelogo.gif
   1  0.07  32.2  2.1 /vle/pix/u/f2.png
   1  0.07   1.9  0.1 /vle/user/pix.php/14/f2.jpg
   1  0.07   1.6  0.1 /vle/user/pix.php/7/f2.jpg
   1  0.08   4.8  0.4 /vle/mod/quiz/attempt.php
   1  0.08   6.6  0.6 /vle/course/category.php
   1  0.09   6.0  0.5 /vle/mod/forum/user.php
   1  0.09   0.1  0.0 /vle/pix/i/users.gif
   1  0.09   0.1  0.0 /vle/mod/assignment/icon.gif
   1  0.09   0.1  0.0 /vle/mod/chat/icon.gif
   1  0.09   0.1  0.0 /vle/mod/forum/icon.gif


 

The above coincided with a 5.20 2.65 1.96 Load

Posted

Ok, time to do some apache tuning :)

  • Set the MaxClients directive correctly. Use this formula to help
    MaxClients = Total available memory * 80% / Max memory usage of apache process
    (Roughly in my head that's around 150 for your system)
     
  • consider lowering MaxRequestsPerChild to as low as 20-30
     
  • lower the KeepAliveTimeout to between 2 and 5
     
  • reducing the value of TimeOut to between 30 to 60

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...