Our application has 9 threads, 1 main thread and 8 monitoring threads. The main thread does network transactions and the monitoring threads re-create failed network connections periodically. We ran a test with broken network connections to see monitoring threads try to re-create network connections. In this test, we experienced delay in the main thread. Truss shows the main thread called lwp_park and slept for quite sometime before a monitoring thread called lwp_unpark to wake it up. The delay in main thread sometime was more than 1 minute. There's no mutex contention between these threads.
The machine I'm using has 4 cpus with 4 cores each. The application only used less 0.1% CPU. I seems to me the machine has enough resources for all 9 threads to run. I'm puzzled by why the main thread gets parked for so long. Any assistance in explained when and why lwp_park and lwp_unpark are called by each lwp is much appreciated. Cathy
_______________________________________________ opensolaris-code mailing list opensolaris-code@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/opensolaris-code