Hopeless Geek

Tagline

It doesn’t take much to make a woman happy, but it takes more than is contained in heaven and earth to keep her that way.

Home » Blogs » Adam Knight's blog

How To Kill a Server


  • Crap Tech
  • Work
November 30, 2005 - 9:09pm

Step One: Underestimate the size of the memory by 50%.
Step Two: Using that measurement, allocate a quarter of what you think the server has in memory to a MySQL query cache, and the other half to various other caches in MySQL and Apache.
Step Three: ab -kc 50 -t $((5*60)) http://the.server/

In about thirty minutes, when I could actually enter text at the keyboard again, I discovered the folly, adjusted the sizes, and ordered more RAM. During that thirty minutes, however, I was about to die. I’d cancelled the benchmark around thirty seconds into it when I noticed no progress and the fans in the G5 started to sound like La Guardia’s runway around mid-day. It didn’t let up for a half-hour more.

After some careful listening, I heard the hard drive through the fans. It was the lovely sound of VM thrashing as it moved Apache and MySQL around a few hundred times to get the very first queries done, it would appear.

Bad VM implementation, bad.

When it came up, I started to ramp the connections. I started at ten, then fifteen, then twenty. Around forty connections the G5 bit it again, even with the right memory sizes. I’m going to have to toy with that when I get back to work. It doesn’t make much sense. Apache is setup for up to 100 connections, half persistent. MySQL has 64M of query cache, 8M for keys, and 2M for sort. There’s nothing else running.

Grr. Arg.

  • Adam Knight's blog
  • Printer-friendly version

Post new comment

The content of this field is kept private and will not be shown publicly.
 
Input format
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>. Beside the tag style "<foo>" it is also possible to use "[foo]".
  • Link to Amazon products with: [amazon product_id inline|full|thumbnail]. Example: [amazon 1590597559 thumbnail]
  • You can use Textile markup to format text.
  • Textual smileys will be replaced with graphical ones.
  • You may insert videos with [video:URL]
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>. Beside the tag style "<foo>" it is also possible to use "[foo]".
  • Link to Amazon products with: [amazon product_id inline|full|thumbnail]. Example: [amazon 1590597559 thumbnail]
  • You can use Markdown syntax to format and style the text. Also see Markdown Extra for tables, footnotes, and more.
  • Textual smileys will be replaced with graphical ones.
  • You may insert videos with [video:URL]
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>. Beside the tag style "<foo>" it is also possible to use "[foo]".
  • Link to Amazon products with: [amazon product_id inline|full|thumbnail]. Example: [amazon 1590597559 thumbnail]
  • Lines and paragraphs break automatically.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Textual smileys will be replaced with graphical ones.
  • You may insert videos with [video:URL]

More information about formatting options

Syndicate content Syndicate content

Site Navigation

  • Home
  • Recent
  • Popular
    • Today
  • Top rated
    • Recent votes
  • Elsewhere
    • FriendFeed
    • Friends
    • Software
    • Unsane
View Adam Knight's profile on LinkedIn

Navigation

  • My votes

Recent comments

  • Do you have any idea as to
    4 days 3 hours ago
  • Absolutely amazing when you
    5 days 15 hours ago
  • I am pro-choice, but not for
    2 weeks 1 day ago
  • My apologies. It is your
    2 weeks 2 days ago
  • Well, first, get your own
    2 weeks 2 days ago
  • There is nothing mythical
    2 weeks 2 days ago
  • Well, the number of square
    2 weeks 5 days ago
  • I think you’re wrong by a
    2 weeks 5 days ago
  • I couldn’t agree more! I am
    2 weeks 6 days ago
  • I think those numbers are
    3 weeks 15 hours ago

Today's popular content

  • Careful, America... (43)
  • Comment Spam Attack (3)
  • Job: UI Developer (2)
  • www.independent.co.ukBlair condemns attacksPrime Minister Tony (2)
  • MacNN Can't Read, Intuit is Bailing on Mac Quicken (2)
more

Hopeless Geek Feeds

  • Hopeless Geek
  • Hopeless Geek - Comments

Quotes

“I say that a man must be certain of his morality for the simple reason that he has to suffer for it.” — ILN 8/4/06 – G. K. Chesterton

Footer Links

  • Badges
  • Contact
Powered by Drupal, an open source content management system
© Adam Knight, All Rights Reserved except where otherwise noted.