From owner-freebsd-questions@FreeBSD.ORG Sat Mar 10 19:43:58 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3148416A405 for ; Sat, 10 Mar 2007 19:43:58 +0000 (UTC) (envelope-from freebsd-questions@m.gmane.org) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by mx1.freebsd.org (Postfix) with ESMTP id B278013C47E for ; Sat, 10 Mar 2007 19:43:57 +0000 (UTC) (envelope-from freebsd-questions@m.gmane.org) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1HQ7Tm-0003zd-Ra for freebsd-questions@freebsd.org; Sat, 10 Mar 2007 20:43:46 +0100 Received: from 83-131-99-238.adsl.net.t-com.hr ([83.131.99.238]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 10 Mar 2007 20:43:46 +0100 Received: from ivoras by 83-131-99-238.adsl.net.t-com.hr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 10 Mar 2007 20:43:46 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-questions@freebsd.org From: Ivan Voras Date: Sat, 10 Mar 2007 20:43:32 +0100 Lines: 83 Message-ID: References: <6.0.0.22.2.20070309094909.024c9dd0@mail.computinginnovations.com> <6.0.0.22.2.20070309133935.024b8fd0@mail.computinginnovations.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig97AEA442511DC2E5B3573084" X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 83-131-99-238.adsl.net.t-com.hr User-Agent: Thunderbird 1.5.0.10 (Windows/20070221) In-Reply-To: X-Enigmail-Version: 0.94.1.2 Sender: news Subject: Re: limitiation on memory allocation X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2007 19:43:58 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig97AEA442511DC2E5B3573084 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Dima Sorkin wrote: > Hi. > I've read some pages about 'kern.maxusers', 'kern.maxdsize'. > I have questions: > 1) > After I reduce 'maxusers' to some reasonable amount for that computer > (say 10), maxusers is somewhat badly named because of historical reasons. Today it means something like "how many big processes will the machine probably run", where a "big process" is something like an apache or postgresql instance, or any of the big desktop applications. It doesn't matter much if you set it (or it automatically gets set) too high. > and enlarge 'maxdsize', will a user process be able to allocate > arrays that are considerably bigger than the physical memory size ? > This is what I really need. I run processes in which it can come to > 1.5x-2x ratio. Yes, upto kernel limits... >=20 > 2) Following the > http://www.opennet.ru/openforum/vsluhforumID1/40543.html#1 > Should I put maxdsize =3D=3D phys mem size, or should I put it lower > (by how much) ? Put is as large as you want. It's taken from combined virtual+physical memory. > 3) On Intel pentium 4 machine with 2GB phys memory, > during installation where almost all options were taken as defaults, > should I worry that kernel is not configured to use PAE ? > Installation program by default allocated 4GB swap, > so totally it is 6GB. How do I check this ? No, swap space is completely separate from the rest of the equation. Put as much swap space as you like, it's not limited to 4GB total. You should only consider PAE if you want to use more than about 3.5 GB of physical memory (why not 4GB? because some address space is dedicated to PCI and other hardware) AND you want to keep the kernel 32-bit. You can think of PAE as something like an in-memory "swap" space (but so fast you can't distinguish it from "normal" memory). If the kernel is 32-bit, any single process cannot allocate more than 4 GB of memory total (for obvious reasons). This means that the kernel memory (which is shared between processes, but takes the same amount of address space in each process individually) + the process' own memory cannot exceed 4 GB. Kernel address space is mostly 1 GB (there's a knob for this somewhere), so that leaves you maximum 3 GB (virtual or physical, doesn't matter) that your program can allocate if maxdsiz allows it. If you expand available virtual memory through swap or PAE, you can have multiple processes which allocate 4 GB each (upto available virtual space), but still each process individually cannot exceed 4 GB. If you switch to a 64-bit kernel, than all of this complexity vanishes because of expanded address space and your program is only limited by maxdsiz and available virtual (e.g. physical+swap) memory. --------------enig97AEA442511DC2E5B3573084 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.4 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFF8wpkldnAQVacBcgRAo/WAJ9xtpcCblwvmO2lu2Yob2Ez3fuk3gCdHN4R WJVDN/c10LQJCoAnZcKLMAM= =8NxA -----END PGP SIGNATURE----- --------------enig97AEA442511DC2E5B3573084--