9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: rsc@plan9.bell-labs.com
To: 9fans@cse.psu.edu
Subject: Re: [9fans] Standalone cpu/auth..
Date: Wed, 15 May 2002 21:21:33 -0400	[thread overview]
Message-ID: <bef41a2498bb24f3a30ad88fd781f20f@plan9.bell-labs.com> (raw)

the drawterm sessions should be slower,
since they are going through srvold9p rather
than plugging the network connection
into the kernel directly.  it shouldn't be very
much slower, but perhaps a little.  if you're
comparing drawterm-linux->3e vs ->4e,
i don't think you should see a big difference.

if you're comparing drawterm-linux->3e with
drawterm-windows->4e, you will see a big difference.
repeating yesterday's theme, the 4e drawterm sources
from windows now disable nagle's algorithm,
which makes an enormous difference.

replace /sys/src/cmd/unix/drawterm/devip-unix.c:/^so_socket
with this one and recompile.  you should see a big
difference.

int
so_socket(int type)
{
	int fd, one;

	switch(type) {
	default:
		error("bad protocol type");
	case S_TCP:
		type = SOCK_STREAM;
		break;
	case S_UDP:
		type = SOCK_DGRAM;
		break;
	}

	fd = socket(AF_INET, type, 0);
	if(fd < 0)
		error(strerror(errno));

	one = 1;
	if(setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, (char*)&one, sizeof(one)) > 0)
		print("setsockopt: %s", sys_errlist[errno]);

	return fd;
}

russ



             reply	other threads:[~2002-05-16  1:21 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-05-16  1:21 rsc [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-05-17 21:48 Ish Rattan
2002-05-16 19:26 David Gordon Hogan
2002-05-16 19:34 ` Ish Rattan
2002-05-16 18:02 David Gordon Hogan
2002-05-16 18:24 ` Ish Rattan
2002-05-16  1:11 David Gordon Hogan
2002-05-16 13:06 ` Ish Rattan
2002-05-16 13:07 ` Ish Rattan
2002-05-16  0:55 Ish Rattan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bef41a2498bb24f3a30ad88fd781f20f@plan9.bell-labs.com \
    --to=rsc@plan9.bell-labs.com \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).