From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: Date: Sat, 15 Nov 2008 14:13:48 -0800 From: "Micah Stetson" To: "Fans of the OS Plan 9 from Bell Labs" <9fans@9fans.net> In-Reply-To: <98CCE297-BE54-4ADA-B57D-DB8FE71060BA@sun.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <98CCE297-BE54-4ADA-B57D-DB8FE71060BA@sun.com> Subject: Re: [9fans] Do we have a catalog of 9P servers? Topicbox-Message-UUID: 44d74026-ead4-11e9-9d60-3106f5b1d025 >> I'm unclear as to what "amount of state" iptables needs to keep > > After you do something like: > # iptables -t nat -A POSTROUTING -p TCP -j MASQUERADE > the Linux kernel module called nf_conntrack starts allocating > data structures to do its job. I'll leave it up to you to see how much > memory gets wasted on each connection. Here's a hint, > though: /proc/net/nf_conntrack I don't think Plan 9 is keeping any less state, is it? As far as the gateway is concerned, all of the connections from machines importing its /net are the same as connections from local programs. The TCP/IP stack has to keep track of those, but Plan 9 doesn't need separate connection tracking code for that because it's handled like any other connection. Plan 9 does need one extra connection per client and a process (or two?) to do the export. I think Eris is saying that this makes Plan 9's resource requirements grow with the number of hosts behind the gateway -- not just with the number of connections through it like Linux. You're right, Eris, but I think you're missing the point: importing /net gives you all the features you'd want from NAT (and some it doesn't give you) without a single line of code specifically written to make it happen. It isn't an example of how you can handle the most clients with the least hardware. It's an example of how a good design can give you features without having to code each one individually. Micah