[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: no.of threads using NPTL



On Mon, 14 Oct 2002, Saurabh Desai wrote:

>   When I changed the number in /proc/sys/kernel/threads-max to 40000,
>   I was able to create 32748 threads using NPTL, but it took 3:15min to
>   complete, compare to just under 3secs using NGPT.

the reason why NGPT performs better is that NGPT does not create POSIX
conform stack frames, which have a guard page. NPTL does so and triggers a
kernel inefficiency wrt. managing a large number of vmas. NPTL creates two
stack vmas per thread, which gives 64k *separate* vmas, which is quite
expensive to manage.

if NGPT used the POSIX-mandated guard page then it would trigger the same
inefficiency.

i'm currently working on fixing the kernel, but obviously due to the guard
page NPTL is at a performance disadvantage. NGPT should really fix their
implemntation.

	Ingo





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]