PDA

View Full Version : My my.cnf


Shaman
Sun 11th Jun '00, 11:50pm
I have MySQL running ~30 databases. One of them has over 5 million records and requires a 12-way select and sort.

It runs like a charm. 12 slow queries in 800M so far, probably due to backup chores.

It runs vBulletin with no discernable load bump. (0.001 load all day long) It is used by over 10,000 users and serves up phpAds, vBulletin, TWIG, and more for http://www.kos.net

My config:

--

# The MySQL server
[mysqld]
skip-locking
set-variable = key_buffer=32M
set-variable = sort_buffer=4M
set-variable = record_buffer=1M
set-variable = table_cache=600
set-variable = max_connections=300
# Start logging
#log

[mysqldump]
quick
set-variable = max_allowed_packet=16M

[mysql]
no-auto-rehash

[isamchk]
set-variable = key_buffer=16M


---

Note this is the stable version of MySQL.

Running on Solaris 2.7 with 1GB memory + 3 drives. (two mirrored, one hot spare)

[Edited by Shaman on 06-12-2000 at 11:51 AM]

UserName
Sat 17th Jun '00, 5:07am
Just a quick note to let you know that I decided to try out your configuration on my system. Thanks for posting it and I'll let you know if it causes my server to explode.

Shaman
Tue 27th Jun '00, 4:39am
One thing I've noticed from other threads is that people have many instances of MySQL running as processes.

Huh?

On Solaris (at least), MySQL is a threaded application that takes advantage of multiple processors, and shared memory between threads.

So, the question is - are people having problems partly because they are running MySQL in some other, less optimal mode or perhaps they do not have processes sharing memory?

I don't know, but here's an extended status dump (MySQL was rebooted a few days ago for a small my.cnf change to a 64M key_buffer, so ignore uptime, it's stable):

+--------------------------+------------+
| Variable_name | Value |
+--------------------------+------------+
| Aborted_clients | 0 |
| Aborted_connects | 1 |
| Created_tmp_tables | 1139 |
| Delayed_insert_threads | 0 |
| Delayed_writes | 0 |
| Delayed_errors | 0 |
| Flush_commands | 1 |
| Handler_delete | 37234 |
| Handler_read_first | 61376 |
| Handler_read_key | 358147 |
| Handler_read_next | 6755382 |
| Handler_read_rnd | 1567567649 |
| Handler_update | 29697 |
| Handler_write | 291043 |
| Key_blocks_used | 53577 |
| Key_read_requests | 2462300 |
| Key_reads | 50297 |
| Key_write_requests | 362001 |
| Key_writes | 317407 |
| Max_used_connections | 124 |
| Not_flushed_key_blocks | 0 |
| Not_flushed_delayed_rows | 0 |
| Open_tables | 176 |
| Open_files | 98 |
| Open_streams | 0 |
| Opened_tables | 234 |
| Questions | 1737522 |
| Running_threads | 62 |
| Slow_queries | 25 |
| Uptime | 926672 |
+--------------------------+------------+