It would be great if we can minimize the footprint of zebra/daemons by default. However, a daemon still needs a vty/command layer for user communication, doesn't it? are you suggesting to change how is that done?

Regards,
Jafar


On 6/8/2015 5:18 AM, Paul Jakma wrote:
On Thu, 28 May 2015, Jafar Al-Gharaibeh wrote:

But you are doing this for every daemon for every VRF, things add up really quick. In a small experiment that I'm running now Quagga (zebra, ospfd, pimd) uses 9MB of RAM. if I start adding VRFs I'm going to hit a wall really quick.

Just on this. This is a freshly started zebra on x86_64 from the Fedora 0.99.22.4 FC21 package:

# pmap -x `pidof zebra` | awk 'NF >= 6 && $1 ~ /^[0-9a-f]/ && $5 ~ /^.w/ { switch ($6) { case /zebra/: f = "zebra"; break; case /(snmp|krb|libcom)/: f = "netsnmp"; break; case /pcre/: f = "pcre"; break; case /nss/: f = "nss"; break; case "[": break; default: f = "other"; };kb[f] += $2; rss[f] += $3; dirty[f] += $4; } END { printf("%-28s %5s %5s %5s\n", "lib", "KiB used", "RSS", "Dirty"); for (i in kb) { printf("%-30s %5d %5d %5d\n", i, kb[i], rss[i], dirty[i]);D }}'

lib                          KiB used   RSS Dirty
nss                               20    12    12
other                            564   300   300
pcre                               4     4     4
zebra                           1004   860   860
netsnmp                         1484   284   284

I'm attributing snmp, krb5 and libcom to netsnmp. I'm attributing '[ anon ]' mappings to the previous library (might not be right). "other" contains some weird deps too (rpmio, e.g., maybe cause of SELinux libs). Full list at the end of the email.

A good chunk of the zebra stuff, from scanning massif output, is probably due to the vty/command layer. Much of that stuff really should not be in the daemons, least if we want a more programmatic way to manage daemons.

--paul

Full pmap tally:

# pmap -x `pidof zebra` | awk 'NF >= 6 && $1 ~ /^[0-9a-f]/ && $5 ~ /^.w/ { if ($6 != "[") f = $6; kb[f] += $2; rss[f] += $3; dirty[f] += $4; } END { printf("%-28s %5s %5s %5s\n", "lib", "KiB used", "RSS", "Dirty"); for (i in kb) { printf("%-30s %5d %5d %5d\n", i, kb[i], rss[i], dirty[i]);D }}'
lib                          KiB used   RSS Dirty
libbz2.so.1.0.6                    4     4     4
ld-2.20.so                         8     8     8
libacl.so.1.1.0                    4     4     4
libnssutil3.so                     4     4     4
zebra                            856   716   716
libnetsnmp.so.30.0.2             224   224   224
libnspr4.so                       16     8     8
libsensors.so.4.3.2                4     4     4
libnss3.so                        16     8     8
libcrypt-2.20.so                 188     4     4
libssl.so.1.0.1k                  28    28    28
libkeyutils.so.1.5                 4     4     4
libselinux.so.1                   12     4     4
libfreebl3.so                     20     4     4
libpcre.so.1.2.3                   4     4     4
libpopt.so.0.0.0                   4     4     4
liblua-5.2.so                      4     4     4
libcom_err.so.2.1                  4     4     4
librpm.so.3.3.1                   16    16    16
libwrap.so.0.7.6                   8     4     4
libkrb5support.so.0.1              4     4     4
libattr.so.1.1.0                   4     4     4
librpmio.so.3.3.1                 16     8     8
libcrypto.so.1.0.1k               68    64    64
libk5crypto.so.3.1                 8     4     4
libplc4.so                         4     4     4
libelf-0.161.so                    4     4     4
liblzma.so.5.0.99                  4     4     4
libplds4.so                        4     4     4
libnetsnmpmibs.so.30.0.2        1224    28    28
libm-2.20.so                       4     4     4
libzebra.so.0.0.0                148   144   144
libresolv-2.20.so                 12     4     4
libnsl-2.20.so                    12     4     4
libutil-2.20.so                    4     4     4
libz.so.1.2.8                      4     4     4
libdl-2.20.so                      4     4     4
libdb-5.3.so                      12    12    12
libc-2.20.so                      24    24    24
libcap.so.2.24                     4     4     4
libkrb5.so.3.3                    12    12    12
libpthread-2.20.so                20     8     8
libperl.so.5.18.4                 28    28    28
libgssapi_krb5.so.2.2              8     8     8
libnetsnmpagent.so.30.0.2          8     4     4
librt-2.20.so                      4     4     4

regards,


_______________________________________________
Quagga-dev mailing list
[email protected]
https://lists.quagga.net/mailman/listinfo/quagga-dev

Reply via email to