Shane,

----- Original Message -----
From: "Jeremy Zawodny" <[EMAIL PROTECTED]>
Newsgroups: mailing.database.mysql
Sent: Saturday, August 03, 2002 2:21 AM
Subject: Re: Crashing under high load


> On Fri, Aug 02, 2002 at 05:41:09PM -0500, Shane Allen wrote:
> >
> > The gentleman on PHPBuilder
(http://www.phpbuilder.com/columns/tim20000705.php3) (again, I acknowledge
this is an old article) says flat out that MySQL tends to die under high
load. Also, when I say high load, I am talking 15-30. I have yet to see an
application (other than MySQL when it's loaded down with queries) die under
this level of load.

it is not normal for MySQL or any other program to die under a high load. I
regularly run stress tests on MySQL/InnoDB on our 4-way Linux-2.4.16 server,
and a load of 20 is common in those tests.

Tim Perdue's article in PHPBuilder is old. And I am not sure he knew about
the problem of glibc allocating memory over thread stacks in Linux.

The most common cause of crashing under a high load is that on Linux the
memory allocation of MySQL approaches 2 GB. There is a bug in glibc which
allows glibc to allocate memory over thread stacks without giving any error
message. Other common causes are buggy disk drivers.

In your my.cnf max_connections has a very big value 2500. You have compiled
MySQL yourself, but have not set thread stack size lower than the default 2
MB? Then just the thread stacks can occupy 5 GB of memory. Sort buffer is
set to 5 MB. Under a high load sort queries can pile up and eat up 12.5 GB
of memory.

You should try setting sort_buffer and record_buffer to 1M.

.....................
[mysqld]
skip-locking
set-variable    = max_connections=2500
set-variable    = query_cache_size=64M
set-variable    = wait_timeout=3600
set-variable    = key_buffer=384M
set-variable    = max_allowed_packet=1M
set-variable    = table_cache=3000
# NOTE: Record buffer and Sort buffer are NOT shared among threads
# They are per-thread memory buffers.
set-variable    = sort_buffer=5M
set-variable    = record_buffer=5M
..................

> That's not normal at all.  MySQL shouldn't care about the system load.
> It may run *slower* but it shouldn't die.
>
> Jeremy
> --
> Jeremy D. Zawodny     |  Perl, Web, MySQL, Linux Magazine, Yahoo!
> <[EMAIL PROTECTED]>  |  http://jeremy.zawodny.com/
>
> MySQL 3.23.51: up 64 days, processed 1,352,421,911 queries (240/sec. avg)

Best regards,

Heikki Tuuri
Innobase Oy
---
Order technical MySQL/InnoDB support at https://order.mysql.com/
See http://www.innodb.com for the online manual and latest news on InnoDB





---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to