Date: Sat, 11 Jan 2003 12:46:00 +0100 From: phk@freebsd.org To: David Schultz <dschultz@uclink.Berkeley.EDU> Cc: Archie Cobbs <archie@dellroad.org>, freebsd-arch@freebsd.org Subject: Re: Virtual memory question Message-ID: <5170.1042285560@critter.freebsd.dk> In-Reply-To: Your message of "Sat, 11 Jan 2003 03:35:51 PST." <20030111113551.GC3961@HAL9000.homeunix.com>
next in thread | previous in thread | raw e-mail | index | archive | help
In message <20030111113551.GC3961@HAL9000.homeunix.com>, David Schultz writes: >Thus spake phk@FreeBSD.ORG <phk@FreeBSD.ORG>: >> In message <200301110200.h0B20rUC024725@arch20m.dellroad.org>, Archie Cobbs wri >> tes: >> >> >The question is: how does the performance of various FreeBSD system >> >calls (especially mmap() and munmap()) degrade when a process has >> >lots and lots of tiny regions mapped into memory? >> >> Badly. At least it used to do: When I wrote phkmalloc(3) I tried >> using malloc instead of sbrk(2) and it suffered because the VM system > ^^^^^^ you mean mmap(2)? >> couldn't collapse all the individual allocations (ie: N lines in >> /proc/$pid/map > >The following program does 1000 mmaps of various sizes, then >prints its own memory map. It shows that the resulting vm_map has >only a few entries in both -CURRENT and -STABLE. The log for >src/sys/vm/vm_map.c suggests that the collapse code may have been >broken/non-optimal at several times during the past six years. Could be, I have not revisited the issue since 1995 or so. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5170.1042285560>