This is the mail archive of the
glibc-linux@ricardo.ecn.wfu.edu
mailing list for the glibc project.
Slow pthread_create() under high load
- To: linux-kernel at vger dot rutgers dot edu
- Subject: Slow pthread_create() under high load
- From: sasha at mysql dot com
- Date: Fri, 24 Mar 2000 16:26:16 -0700
- CC: mysql at lists dot mysql dot com, glibc-linux at ricardo dot ecn dot wfu dot edu, monty at mysql dot com
- Organization: MySQL
- Reply-To: glibc-linux at ricardo dot ecn dot wfu dot edu
Hello, everyone. I've been benchmarking MySQL under high load on Linux ( kernel
2.2.12, glibc 2.1.2), and noticed a rather interesting occurence with unusually
slow connection establishment process ( compared to how fast the actual query
would execute, which I traced to a problem in pthread_create() in glibc:
The problem is that when the system has many threads running and is doing a lot
of context switches, it takes unusually too long to get from pthread_create()
call to the first line of the function that is being passed as a parameter to
pthread_create() - in other words, pthread_create() is taking too long to create
the thread.
Does anybody have an explanation of why, and maybe even solution to the problem?
--
Sasha Pachev
+------------------------------------------------------------------+
| TcX ____ __ _____ _____ ___ == mysql@tcx.se |
| /*/\*\/\*\ /*/ \*\ /*/ \*\ |*| Sasha Pachev |
| /*/ /*/ /*/ \*\_ |*| |*||*| mailto:sasha@mysql.com |
| /*/ /*/ /*/\*\/*/ \*\|*| |*||*| Provo, Utah, USA |
| /*/ /*/ /*/\*\_/*/ \*\_/*/ |*|____ |
| ^^^^^^^^^^^^/*/^^^^^^^^^^^\*\^^^^^^^^^^^ |
| /*/ \*\ Developers Team |
+------------------------------------------------------------------+