Networking Forums

Networking Forums > Computer Networking > Linux Networking > Multiple Accept (listenning) threads

Reply
Thread Tools Display Modes

Multiple Accept (listenning) threads

 
 
zferentz@gmail.com
Guest
Posts: n/a

 
      08-02-2006, 08:11 AM
Hi,
I'm developing a server application , and i've notice that on
heavy-load (8000 HTTP transaction/sec , few hundredconcurrent
connections ) i'm starting to loose connection .

Since i'm using nonblocking I/O (poll for kernel 2.4 and epoll for
kernel 2.60) i suspect that the problem lies in my accept threads . i
have 2 listenning threads that looks pretty much like:
{
lock_mutex();
s=accept(); // blocking accept
unlock_mutext();
post_socket(s); // put socket in queue for processing in
other threads...
}

Now, i really don't know if i can remove the mutex stuff . The Man
pages says nothing about the accept() thread-safeness (except the HPUX
, but it's not the standard ).

Can i skip the mutex ? is it depend on the kernel ?
thnx,
zvi fer

 
Reply With Quote
 
 
 
 
zferentz@gmail.com
Guest
Posts: n/a

 
      08-02-2006, 09:27 AM
Of course i meant "listening" , and not "listenning".... damn keyboard
...
(E-Mail Removed) wrote:
> Hi,
> I'm developing a server application , and i've notice that on
> heavy-load (8000 HTTP transaction/sec , few hundredconcurrent
> connections ) i'm starting to loose connection .
>
> Since i'm using nonblocking I/O (poll for kernel 2.4 and epoll for
> kernel 2.60) i suspect that the problem lies in my accept threads . i
> have 2 listenning threads that looks pretty much like:
> {
> lock_mutex();
> s=accept(); // blocking accept
> unlock_mutext();
> post_socket(s); // put socket in queue for processing in
> other threads...
> }
>
> Now, i really don't know if i can remove the mutex stuff . The Man
> pages says nothing about the accept() thread-safeness (except the HPUX
> , but it's not the standard ).
>
> Can i skip the mutex ? is it depend on the kernel ?
> thnx,
> zvi fer


 
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
All my threads are disappearing. Derrick Fawsitt Broadband 4 03-29-2007 12:52 AM
scheduling threads ? vivekian Linux Networking 2 04-18-2006 04:49 PM
OT: Saving Google threads as TXT? Terry Pinnell Broadband 2 01-27-2005 05:10 PM
postfix: how to accept multiple domains? Wilhelm Wagner Linux Networking 2 01-06-2004 01:20 PM
multiple threads, same socket...safe? JW Linux Networking 0 08-11-2003 12:30 AM



1 2 3 4 5 6 7 8 9 10 11