>actually we were more interested in measuring the latency p9 imposes >on transmission, i.e. the time it takes for the first byte to start >appearing on the network... + > buf = mallocz(i, 1); > tbegin = nsec(); > for(j = 0; j < 10000; j++) > write(fd, buf, i); > tend = nsec(); I'm not complaining, I like seeing numbers. However, these two statements don't jibe. > at one point the receiver side was printing the total number of bytes > received, which was in line with calculations, so no huge discrepancy > there.. I'm actually interested in the number of bytes/packet seen on the receiver. All you measured what the amount of time to queue the messages on the sender, not the time to send them, the average time for each byte to make the journey, or the time to get the first byte to the wire. If all you want to do to improve the numbers for plan 9, we can do it trivially by just making sure we buffer all the 1 byte writes before sending anything out. Then you're just measuring the time for 10000 1 byte writes which is moderately quick. However, I suspect that's not what you want to speed up. I suspect that the BSD stack is doing significantly better than we are at ganging bytes/packet and hence causes fewer interrupts, runs up the IP stack, system calls, etc.