- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- select(2) timeout
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
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
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
тАО03-28-2006 07:49 AM
тАО03-28-2006 07:49 AM
select(2) timeout
The problem is that occassionaly we call select(2) with a timeval of something like 0.25 seconds (tp->tv_sec = 0 and tp->tv_usec = 250000) and select takes much longer than this to return. In these cases, it seems to completely ignore the timeout and blocks until input is received on a socket. This causes us to process some time based events much later than we should which in our protocols can cause the process to be declared nonresponsive by one of its peers.
What kinds of things can cause select() to take much longer than the specified timeout to return? I'm trying to get the customer to run glancplus or anything else that will collect performance data so I can see what was going on during the time that select was taking its time.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-28-2006 07:58 AM
тАО03-28-2006 07:58 AM
Re: select(2) timeout
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-28-2006 08:02 AM
тАО03-28-2006 08:02 AM
Re: select(2) timeout
Customer already has PHKL_33374 installed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-28-2006 08:25 AM
тАО03-28-2006 08:25 AM
Re: select(2) timeout
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-28-2006 08:40 AM
тАО03-28-2006 08:40 AM
Re: select(2) timeout
select(2) takes a longer delay if a timeout of 10ms is
specified.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-28-2006 09:23 AM
тАО03-28-2006 09:23 AM
Re: select(2) timeout
The process is multithreaded but runs only one thread actually runs at a time -- threads have preemption points that allow them to give up the CPU and allow another thread to run.
When we're in the select call, we know that we just went through a cycle of giving time slices to threads and they are now all waiting on a condition to be given another time slice.
Threads are created to handle messages received from other processes. If we ever had more than 250 concurrent threads running in this process, it would display a warning which I'm not seeing.
After running threads we check for input messages by calling select(). In the cases where there select is delaying, it appears that select is returning multiple fds ready -- say 10 or 16. There are about 250 fd's being passed into the select call.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-28-2006 01:03 PM
тАО03-28-2006 01:03 PM
Re: select(2) timeout
ftp://ftp.cup.hp.com/dist/networking/briefs/use_eventports.txt
if you are on 11.23, eventports are there already and you can look at the section 7 manpage for poll(). Eventports can be significantly faster than select/poll when there are large numbers of file descriptors involved.