[Web4lib] mediawiki and excessive CPU usage
Ken Irwin
kirwin at wittenberg.edu
Tue Jul 10 16:27:28 EDT 2007
The wiki is running on:
SunOS 5.8
PHP 4.3.11
Apache 2.0
I don't have the kind of access that allows me to run strace, but our
sysadmin was able to get some kind of reading on what processes are
hogging up the bulk of the server's attention. There were about 100
different wiki-related scripts, but here were the biggies. The first
number shows how many times the particular operation occured in one
minute; this comes from the output of a "truss" command, with which I am
not familiar:
50 stat("/usr/local/www/green_guide/normal/UtfNormal.php",
50 stat("/usr/local/www/green_guide/includes/normal/UtfNormal.php",
50 resolvepath("/usr/local/www/green_guide/includes/normal/UtfNormal.php",
50 open("/usr/local/www/green_guide/includes/normal/UtfNormal.php",
39 stat("/usr/local/www/green_guide/includes/Revision.php",
39 stat("/usr/local/www/green_guide/Revision.php",
39 resolvepath("/usr/local/www/green_guide/skins/MonoBook.php",
39 resolvepath("/usr/local/www/green_guide/skins/MonoBook.deps.php",
39 resolvepath("/usr/local/www/green_guide/includes/Revision.php",
39 open("/usr/local/www/green_guide/skins/MonoBook.php",
39 open("/usr/local/www/green_guide/skins/MonoBook.deps.php",
39 open("/usr/local/www/green_guide/includes/Revision.php",
26 stat("/usr/local/www/green_guide/languages/LanguageUtf8.php",
26 stat("/usr/local/www/green_guide/languages/LanguageEn.deps.php",
26 stat("/usr/local/www/green_guide/includes/normal/UtfNormalUtil.php",
26 stat("/usr/local/www/green_guide/includes/Title.php",
26 stat("/usr/local/www/green_guide/includes/SkinTemplate.php",
26 stat("/usr/local/www/green_guide/includes/LanguageUtf8.php",
26 stat("/usr/local/www/green_guide/includes/GlobalFunctions.php",
26 stat("/usr/local/www/green_guide/includes/Database.php",
26 stat("/usr/local/www/green_guide/includes/CacheManager.php",
26 stat("/usr/local/www/green_guide/includes/Article.php",
26 stat("/usr/local/www/green_guide/Title.php",
26 stat("/usr/local/www/green_guide/LanguageUtf8.php",
26 stat("/usr/local/www/green_guide/GlobalFunctions.php",
26 stat("/usr/local/www/green_guide/Database.php",
26 stat("/usr/local/www/green_guide/CacheManager.php",
26 stat("/usr/local/www/green_guide/Article.php",
26 resolvepath("/usr/local/www/green_guide/languages/LanguageUtf8.php",
26 resolvepath("/usr/local/www/green_guide/index.php",
26 resolvepath("/usr/local/www/green_guide/includes/normal/UtfNormalUtil.php",
26 resolvepath("/usr/local/www/green_guide/includes/Title.php",
26 resolvepath("/usr/local/www/green_guide/includes/SkinTemplate.php",
26 resolvepath("/usr/local/www/green_guide/includes/GlobalFunctions.php",
26 resolvepath("/usr/local/www/green_guide/includes/Database.php",
26 resolvepath("/usr/local/www/green_guide/includes/CacheManager.php",
26 resolvepath("/usr/local/www/green_guide/includes/Article.php",
26 open("/usr/local/www/green_guide/languages/LanguageUtf8.php",
26 open("/usr/local/www/green_guide/includes/normal/UtfNormalUtil.php",
26 open("/usr/local/www/green_guide/includes/Title.php",
26 open("/usr/local/www/green_guide/includes/SkinTemplate.php",
26 open("/usr/local/www/green_guide/includes/GlobalFunctions.php",
26 open("/usr/local/www/green_guide/includes/Database.php",
26 open("/usr/local/www/green_guide/includes/CacheManager.php",
26 open("/usr/local/www/green_guide/includes/Article.php",
ken
Michael McDonnell wrote:
> Ken Irwin wrote:
>> Hi folks,
>>
>> We've got a wiki running on our library website (using MediaWiki
>> 1.6.8) and have noticed that since installing it our CPU usage is
>> almost always right up at 99% of capacity. About 100 distinct
>> processes related to the wiki run about 2000 times every minute. It
>> may be that a high-traffic wiki needs all this legwork to keep itself
>> up-to-date and functioning well, but this is a super low-traffic
>> wiki. Does anyone know if it's possible to get wiki to chill out a
>> bit? ($cpuQualudes = "yes";)
>>
>> We're thinking of installing additional wikis on the same machine for
>> different purposes, and we'd like to not fry its little brain. Any
>> advice?
> Hi Ken,
>
> This may be a misconfiguration or a bug. What platform are you
> running mediawiki on? Apache on Linux? What version of PHP? How
> much RAM does your server have?
>
> Do you see any logfile activity that corresponds with this activity?
> That is, are there access or error logs being generated in large
> volumes? You can change what apache is logging by changing the
> "LogLevel" configuration line (typically in httpd.conf). Change it
> from "notice" to "info" or "debug" and see if that provides any
> relevant information.
>
> Under linux you can also take a peak at what those crazy processes are
> doing with the
> "strace" command (under Solaris 10 you could use dtrace). e.g. strace
> -p <pid> where <pid> is the ID of one of the crazy processes.
>
> --
> Michael McDonnell
--
Ken Irwin
Reference Librarian
Thomas Library, Wittenberg University
More information about the Web4lib
mailing list