Created attachment 199443 [details]
simple c code
I have attached simple program which just creates one thread and computes time taken to create a thread.
dmesg | grep CPU
CPU: Intel(R) Xeon(R) Gold 5115 CPU @ 2.40GHz (2400.07-MHz K8-class CPU)
FreeBSD/SMP: Multiprocessor System Detected: 40 CPUs
Product Name: Super Server
Base Board Information
Product Name: X11DPH-Tq
On this system it takes about 6000 to 15000 microseconds ( usec) to create a thread.
I also ran Phoronix OS bench test suite and that also shows same issue.
Couple of other users have also reported this issue for FreeBSD 11.x
Please see these following links and look for "Create Threads" row.
On the other hand this issue is not found when I run FreeBSD 12.0 Beta3 on this same hardware. It takes about 200 to 300 usec to create one thread.