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]

Re: Slow pthread_create() under high load


sasha@mysql.com writes:
 > Alan Cox wrote:
 > 
 > So what you are saying is that the scheduler changed after 2.3.9 to make the
 > forks faster under high load? Will those changes make it to 2.4 ?
 > 
 > Could somebody also elaborate on "the scheduler penalizes across forks" for
 > those who are not as familiar with the kernel internals/jargon? Does that mean
 > that a process that has called fork()/clone() automatically gets punished for
 > this great sin by getting its priority lowered? 
 > 
 > If the above is correct, how long does the punishment last?
 > 
 > -- 
 > Sasha Pachev
 > 


I understood (or misunderstood)  Mr. Cox notes that when a new thread
is created, scheduler  goes through all existing threads and changes
their time slice / priority , in order to accomodate a new thread in a 
fair manner.  I do not know what Mr. Ingo suggested, but what I
learned from reading various CPU cookbooks is that most CPU's or MMU's 
have better methods for this 'fairness' approach. 

Regarding POSIX threads being "braindamaged pile of crap", it is
unfortunately the only available standard for writing relatively
platform - independent multithreaded servers.

Regards,

Sinisa

+----------------------------------------------------------------------+
| TcX  ____  __     _____   _____  ___     ==  mysql@tcx.se            |
|     /*/\*\/\*\   /*/ \*\ /*/ \*\ |*|     Sinisa Milivojevic          |
|    /*/ /*/ /*/   \*\_   |*|   |*||*|     mailto:sinisa@mysql.com     |
|   /*/ /*/ /*/\*\/*/  \*\|*|   |*||*|     Larnaka, Cyprus             |
|  /*/     /*/  /*/\*\_/*/ \*\_/*/ |*|____                             |
|  ^^^^^^^^^^^^/*/^^^^^^^^^^^\*\^^^^^^^^^^^                            |
|             /*/             \*\                Developers Team       |
+----------------------------------------------------------------------+

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