[prev in list] [next in list] [prev in thread] [next in thread] 

List:       strongswan-users
Subject:    Re: [strongSwan] Charon resource usage
From:       Martin Willi <martin () strongswan ! org>
Date:       2008-09-19 17:09:54
Message-ID: 1221844194.6297.8.camel () martin
[Download RAW message or body]

Hi,

> * What is the minimum number of threads I can configure? Six is definitely too
> few (charon hangs) - I'm currently getting by with eight. 

This depends on the plugins you have loaded, as some of them acquire
threads (e.g. the stroke plugin) to read from sockets. But I think
you'll need eight or so for the default configuration.

> * What is the minimum stack size required? The Linux default of 2MB is way too
> large.

I have no experience in reducing the stack size. You probably have to
try what's possible... 
However, these 2MB are only reserved virtual memory, actual memory is
allocated on demand.

> * Any other areas to look at for conserving memory?

We have created a minimal build script for the OpenWRT build system. It
uses it's own, minimalistic configuration interface (UCI) to get rid of
starter, stroke and other stuff. It also includes a minimal set of
crypto plugins. It uses:

--disable-des --disable-sha2 --disable-md5 --disable-xcbc \
--disable-fips-prf --disable-pluto --disable-stroke \
--disable-tools --disable-updown --disable-static --enable-uci 

and sets -Os and -DDEBUG_LEVEL=1 to remove some debugging messages.

If you have OpenSSL on your box, it is possible to use it for all
crypto. If not, the GMP plugin and our own ciphers are smaller.

It should be possible to reduce disk footprint to under 250KB, and RSS
memory under 1MB.

Regards
Martin


_______________________________________________
Users mailing list
Users@lists.strongswan.org
https://lists.strongswan.org/mailman/listinfo/users
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic