More on MySQL -- Fatal trap 12

Kris Gale kris-fbsd at asn.net
Tue Feb 17 17:12:49 PST 2004


> You expect 900 threads on the server (perhaps a few more
> for overhead tasks), right?

Yep, and that's what I see.  MySQL reports 900 threads in
this instance.

> What are the settings for kern.thread.*?

kern.threads.debug: 0
kern.threads.max_threads_per_proc: 2500
kern.threads.max_groups_per_proc: 2500
kern.threads.max_threads_hits: 0
kern.threads.virtual_cpu: 4

> I would like to see how MySQL works when using process
> scope threads.  Do you know enough to hack it to do that?

Wish I did. =)

> A step-by-step process of how to set up MySQL and run
> the tests would be nice along with the perl script.

The script is at http://hutta.com/test-threads.pl

A current build will automatically use KSE for MySQL, but
a build from a few weeks ago will need the proper entries
in libmap.conf.  Set OVERWRITE_DB=yes when installing
the port (databases/mysql40-server) to get default
databases set up, and my perl script will create everything
it needs for testing.

I haven't seen any difference in using BUILD_OPTIMIZED
or  BUILD_STATIC, so use those as you so feel.

I'm using the following config file for mysql:

---[ BEGIN /etc/my.cnf ]---

[client]
port            = 3306
socket          = /tmp/mysql.sock

[mysqld]
set-variable = max_connections=6000
port            = 3306
socket          = /tmp/mysql.sock
skip-locking
set-variable    = key_buffer=1024M
set-variable    = max_allowed_packet=1M
set-variable    = table_cache=512
set-variable    = sort_buffer=1M
set-variable    = record_buffer=1M
set-variable    = myisam_sort_buffer_size=128M
set-variable    = thread_cache=8
set-variable    = thread_concurrency=4
server-id       = 1
skip-innodb
tmpdir          = /usr/tmp/

[mysql]
no-auto-rehash

---[ END /etc/my.cnf ]----

Kris Gale


More information about the freebsd-threads mailing list