From mboxrd@z Thu Jan 1 00:00:00 1970 To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> In-reply-to: Your message of "Sat, 22 Nov 2014 13:06:15 EST." <4a5f7359099c5bdfc05c341e19f17490@lilly.quanstro.net> References: <7f11f16bfdb01c0041b0397a1cea04c5@proxima.alt.za> <7dc7cfb35a012dedc41828d03d5cdff3@lilly.quanstro.net> <4CB999B4-E9C6-4A74-B849-4003DD3D23D1@9srv.net> <22d498b89c3b4d2e50c1c5cc0e9d72c0@lilly.quanstro.net> <536D0D14-3391-426A-930F-2B92FFD734DB@9srv.net> <418789bb5bc4501ab70366014c15b965@lilly.quanstro.net> <0841E3F3-400C-4E19-811F-37B0595006BD@bitblocks.com> <4a5f7359099c5bdfc05c341e19f17490@lilly.quanstro.net> Date: Mon, 24 Nov 2014 22:59:52 -0800 From: Bakul Shah Message-Id: <20141125065952.60E7EB82A@mail.bitblocks.com> Subject: Re: [9fans] running plan9 : an ideal setup? Topicbox-Message-UUID: 2e0e909c-ead9-11e9-9d60-3106f5b1d025 On Sat, 22 Nov 2014 13:06:15 EST erik quanstrom wrote: > On Fri Nov 21 12:31:13 EST 2014, bakul@bitblocks.com wrote: > > This paper is well worth reading: > > http://groups.csail.mit.edu/ana/Publications/PubPDFs/1988Analysis%20TCP%20P > rocessing%20Overhead.pdf > > > > While the traditional BSD implementation uses mbufs that complicate things, > actual tcp processing can be done quite cheaply. > > - ignores tcp checksum -- it alone will take a couple cycles per byte. They factored out path common to all IP, to measure TCP's overhead. tcp checksum is basically IP checksum. > - ignores locking > and i believe they've used the BKL to avoid locking any data structures > , otherwise > how could they process ip in 61 instructions? actually there's proof o > f this in the > timer instruction count -- 17. that's not enough to acquire a lock. Again, matching an incoming packet to find its PCB is common to all so they didn't put this in tcp overhead computation. As long as you run IP, you pay the other costs for any protocol. > - asserts that 300 instructions of x86 code -> 400 instructions of risc code, > conservatively > absolutely not if one of them is rep; movb (which they appear to use) Can't speak to this. > in short, i see signs that this paper is not realistic. I think it is very realistic. They modified standard bsd stack (I don't know its present state but back when I worked on it, it needed to be simplified quite a bit). > furthermore, this sunny picture assumes an environment where tcp isn't giving > any > benefit. if you're not retransmitting a bit, you're not getting anything out > of tcp. If you use TCP you benefit from its near universality, dealing with long fat pipes, bandwidth adjustment, selective ack etc. My point was that even with all its complexity, tcp's processing overhead can be fairly low for the common case. I haven't looked into why on the RPi plan9's tcp performance is about 30-40% of that on linux (which works near wire speed). For the local case it doesn't matter much in any case.