From owner-freebsd-hackers Mon Oct 27 17:18:55 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id RAA12569 for hackers-outgoing; Mon, 27 Oct 1997 17:18:55 -0800 (PST) (envelope-from owner-freebsd-hackers) Received: from word.smith.net.au (vh1.gsoft.com.au [203.38.152.122]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id RAA12550 for ; Mon, 27 Oct 1997 17:18:39 -0800 (PST) (envelope-from mike@word.smith.net.au) Received: from word.smith.net.au (localhost.gsoft.com.au [127.0.0.1]) by word.smith.net.au (8.8.7/8.8.5) with ESMTP id LAA00495; Tue, 28 Oct 1997 11:44:21 +1030 (CST) Message-Id: <199710280114.LAA00495@word.smith.net.au> X-Mailer: exmh version 2.0zeta 7/24/97 To: Alfred Perlstein cc: hackers@freebsd.org Subject: Re: help with fstat? In-reply-to: Your message of "Sun, 26 Oct 1997 21:31:01 CDT." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 28 Oct 1997 11:44:19 +1030 From: Mike Smith Sender: owner-freebsd-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > don't want to look a gift answer in the mouth but i don't think this is a > good idea, i'm working on a distributed system for transfering files > across the internet. the system is supposed to be able to manage a large > load of file transfers over TCP. On the contrary, it's an *excellent* idea. > if i mmap tons of files across many processes i think i will cause a large > amount of unnessesary paging, as most of the files will be in the > 200k-5meg range this will be too much laod on the system. > > unless mmap() maps in on demand... but i think i'll be eating up all my > address space... mmap() just associates a region of your address space with the file; until you actually reference it, you won't get any paging activity. As for eating up your address space, if you're only dealing with little files like you describe you won't have any trouble at all. I'm regularly mapping files in the 100M range, and it beats the hell outa reading them in record by record. > isn't fstat supposed to be what i'm looking for? No. > i don't want to exhaust the virtual memory on the machine, just get > optimal transfers. You won't exhaust virtual memory; mmapped regions are backed by the file, not by swap. mike