Slow pthread_create() under high load

From: sasha@mysql.com
Date: Fri Mar 24 2000 - 18:26:16 EST


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

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Mar 31 2000 - 21:00:14 EST