This is what I have in /etc/my.cnf on my current MySQL server (dual AthlonMP,2GB RAM)

[mysqld]
port = 3306
socket = /tmp/mysql.sock
skip-locking
log-slow-queries = slowqueries.log
set-variable = key_buffer=256M
set-variable = max_allowed_packet=1M
set-variable = table_cache=1024
set-variable = sort_buffer=2M
set-variable = record_buffer=2M
set-variable = thread_cache=24
set-variable = max_connections=510
set-variable = thread_concurrency=16
set-variable = myisam_sort_buffer_size=64M
set-variable = tmp_table_size=128M
set-variable = wait_timeout=90

Whilst monitoring the server using 'mytop' is can see the server using between 250 & 400 threads, never dropping below 210 threads ('top' reports about 15-20MB RAM free)

'extended-status' reports: Max_used_connections = 480

And these numbers are going to grow as the server gets busier, hence the Dual Xeon server with 6GB RAM. Instead of added more h/w in the future though, I'd like to be able to squeeze more
out of Linux/MySQL

I used a C program (thread-limit.c) which tests the amount the threads Linux can create (am I correct in assuming these are the same thing?) (I can send the 4k file if required)

On my server, the program reports 255 threads max which I believe is down to glibc...

The MySQL binaries are reported to handle 1000-1500 connections. I was wondering if anybody has achieved this building with source? If so, what was involved? (version of libs, etc were used?)

Possibly of relevance are the results of running 'thread-limit' against various platforms (glibc versions were taken from 'rpm -q'; 'qpkg' in the case of Gentoo)

Distro | kernel | glibc | threads created before failure
Mandrake 8 | 2.4.19-16mdk | 2.2.5-16mdk | 255
Gentoo | 2.4.19-gentoo-r9 | 2.2.5-r7 | 1021
RedHat 7.2 | 2.4.19-2 (custom)| 2.2.5-42 | 255

Unfortunately, I'm not ready to deploy Gentoo on a production server, but they're doing something differently...

Many thanks






From: Jeremy Zawodny <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
To: mysql list <[EMAIL PROTECTED]>
CC: [EMAIL PROTECTED]
Subject: Re: MySQL on large server
Date: Thu, 9 Jan 2003 14:36:38 -0800

On Thu, Jan 09, 2003 at 08:55:36AM +0000, mysql list wrote:
> Hi,
>
> I was wondering if anybody has built MySQL 3.23 from source that can
> handle a high number of connections & threads. I've have tried MySQL
> binaries in the past (not RPMs), but these have had stability/load
> problems. When building from source I don't have those issues, but I
> am limited by the inbuilt limits (of glibc,etc...)

How many connections do you need?

If memory serves, the master db behind Slashdot was handling around
700 connections on a 4 processor P3 Xeon with 4GB RAM. But it's been
a while since I've talked with Brian about it.

> I need to build MySQL 3.23 on a production server running RedHat
> 7.2, patched glibc (2.2.5-42) and a custom kernel (2.4.19-2
> SMP). Hardware contains Dual Xeon 2.4GHz (hyperthreading disabled)
> and 6GB RAM.

With that kind of RAM and horespower you should be able to go well
above 500 connections.

I'd say more on this topic, but I've not really needed to push MySQL
in that direction. We tend to use more boxes that cost less and
replicate data.

Jeremy
--
Jeremy D. Zawodny | Perl, Web, MySQL, Linux Magazine, Yahoo!
<[EMAIL PROTECTED]> | http://jeremy.zawodny.com/

MySQL 3.23.51: up 25 days, processed 863,460,485 queries (388/sec. avg)

---------------------------------------------------------------------
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

_________________________________________________________________
MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus


---------------------------------------------------------------------
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