• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How to time speed of "write" on unix socket?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to time speed of "write" on unix socket?


  • Subject: Re: How to time speed of "write" on unix socket?
  • From: Peter Sichel <email@hidden>
  • Date: Sun, 25 Jan 2004 17:09:37 -0500

Since TCP guarantees end-to-end reliability and includes built-in flow control,
you don't really know when a specific data segment has been sent (or repeated)
until you receive an acknowledgment from the other end. It might make more
sense to measure end-to-end performance.

Next, if you want to measure "application" versus network performance,
consider using the loopback address to connect to a server on the same
host as the client. You can either develop a stub server for the purpose
of measuring traffic, or use sysctl to examine your TCP connection statistics.

If you choose the stub server approach, you time-stamp when each packet
arrives using the SO_timestamp option. By measuring when successive packets
arrive and the amount of data they contain, you can get a pretty handle
and the effective data rate.

- Peter


On Jan 25, 2004, at 1:50 AM, Larry Gerndt wrote:

I'm in the process of benchmarking my app's performance, and one of the
areas I looked at was transmission speed (my app is a client which sends
data to a host server using a unix socket). Since my socket is set for
blocking, I assumed all I had to do time transmission speed was check
::UpTime before and after the socket "write" call. However, the interval
I'm reading is way smaller than it could possibly be (for example, 55 uSec
to write 17Kbytes). This makes me think that all my "write" is really doing
is writing to the local TCP buffer, is that correct? If so, how do I
measure the socket's actual transmission speed to the host? Thanks in
advance.
--
Larry Gerndt
AIM Handle: SonOfTheSonOfMan
Let the truth be told though the heavens fall -- James Garrison
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: How to time speed of "write" on unix socket?
      • From: Larry Gerndt <email@hidden>
References: 
 >How to time speed of "write" on unix socket? (From: Larry Gerndt <email@hidden>)

  • Prev by Date: How to time speed of "write" on unix socket?
  • Next by Date: Re: How to time speed of "write" on unix socket?
  • Previous by thread: How to time speed of "write" on unix socket?
  • Next by thread: Re: How to time speed of "write" on unix socket?
  • Index(es):
    • Date
    • Thread