This is the mail archive of the glibc-linux@ricardo.ecn.wfu.edu mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Slow pthread_create() under high load


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]