Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 Sep 2004 21:37:22 +0200
From:      Ronald Klop <ronald-freebsd8@klop.yi.org>
To:        Juha Saarinen <juhasaarinen@gmail.com>, "David G. Lawrence" <dg@dglawrence.com>
Cc:        freebsd-current@freebsd.org
Subject:   Re: Could ARG_MAX be increased?
Message-ID:  <opsesoskb58527sy@outgoing.local>
In-Reply-To: <b34be8420409231227575cc793@mail.gmail.com>
References:  <b34be84204092304456066b0a0@mail.gmail.com> <20040923122620.GW16205@nexus.dglawrence.com> <b34be8420409231227575cc793@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 24 Sep 2004 07:27:18 +1200, Juha Saarinen <juhasaarinen@gmail.com>  
wrote:

> On Thu, 23 Sep 2004 05:26:20 -0700, David G. Lawrence  
> <dg@dglawrence.com> wrote:
>>    I feel compelled to respond since you mentioned me above and since I
>> wrote most of the code involved... :-)
>>    The main issue with increasing the size of ARG_MAX is that it will  
>> result
>> in more kernel virtual memory being reserved for temporary storage of  
>> the
>> args. This used to be a much larger problem when KVM was scarce, but  
>> less
>> of a problem now with 1GB or more of KVM. The args temporary space is
>> allocated out of exec_map (a submap of kernel_map), which is sized to be
>> about 16 * ARG_MAX. The '16' is to allow up to 16 processes to  
>> simultaneously
>> exec until additional execs are blocked waiting for KVM to become
>> available. Anyway, increasing ARG_MAX to 256K (roughly 4MB of KVM)  
>> should
>> be okay on most systems.

Can't it be made dependend on kern.maxusers which is dependend on the max  
amount of memory available? So people with low memory aren't wasting a lot  
of memory?

Ronald.

-- 
  Ronald Klop
  Amsterdam, The Netherlands



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?opsesoskb58527sy>