Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Wed, 30 Jan 2002 13:09:46 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Wed, 30 Jan 2002 13:08:33 -0500 Received: from 12-237-170-171.client.attbi.com ([12.237.170.171]:65420 "EHLO wf-rch.cirr.com") by vger.kernel.org with ESMTP id ; Wed, 30 Jan 2002 13:07:44 -0500 Message-ID: <3C583655.6060707@acm.org> Date: Wed, 30 Jan 2002 12:07:17 -0600 From: Corey Minyard User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.7) Gecko/20011226 X-Accept-Language: en-us MIME-Version: 1.0 To: Zwane Mwaikambo CC: "Richard B. Johnson" , Linux kernel Subject: Re: TCP/IP Speed In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Zwane Mwaikambo wrote: >On Wed, 30 Jan 2002, Richard B. Johnson wrote: > >>But it's already connected. >> >> >> host: >> for (;;) { >> gettimeofday(...); >> write(s, buf, 64); >> read(s, buf, sizeof(buffer)); >> gettimeofday(...); >> /* delay is 1.0 ms */ >> } >> server is IPPORT_ECHO >> > >You didn't make that explicit in your previous email, and anyway what kind >of resolution can you expect from gettimeofday... > Depending on the processor, gettimeofday has very high resolution. If I remember correctly, the TCP stacks put in delays for small sends so they can pack multiple things together. I think there are ways to work around this via some type of flush, but memory fails me on exactly how. -Corey - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/