[Moin-user] CPU over 100% while "RecentChanges"
Marcel Häfner
marcel.haefner at heavy.ch
Sun Apr 8 17:13:35 EDT 2007
Hi there
I'm running now a MoinMoin (actually a small Wikifarm) with Twisted on a
RedHat Linux System with 4 XEON CPUs and 4 GB Memory (well it's hosting
environment; so not only for me).
Due the configuration the twisted instance running as localhost, with 10
threads (default) and the main front apache proxy the request.
While I made some performance Test with AB (-n 100 -c 10) I notice that
the Memory usages stays around 15-30MB and the CPU goes with 2 or 5%
normally. Interesting is if I run my test on a Page with
[[RecentChanges]] included... the CPU goes up to 110%. (see below for
some data). The "normal" Page Access without Stress Testing is really
fast. I did run those tests on different days and times and saw always
the same result / effect.
As far as I understand Python and the Twisted Framework... it's only
using threads so I can not benefit from multiple processors. But anyway
I'm a bit confused 'bout this high %cpu wile fetching the RecentChanges
Page.
*****************************
MY QUESTIONS
*****************************
1. Why; or what makes the CPU goes so high?
*******************************************
a) Diskaccess?
b) I'm missing something... like AntiSpam or SurgeProtection that makes
the CPU goes so high?
2. Are there any optimizing possibilities, like:
*******************************************
a) Running MemCached with MoinMoin?
b) A Makro like RecentChangesChached (like the TitleSearch)?
c) Optimizing the Twisted Framework, how (maybe forking process; extend
the threads to 20 doesn't help a lot..)
d) Using Mod_Python or Standalone Modus (FastCGI ist not an option for
me)
e) don't care... just avoid RecentChange, drink a coffee and waiting for
1.6
thanks for any comments.
Best regards,
Marcel
***************************************************
AB Test
***************************************************
ab -n 100 -c 10 http://lotek.heavy.ch/Index
Benchmarking lotek.heavy.ch (be patient).....done
Server Software: TwistedWeb/2.5.0
Server Hostname: lotek.heavy.ch
Server Port: 80
Document Path: /Index
Document Length: 32752 bytes
Concurrency Level: 10
Time taken for tests: 14.215936 seconds
Complete requests: 100
Failed requests: 0
Write errors: 0
Total transferred: 3321210 bytes
HTML transferred: 3301919 bytes
Requests per second: 7.03 [#/sec] (mean)
Time per request: 1421.594 [ms] (mean)
Time per request: 142.159 [ms] (mean, across all concurrent
requests)
Transfer rate: 228.12 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 139 144 5.0 142 164
Processing: 590 1238 132.7 1235 1601
Waiting: 164 407 91.3 411 1081
Total: 732 1383 134.0 1378 1751
Percentage of the requests served within a certain time (ms)
50% 1378
66% 1403
75% 1420
80% 1441
90% 1522
95% 1664
98% 1730
99% 1751
100% 1751 (longest request)
***************************************************
Normal Timing (without Stress Testing)
***************************************************
1. Timings of RecentChange
* compile_huge_and_ugly = 0.000s
* getACL = 0.035s
* getPageList = 0.017s
* load_multi_cfg = 0.000s
* run = 0.170s
* send_page = 0.147s
* send_page_content = 0.117s
* total = 0.172s
2. a single Page
* compile_huge_and_ugly = 0.000s
* getACL = 0.003s
* load_multi_cfg = 0.000s
* run = 0.057s
* send_page = 0.056s
* send_page_content = 0.020s
* total = 0.060s
More information about the Moin-user
mailing list