?
Solved

Is SO_SNDTIMEO valid for small time intervals under kernel 2.4?

Posted on 2006-04-11
4
Medium Priority
?
492 Views
Last Modified: 2008-02-26

I continuously sent 1.5K udp packet over 1Gbps interface using blocking i/o. I also set  SO_SNDTIMEO as 50us and measured the time before and after writev().

it seems so_sndtimeo does not work, and i constantly got 300us delay (due to the busy sendind loop...)

any insight is highly appreciated...
0
Comment
Question by:adairwu
2 Comments
 
LVL 43

Accepted Solution

by:
ravenpl earned 500 total points
ID: 16433671
50us is 50 microseconds? 50/1000000 fraction of second (right?)
Considering that linux clock is ticking 100 per second (1000 times in kernel 2.6 - but confugureable) the resolution You should expect is 1ms (milisecond)...
same applies to usleep()
0
 
LVL 3

Assisted Solution

by:leisner
leisner earned 500 total points
ID: 16458266
this is interesting...

http://www.developerweb.net/forum/archive/index.php/t-3439.html

I definitely recall strange experiences with this years ago...

Rich Stevens didn't mention it in his books, his a response he wrote in google groups:
       
From:            W. Richard Stevens - view profile
Date:            Fri, Mar 21 1997 12:00 am
Email:             rstev...@noao.edu (W. Richard Stevens)
Groups:             comp.unix.solaris
Not yet rated
Rating:       
show options

Reply to Author | Forward | Print | Individual Message | Show original | Report Abuse | Find messages by this author

> Does anyone know what type of argument setsockopt expects when you set
> SO_SNDTIMEO/SO_RCVTIMEO? The man pages make no mention of these. The two
> options I have seen in other OS's are struct timeval or an integer.

A pointer to a struct timeval.  But I don't think Solaris implements
these socket options.  Just because the SO_xxx constant is defined in
a header does not mean it's implemented ...

        Rich Stevens
0

Featured Post

Restore individual SQL databases with ease

Veeam Explorer for Microsoft SQL Server delivers an easy-to-use, wizard-driven interface for restoring your databases from a backup. No expert SQL background required. Web interface provides a complete view of all available SQL databases to simplify the recovery of lost database

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever been frustrated by having to click seven times in order to retrieve a small bit of information from the web, always the same seven clicks, scrolling down and down until you reach your target? When you know the benefits of the command l…
The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses
Course of the Month16 days, 23 hours left to enroll

862 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question