Skip to contentSkip to conversation

--mlock and RLIMIT_MEMLOCK

Openvpn-devel Gert Doering 1 participant 1 message Mar 7, 2021

lore
Share & tools
lore
#0 lore raw

Hi,

I'm considering adding a check for "is there sufficient memory available" to the --mlock switch, to avoid hard and graceless out-of-memory crashes later on (trac #1390).

OpenVPN would refuse to start if "less than <this> amount" is available (ulimit -l / getrlimit(RLIMIT_MEMLOCK)).

Now I wonder what a good minimum amount might be? My various long-running openvpn processes seem to consume somewhere between 6 Mbyte (only 3 clients) and 31 Mbyte (up to 150 concurrent users)... so requiring something like "50 Mbyte" would be plenty.

If you use --mlock - what do you set your "ulimit -l" (or systemd LimitMEMLOCK=... value) to? And why?

gert

Signature · 6 lines
"If was one thing all people took for granted, was conviction that if you 
 feed honest figures into a computer, honest figures come out. Never doubted 
 it myself till I met a computer with a sense of humor."
                             Robert A. Heinlein, The Moon is a Harsh Mistress

Gert Doering - Munich, Germany                             [email protected]...

_______________________________________________
Openvpn-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-users