Could ARG_MAX be increased?

Juha Saarinen juhasaarinen at
Thu Sep 23 12:27:51 PDT 2004

On Thu, 23 Sep 2004 05:26:20 -0700, David G. Lawrence <dg at> 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.

Very good and thorough response there :-)

Is it worth putting in a PR on this?



More information about the freebsd-current mailing list