Bug #41337 Number of threads created increases too high

Submitted: 9 Dec 2008 20:07 Modified: 30 Oct 2009 6:25
Reporter: Mariella Di Giacomo Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server Severity:S5 (Performance)
Version:MySQL 5.1.30 OS:Linux (Linux Debian Lenny)
Assigned to: CPU Architecture:Any
Tags: MySQL 5.1.30, threads created

[9 Dec 2008 20:07] Mariella Di Giacomo
Description:
I have  been testing  MySQL 5.1.30 (source package compiled with the following options 
./configure  'CC=gcc' 'CFLAGS=-DBIG_JOINS=1 -O3' 'CXX=g++' 'CXXFLAGS=-DBIG_JOINS=1 -felide-constructors -fno-exceptions -fno-rtti -O3' '--prefix=.......' '--localstatedir=....../data' '--libexecdir=....../bin' '--datadir=...../data' '-with-comment=Debian amd_64' '--with-server-suffix=Debian x86_64' '--enable-shared' '--enable-static' '--enable-thread-safe-client' '--enable-assembler' '--enable-local-infile' '--with-big-tables' '--with-raid' '--with-mysqld-user=mysql' '--with-libwrap' '--with-mysqld-ldflags=-all-static' '--with-vio' '--with-bench' '--with-readline' '--with-extra-charsets=all' '--with-innodb' '--with-isam' '--with-archive-storage-engine' '--with-csv-storage-engine' '--with-federated-storage-engine' '--with-embedded-privilege-control' '--with-zlib-dir=bundled' '--with-ssl=bundled' '--with-fast-mutexes' '--with-pstack' '--with-partition'"

for storing data in several databases.
Each database contains a few hundred thousand tables.
All the tables have MYISAM as storage engine.

All the operations executed on those tables during the tests are inserts+updates.
Each request is wrapped using connect, and disconnect, so each client sends connect, statement (insert or update) and disconnect.
The number of concurrent requests that are performed is 200 (200 parallel Perl clients sending requests).

MySQL settings on my.cnf
table_cache = 260
thread_cache_size = 256
thread_stack = 256K
thread_concurrency = 16

During the benchmarks the number of threads created grows quite high compared to previous MySQL versions such as 5.1.23 (from source code or Debian). The same behaviour  happened also on MySQL 5.1.26 (from source code or MySQL Debian) and MySQL 5.1.28

E.g.

+------------------------+-------+
| Variable_name          | Value |
+------------------------+-------+
| Delayed_insert_threads | 0     |
| Slow_launch_threads    | 0     |
| Threads_cached         | 255   |
| Threads_connected      | 2     |
| Threads_created        | 3276  |
| Threads_running        | 1     |
+------------------------+-------+

 

How to repeat:

Create several databases (e.g. 20, 30, etc..)
Each database contains a few hundred thousand tables.
All the tables have MYISAM as storage engine.
Run from client/s 200 parallel perl processes that connect, send insert or update, disconnect
[30 Sep 2009 6:25] Sveta Smirnova
Thank you for the report.

Please provide example how you connect to MySQL in Perl application (row with DBI->connect and connection options if they specified separately). Please also send full configuration file.
[1 Nov 2009 0:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.054 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.