From owner-freebsd-current@FreeBSD.ORG Thu Feb 16 12:16:03 2006 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E830516A422; Thu, 16 Feb 2006 12:16:03 +0000 (GMT) (envelope-from dmitry@atlantis.dp.ua) Received: from postman.atlantis.dp.ua (postman.atlantis.dp.ua [193.108.47.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id E649443D45; Thu, 16 Feb 2006 12:16:02 +0000 (GMT) (envelope-from dmitry@atlantis.dp.ua) Received: from smtp.atlantis.dp.ua (smtp.atlantis.dp.ua [193.108.46.231]) by postman.atlantis.dp.ua (8.13.1/8.13.1) with ESMTP id k1GCFteK044836; Thu, 16 Feb 2006 14:15:55 +0200 (EET) (envelope-from dmitry@atlantis.dp.ua) Date: Thu, 16 Feb 2006 14:15:55 +0200 (EET) From: Dmitry Pryanishnikov To: David Xu In-Reply-To: <43F29BF5.4060300@freebsd.org> Message-ID: <20060216140725.T23429@atlantis.atlantis.dp.ua> References: <20060215024339.N22450@atlantis.atlantis.dp.ua> <43F29BF5.4060300@freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Mailman-Approved-At: Thu, 16 Feb 2006 12:49:27 +0000 Cc: freebsd-current@freebsd.org Subject: Re: Virtual memory consumption (both user and kernel) in modern CURRENT X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Feb 2006 12:16:04 -0000 Hello! On Wed, 15 Feb 2006, David Xu wrote: >> 1) Is it normal that virtual memory size for almost every non-kernel >> process >> is close to 50Mb now: >> >> ftp://external.atlantis.dp.ua/FreeBSD/CURRENT/top.txt >> >> Is it miscalculation or real growth of virtual address space? >> >> > I believe this is the new malloc code in libc, I am seeing this on my > Athlon64 machine, now it likes swap memory, in the old days, it seldom > touched it. I've just compiled a sample program under week-old CURRENT: #include main() { putchar('\n'); for(;;); } Without putchar() call my program's virtual address space isn't so big: PID USERNAME THR PRI NICE SIZE RES STATE TIME WCPU COMMAND 52126 root 1 127 0 1244K 440K RUN 0:31 43.97% a.out But with putchar() it gives us PID USERNAME THR PRI NICE SIZE RES STATE TIME WCPU COMMAND 58959 root 1 130 0 50100K 632K RUN 0:03 47.19% a.out What't the reason of so terrible virtual memory consumption? I don't believe that just plain stdio buffering requires 50 Mbytes (!) of virtual address space. Sincerely, Dmitry -- Atlantis ISP, System Administrator e-mail: dmitry@atlantis.dp.ua nic-hdl: LYNX-RIPE