OpenBSD Journal

a Resource Problems

Contributed by Dengue on from the price-of-popularity dept.

As many of you are no doubt aware, the webserver is having resource problems. It's a small box, and the site is proving too much for it.

Basically, when it gets busy, apache gobbles up all the ram, the box starts to swap, and mysqld can't answer requests fast enough and locks up. I'm going to be working on some apache tuning over the next couple of days, and it may be hit and miss. Please bear with me.

Those of you who are grabbing the RSS summary file, please limit your updates to 1-2 times per day . You won't miss much, I assure you. I'm usually too busy with work these days to update the site more frequently. Some sites are polling for this content every 10 minutes. Given the resource limits of the webserver (ppro 180/64mb RAM), that's just too much.

Thank you for doing your part to help me keep this site up.

p.s. If there are any apache tuning gurus out there, drop me a line and we can discuss remedies.
jim

Updated 2000.09.18

After much scraping, shuffling, and scrounging, I managed to move this turkey to a p200 mmx with 128mb RAM. ApacheBench results show quite an improvement. To think, I only had to tear apart nearly every computer in the house and play "magical hardware" to do it.

(Comments are closed)


Comments
  1. By ipsec () apl@ipsec.ods.org on http://ipsec.ods.org

    What's eating up the most resources? My guess would by MySQL. I was going to turn my router (P166, 64 megs, OpenBSD) into a shell server for my friends, and after reading that post, I'm wondering if it will be able to handle the load. The only thing I'm really going to offer is email, irc, and webpages (the fanciest I will get with this will probably be PHP). Perhaps some people could post what they're running for hardware, how many users a day they have, average load, experiences, etc. It would be really helpful.
    Thanks.

  2. By Jason Stout () jasonstout@email.com on mailto:jasonstout@email.com

    What kind of ram do you need? 168pin, 72pin? I might be able to come up with a little to donate.

    Let us know what you need. I'm sure some of us would be more than happy to donate some hardware.

    Jason Stout

  3. By Boris () on http://he.net

    consider recompiling a stripped-down apache. remove any modules not used. Merciless with
    unused code.

    Generate the index for the home page.
    rather than parsing php each call.

    Try some daily caching in the HTTP headers.

    look at ulimit -a and push it up.

    consider mysql 3.23.24 (fine on obsd) with .MYI
    tables.

    I won't mind sending memory out.

  4. By Jonathan () on

    Recompile the kernel with the least support in order to save ram. retrieve --stable kernel.

    Strip Apache's apaci config down, remove everything, compile php with minimum of support,
    configure httpd.conf to be more simple.
    HostnameLookups off, also, not too many Directory Index, Try keeping it very simple. also edit php.ini for fullest optimizations.

    Setup FFS_SOFTUPDATES, create a small partition for httpd's data in order to conserve FULL I/O Speed.

    Try Buying a better computer, computers these days are cheap.

    Try running minimum processes on the server,
    add 3x ram for swap.

    Try getting a new computer just for mysql.

    Edit every single daemon conf file in order to make it use the least ram.

    result of "HEAD / HTTP/1.1" from www.deadly.org
    HTTP/1.1 400 Bad Request
    Date: Sun, 17 Sep 2000 20:00:17 GMT
    Server: Apache/1.3.9 (Unix) PHP/3.0.16 mod_ssl/2.4.5 OpenSSL/0.9.4

    consider upgrading to apache 1.3.12 is and php 4.0.2

    remove SSL, heh, im sure this site doesnt do ecommerce.

    anyways, have fun.


  5. By Steven Jeffers () on

    Netscape says that the expire date on the images is not set, and therefore they can't be cached. It should be safe to make images cachable since their static. If they were the page would load faster since loading images takes the most time.
    http://www.apache.org/docs-1.2/mod/mod_expires.html

Latest Articles

Credits

Copyright © - Daniel Hartmeier. All rights reserved. Articles and comments are copyright their respective authors, submission implies license to publish on this web site. Contents of the archive prior to as well as images and HTML templates were copied from the fabulous original deadly.org with Jose's and Jim's kind permission. This journal runs as CGI with httpd(8) on OpenBSD, the source code is BSD licensed. undeadly \Un*dead"ly\, a. Not subject to death; immortal. [Obs.]