AXIGEN_DAEMON_OPT / MALLOC_ARENA_MAX Value

Good day,

I just want to ask how Axigen handles this 2 command. As I want to tweak them to see if my server improves.

Current settings / value
AXIGEN_DAEMON_OPT="-m 4096"
export MALLOC_ARENA_MAX=4

Can someone explain each one and how to compute the values.

If I don’t set this values Axigen consume all memory and start to hang / crash, slowness, not responding on mail client sides.

Regards,
Jay

Hello Jay,

For -m option please review the available options you may set for Axigen, like:

# ./axigen --help
Usage: axigen [option...[value...]]

Flags:
    -h, --help                             Print this help.
    -v, --version                          Print version and exit.
    -V, --fullversion                      Print full version, including libs, and exit.

Options:
        --foreground                       Run in foreground.
        --drop-core path                   Full path (240 maximum length) to an existing directory where to drop core. Default is not set.
    -W, --workdir path                     Full path (240 maximum length) to working directory. Default to /var/opt/axigen/.
    -C, --configfile filename              Server configuration file. Default to 'workdir'/run/axigen.cfg.
    -L, --license filename                 Server license key (LK) binary file. Default to 'workdir'/axigen_lk.bin.
    -A, --admin-passwd password            Set the `admin` password in server registry and exit.
    -K, --check-configuration              Check configuration files, report errors and exit.
    -u, --user username                    User's name who executes the server. Default to 'axigen'.
    -g, --group groupname                  Group's name who executes the server. Default to 'axigen'.
        --ulimit-n Min=1024, Max=100000    Maximum number of open file descriptors. Default to 20000.
    -m, --ulimit-v Min=512                 Virtual memory limit in MB. Default to 0 (inherited from environment).
        --mem-reserve Min=12, Max=1024     Memory used by memory manager module in MB. Default to 200.
        --max-respawns Min=0, Max=30       Maximum number of accepted faulty processes per minute before exiting. Default to 10.
        --gen-cert certpath [dhpath]       Generates a self-signed certificate and optional a Diffie-Hellman key.
        --gen-cert-cn certificate CN       The Common Name of SSL certificate.
        --rmtuning level                   Configure resource manager behavior. Possible values: lazy, normal, aggressive, paranoia.
        --large-stream-support enabled, disabled or read-only                  Configure large stream support in storage.
        --stop-timeout seconds             Maximum time to wait for a child process to stop.
        --alloc-library filename           The library containing memory allocation functio

Basically, when using -m 4096 you will limit Axigen memory consumption to 4 GB.

For MALLOC_ARENA_MAX, this is an environment variable specific to GLIBC - more information here, here and here.

HTH,
Ioan

Thanks Ioan,

as previously said on the documentations

-m, --ulimit-v Min=512, Max=4095 - Virtual memory limit in MB. Default to 0 (inherited from environment).

That is why I set it on the maximum.

About the malloc, should I remove it and let the environment decide?

Regards,
Jay

Hello Jay,

I’m not sure where you get that max value for -m option is 4095 - most probably is an old documentation that we need to update it therefor any hints here will be appreciated.

Regarding the malloc specific variable you may leave with the mentioned value (4).

BR,
Ioan

Hi Ioan,

here is the link: Command-line parameters | Axigen Documentation

I do necessary tweaks and hoping for the best.

Regards,
Jay