[OpenIndiana-discuss] how to trace what stops the daemon from sleeping?

Bob Friesenhahn bfriesen at simple.dallas.tx.us
Tue Jun 30 22:37:01 UTC 2015


On Tue, 30 Jun 2015, WarGrey Gyoudmon Ju wrote:

> Thank you, Bob.
>
> Finally I found the root cause is that pollsys is called too frequently.
> and this problem seems quite normal in Solaris family.

I am pretty sure that this has nothing to do with power management (as 
other have suggested).

The poll() call can wait for activities on file descriptors but can 
also be used for time-out such as for periodic event loops.  Some 
software is written poorly and executes periodic event loops quite 
often.

If you don't have source for the program, it might be possible to 
"fix" it by using the LD_PRELOAD enviroment variable and a tiny shared 
library which replaces poll() with one which insists on longer 
timeouts.  This might cause other problems to occur in the software 
though.

Bob
-- 
Bob Friesenhahn
bfriesen at simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/



More information about the openindiana-discuss mailing list