- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- 'poll' system call consuming 100% CPU on HPUX Itan...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-23-2018 02:24 AM
10-23-2018 02:24 AM
'poll' system call consuming 100% CPU on HPUX Itanium
The 'poll' system call on HPUX B.11.31 Itanium consumes 100% CPU if called repeatedly(timeout of 5000ms)with more than 100+ poll fd structures. The same works fine(less than 1% CPU) in HPUX B.11.23 Itanium and all the other Linux flavours.
The issue gets resolved if a 'nanosleep()' of 1 nanosecond is introduced just before the 'poll' system call.
This indicates that there exists a problem in 'poll' implemenation on HPUX B.11.31. Suspecting some of the fields/parameters inside 'poll' are not getting set/reset by kernel on calling repeatedly(timeout of 5000ms). Introducing a dummy sleep('nanosleep() of 1 nanosecond) between successive 'poll' (just before calling 'poll()') resolves the problem.
Is it a bug in HPUX B.11.31?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-23-2018 06:28 AM
10-23-2018 06:28 AM
Re: 'poll' system call consuming 100% CPU on HPUX Itanium
I guess the problem is in the "... repeatedly ...". So what do the poll() calls return? Maybe you can share the relevant piece of code?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-23-2018 09:17 AM
10-23-2018 09:17 AM
Re: 'poll' system call consuming 100% CPU on HP-UX Integrity
It's always a good idea to have a sleep in a loop when polling or looping so that other processes can get the CPU.
But you would think with a timeout of 5000 ms, that would be the "sleep". Is poll(2) returning with an error right away?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-23-2018 08:50 PM - edited 10-23-2018 08:53 PM
10-23-2018 08:50 PM - edited 10-23-2018 08:53 PM
Re: 'poll' system call consuming 100% CPU on HPUX Itanium
It's a server program. It monitors the client requests through 'poll()'. Here the '...repeatedly...' refers to "number of times poll() invokation increases as the number of client connection increases". I cannot think of any issue with "...repeatedly..." logic, the reason being is as follows:
1. The same logic works fine(less than 1% CPU) in HPUX B.11.23 Itanium and all the other unix systems(Linux, AIX, Solaries, FreeBSD).
2. The same logic works fine if I use 'select()' instead of 'poll()'
3. How does setting 'nanosleep()' of just 1 nano second before 'poll()' resolves the problem.
Why do we need to introduce the sleep() explicitly, in looping/polling as the last parameter of the 'poll()' i.e timeout does not work?