LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 01-26-2006, 01:37 PM   #1
appforce
LQ Newbie
 
Registered: Jun 2005
Posts: 10

Rep: Reputation: 0
Measure the accept queueing time!


Hello! I am doing my research for the web server performance modeling.
After the connection request from a client complete the TCP 3-way handshake. It would become an open request and this open request will be placed in the accept queue. At this point the new child socket is created and pointed to by the open request. The connection is considered to be established at this point.
Each time the Web server process executes the "accept()" system call, the first open request in the accept queue is removed and the socket which is pointed to by this open request is returned.
All I want is to measure the amount of time when a open request is in the accept queue. I've tracked the source code of the Linux kernel. I may know the flow but still not sure my direction is correct or not. I write down what I found as follows. If there is anything wrong, please tell me! Thank you very mush

1. The struct "sock" in "sock.h" has a parameter call "ack_backlog". This parameter counts how many open request in the accept queue.

2. The struct "tcp_opt" in "sock.h" has two parameters call "accept_queque" and "accept_queue_tail".These two parameter actually point to the exact accept queue.

3. The struct "open_request" in "tcp.h" exactly represents the open request which I've mention above.

4. After a connection request from a client complete the TCP 3-way handshake, the listen socket would call the function "tcp_acceptq_queue" in "tcp.h". This function puts new open request (i.e. the struct "open_request") into accept queue (i.e. struct "accept_queue" in "tcp_opt").

5. Each time the Web server process executes the accept() system call,
the function "tcp_accept" in "tcp.c" would be called. This function removes the first open request in the accept queue and return the socket which is pointed to by the open request.


Is there anything wrong with what I describe above? Or there is any reference regarding this matter? Please tell me! Thank you very much!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how can I measure how much real time is used to run an executable? markhod Linux - General 1 04-07-2005 04:41 AM
Can I somehow accurately measure the time a operation takes? Like 'unzip -x foo.zip'? brynjarh Linux - Newbie 9 08-18-2004 09:26 PM
How to measure the time to build a package? mullog Linux From Scratch 10 05-11-2004 11:23 AM
accurately measure time rasselin Programming 1 09-05-2003 05:18 PM
how to accurately measure processing time rasselin Programming 3 09-01-2003 11:45 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 08:57 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration