Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RAM consumption is too damn high #24

Closed
alexAubin opened this issue Jun 15, 2017 · 13 comments
Closed

RAM consumption is too damn high #24

alexAubin opened this issue Jun 15, 2017 · 13 comments

Comments

@alexAubin
Copy link

When packaging Sympa for Yunohost, I soon realized that sympa (and even cpan, during install !?) was getting killed because of OOM. After investigating, I saw that Sympa, when not doing anything (i.e. right after install) consumes about O(400 Mo) of RAM.

I understand that Sympa is meant to be an entreprise-grade/large-scale application, but imho this is way too much. In the Yunohost community (but probably in the self-hosting community as a whole), people have heard of Sympa and expect it to be a good program to manage a few list for their friends or local club, i.e. basically not more than a dozen of list with O(10~100 people) on it.

But because it takes O(400 Mo) of RAM, the cost of running it is pretty high. ARM board used for self-hosing typically have around 512 or 1 Go of RAM. So basically, running Sympa costs half a Raspberry Pi. In terms of VPS, such as Digital Ocean droplets, 512 Mo of RAM costs approximately 5$ / month, so running Sympa on a VPS costs about 5$ / month.

And this is for a program that is idling 99% of the time. Right now, in the context of Yunohost packaging, I simply added 500 Mo of swap to the system at the install, but I expect this to drastically reduce the life of SD card for people running ARM boards.

Isn't there any way to reduce the RAM consumption to some acceptable level (e.g. O(50 Mo)) ?

@ikedas
Copy link
Member

ikedas commented Jun 16, 2017

@alexAubin, what kind of platform you are using?

Would you please show the result of perl -V?

@racke
Copy link
Contributor

racke commented Jun 16, 2017

Looking at a Sympa server with a few mailing lists, the processes eating most of the RAM are the task manager and WWSympa ( both a bit over 500M virtual and 200M residential memory).

@alexAubin
Copy link
Author

Hi there. I've been working in a debian 8 VM, where I had no memory issue (probably because nothing installed beside Yunohost and Sympa), and then in a debian 8 VPS, a Digital Ocean droplet with 512 Mo of RAM, where I started encountering the issues.

Here's the result of perl -V on the VPS :

 > perl -V
Summary of my perl5 (revision 5 version 20 subversion 2) configuration:
   
  Platform:
    osname=linux, osvers=3.16.0-4-amd64, archname=x86_64-linux-gnu-thread-multi
    uname='linux himalia 3.16.0-4-amd64 #1 smp debian 3.16.7-ckt25-2+deb8u3 (2016-07-02) x86_64 gnulinux '
    config_args='-Dusethreads -Duselargefiles -Dccflags=-DDEBIAN -D_FORTIFY_SOURCE=2 -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Dldflags= -Wl,-z,relro -Dlddlflags=-shared -Wl,-z,relro -Dcccdlflags=-fPIC -Darchname=x86_64-linux-gnu -Dprefix=/usr -Dprivlib=/usr/share/perl/5.20 -Darchlib=/usr/lib/x86_64-linux-gnu/perl/5.20 -Dvendorprefix=/usr -Dvendorlib=/usr/share/perl5 -Dvendorarch=/usr/lib/x86_64-linux-gnu/perl5/5.20 -Dsiteprefix=/usr/local -Dsitelib=/usr/local/share/perl/5.20.2 -Dsitearch=/usr/local/lib/x86_64-linux-gnu/perl/5.20.2 -Dman1dir=/usr/share/man/man1 -Dman3dir=/usr/share/man/man3 -Dsiteman1dir=/usr/local/man/man1 -Dsiteman3dir=/usr/local/man/man3 -Dusesitecustomize -Duse64bitint -Dman1ext=1 -Dman3ext=3perl -Dpager=/usr/bin/sensible-pager -Uafs -Ud_csh -Ud_ualarm -Uusesfio -Uusenm -Ui_libutil -Uversiononly -DDEBUGGING=-g -Doptimize=-O2 -Duseshrplib -Dlibperl=libperl.so.5.20.2 -des'
    hint=recommended, useposix=true, d_sigaction=define
    useithreads=define, usemultiplicity=define
    use64bitint=define, use64bitall=define, uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fwrapv -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
    optimize='-O2 -g',
    cppflags='-D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fwrapv -fno-strict-aliasing -pipe -I/usr/local/include'
    ccversion='', gccversion='4.9.2', gccosandvers=''
    intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
    ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='cc', ldflags =' -fstack-protector -L/usr/local/lib'
    libpth=/usr/local/lib /usr/lib/gcc/x86_64-linux-gnu/4.9/include-fixed /usr/include/x86_64-linux-gnu /usr/lib /lib/x86_64-linux-gnu /lib/../lib /usr/lib/x86_64-linux-gnu /usr/lib/../lib /lib
    libs=-lgdbm -lgdbm_compat -ldb -ldl -lm -lpthread -lc -lcrypt
    perllibs=-ldl -lm -lpthread -lc -lcrypt
    libc=libc-2.19.so, so=so, useshrplib=true, libperl=libperl.so.5.20
    gnulibc_version='2.19'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
    cccdlflags='-fPIC', lddlflags='-shared -L/usr/local/lib -fstack-protector'


Characteristics of this binary (from libperl): 
  Compile-time options: HAS_TIMES MULTIPLICITY PERLIO_LAYERS
                        PERL_DONT_CREATE_GVSV
                        PERL_HASH_FUNC_ONE_AT_A_TIME_HARD
                        PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP
                        PERL_NEW_COPY_ON_WRITE PERL_PRESERVE_IVUV
                        USE_64_BIT_ALL USE_64_BIT_INT USE_ITHREADS
                        USE_LARGE_FILES USE_LOCALE USE_LOCALE_COLLATE
                        USE_LOCALE_CTYPE USE_LOCALE_NUMERIC USE_PERLIO
                        USE_PERL_ATOF USE_REENTRANT_API USE_SITECUSTOMIZE
  Locally applied patches:
	DEBPKG:debian/cpan_definstalldirs - Provide a sensible INSTALLDIRS default for modules installed from CPAN.
	DEBPKG:debian/db_file_ver - http://bugs.debian.org/340047 Remove overly restrictive DB_File version check.
	DEBPKG:debian/doc_info - Replace generic man(1) instructions with Debian-specific information.
	DEBPKG:debian/enc2xs_inc - http://bugs.debian.org/290336 Tweak enc2xs to follow symlinks and ignore missing @INC directories.
	DEBPKG:debian/errno_ver - http://bugs.debian.org/343351 Remove Errno version check due to upgrade problems with long-running processes.
	DEBPKG:debian/libperl_embed_doc - http://bugs.debian.org/186778 Note that libperl-dev package is required for embedded linking
	DEBPKG:fixes/respect_umask - Respect umask during installation
	DEBPKG:debian/writable_site_dirs - Set umask approproately for site install directories
	DEBPKG:debian/extutils_set_libperl_path - EU:MM: set location of libperl.a under /usr/lib
	DEBPKG:debian/no_packlist_perllocal - Don't install .packlist or perllocal.pod for perl or vendor
	DEBPKG:debian/prefix_changes - Fiddle with *PREFIX and variables written to the makefile
	DEBPKG:debian/fakeroot - Postpone LD_LIBRARY_PATH evaluation to the binary targets.
	DEBPKG:debian/instmodsh_doc - Debian policy doesn't install .packlist files for core or vendor.
	DEBPKG:debian/ld_run_path - Remove standard libs from LD_RUN_PATH as per Debian policy.
	DEBPKG:debian/libnet_config_path - Set location of libnet.cfg to /etc/perl/Net as /usr may not be writable.
	DEBPKG:debian/mod_paths - Tweak @INC ordering for Debian
	DEBPKG:debian/module_build_man_extensions - http://bugs.debian.org/479460 Adjust Module::Build manual page extensions for the Debian Perl policy
	DEBPKG:debian/prune_libs - http://bugs.debian.org/128355 Prune the list of libraries wanted to what we actually need.
	DEBPKG:fixes/net_smtp_docs - [rt.cpan.org #36038] http://bugs.debian.org/100195 Document the Net::SMTP 'Port' option
	DEBPKG:debian/perlivp - http://bugs.debian.org/510895 Make perlivp skip include directories in /usr/local
	DEBPKG:debian/deprecate-with-apt - http://bugs.debian.org/747628 Point users to Debian packages of deprecated core modules
	DEBPKG:debian/squelch-locale-warnings - http://bugs.debian.org/508764 Squelch locale warnings in Debian package maintainer scripts
	DEBPKG:debian/skip-upstream-git-tests - Skip tests specific to the upstream Git repository
	DEBPKG:debian/patchlevel - http://bugs.debian.org/567489 List packaged patches for 5.20.2-3+deb8u6 in patchlevel.h
	DEBPKG:debian/skip-kfreebsd-crash - http://bugs.debian.org/628493 [perl #96272] Skip a crashing test case in t/op/threads.t on GNU/kFreeBSD
	DEBPKG:fixes/document_makemaker_ccflags - http://bugs.debian.org/628522 [rt.cpan.org #68613] Document that CCFLAGS should include $Config{ccflags}
	DEBPKG:debian/find_html2text - http://bugs.debian.org/640479 Configure CPAN::Distribution with correct name of html2text
	DEBPKG:debian/perl5db-x-terminal-emulator.patch - http://bugs.debian.org/668490 Invoke x-terminal-emulator rather than xterm in perl5db.pl
	DEBPKG:debian/cpan-missing-site-dirs - http://bugs.debian.org/688842 Fix CPAN::FirstTime defaults with nonexisting site dirs if a parent is writable
	DEBPKG:fixes/memoize_storable_nstore - [rt.cpan.org #77790] http://bugs.debian.org/587650 Memoize::Storable: respect 'nstore' option not respected
	DEBPKG:debian/regen-skip - Skip a regeneration check in unrelated git repositories
	DEBPKG:fixes/regcomp-mips-optim - [perl #122817] http://bugs.debian.org/754054 Downgrade the optimization of regcomp.c on mips and mipsel due to a gcc-4.9 bug
	DEBPKG:debian/makemaker-pasthru - http://bugs.debian.org/758471 Pass LD settings through to subdirectories
	DEBPKG:fixes/perldoc-less-R - [rt.cpan.org #98636] http://bugs.debian.org/758689 Tell the 'less' pager to allow terminal escape sequences
	DEBPKG:fixes/pod_man_reproducible_date - http://bugs.debian.org/759405 Support POD_MAN_DATE in Pod::Man for the left-hand footer
	DEBPKG:fixes/io_uncompress_gunzip_inmemory - http://bugs.debian.org/747363 [rt.cpan.org #95494] Fix gunzip to in-memory file handle
	DEBPKG:fixes/socket_test_recv_fix - http://bugs.debian.org/758718 [perl #122657] Compare recv return value to peername in socket test
	DEBPKG:fixes/hurd_socket_recv_todo - http://bugs.debian.org/758718 [perl #122657] TODO checking the result of recv() on hurd
	DEBPKG:fixes/regexp-performance - [0fa70a0] http://bugs.debian.org/777556 [perl #123743] simpify and speed up /.*.../ handling
	DEBPKG:fixes/failed_require_diagnostics - http://bugs.debian.org/781120 [perl #123270] Report inaccesible file on failed require
	DEBPKG:fixes/array-cloning - http://bugs.debian.org/779357 [perl #124127] [902d169] fix cloning arrays with unused elements
	DEBPKG:fixes/perldb-threads - http://bugs.debian.org/779357 [perl #124127] [41ef2c6] lib/perl5db.pl: Restore noop lock prototype
	DEBPKG:fixes/CVE-2015-8607_file_spec_taint_fix - ensure File::Spec::canonpath() preserves taint
	DEBPKG:fixes/encode-unicode-bom - http://bugs.debian.org/798727 [rt.cpan.org #107043] Address https://rt.cpan.org/Public/Bug/Display.html?id=107043
	DEBPKG:debian/encode-unicode-bom-doc - http://bugs.debian.org/798727 Document Debian backport of Encode::Unicode fix
	DEBPKG:debian/kfreebsd-softupdates - http://bugs.debian.org/796798 Work around Debian Bug#796798
	DEBPKG:fixes/CVE-2016-2381_duplicate_env - remove duplicate environment variables from environ
	DEBPKG:debian/debugperl-compat-fix - [perl #127212] http://bugs.debian.org/810326 Disable PERL_TRACK_MEMPOOL for debugging builds
	DEBPKG:fixes/CVE-2015-8853_regexp_hang - http://bugs.debian.org/821848 [perl #123562] PATCH [perl #123562] Regexp-matching "hangs"
	DEBPKG:fixes/utf8_regexp_crash - http://bugs.debian.org/820328 [perl #124109] save_re_context(): do "local $n" with no PL_curpm
	DEBPKG:fixes/regcomp_whitespace_fix - http://bugs.debian.org/820328 [perl #124109] Perl_save_re_context(): re-indent after last commit
	DEBPKG:fixes/5.20.3/eval_label_crash - http://bugs.debian.org/822336 [perl #123652] eval {label:} crash
	DEBPKG:fixes/5.20.3/preserve_record_separator - http://bugs.debian.org/822336 [perl #123218] "preserve" $/ if set to a bad value
	DEBPKG:fixes/5.20.3/test_count_base_rs - http://bugs.debian.org/822336 Fix test count in t/base/rs.t
	DEBPKG:fixes/5.20.3/remove_get_magic - http://bugs.debian.org/822336 [perl #123739] Remove get-magic from $/
	DEBPKG:fixes/5.20.3/speed_up_scalar_g - http://bugs.debian.org/822336 [perl #123202] speed up scalar //g against tainted strings
	DEBPKG:fixes/5.20.3/accidental_all_features - http://bugs.debian.org/822336 Stop $^H |= 0x1c020000 from enabling all features
	DEBPKG:fixes/5.20.3/multidimensional_arrays_utf8 - http://bugs.debian.org/822336 [perl #124113] Make check for multi-dimensional arrays be UTF8-aware
	DEBPKG:fixes/5.20.3/unquoted_utf8_heredoc_terminators - http://bugs.debian.org/822336 Allow unquoted UTF-8 HERE-document terminators
	DEBPKG:fixes/5.20.3/parentheses_ambiguous_warning_utf8_functions - http://bugs.debian.org/822336 Fix "...without parentheses is ambuguous" warning for UTF-8 function names
	DEBPKG:fixes/5.20.3/leak_namepv_copy - http://bugs.debian.org/822336 [perl #123786] don't leak the temp utf8 copy of namepv
	DEBPKG:fixes/5.20.3/h2ph_hex_constants - http://bugs.debian.org/822336 h2ph: correct handling of hex constants for the preamble
	DEBPKG:fixes/5.20.3/leftbracket_XTERMORDORDOR - http://bugs.debian.org/822336 [perl #123711] Fix crash with 0-5x-l{0}
	DEBPKG:fixes/5.20.3/fatalize_warnings_unwinding - http://bugs.debian.org/822336 [perl #123398] don't fatalize warnings during unwinding (#123398)
	DEBPKG:fixes/5.20.3/setpgrp - http://bugs.debian.org/822336 =?UTF-8?q?Don=E2=80=99t=20treat=20setpgrp($nonzero)=20as=20setpgr?= =?UTF-8?q?p(1)?=
	DEBPKG:fixes/5.20.3/death_unwinding_crash - http://bugs.debian.org/822336 [perl #124156] RT #124156: death during unwinding causes crash
	DEBPKG:fixes/5.20.3/stashpvn_crash - http://bugs.debian.org/822336 [perl #125541] Fix crash with %::=(); J->${\"::"}
	DEBPKG:fixes/5.20.3/possessive_quantifier - http://bugs.debian.org/822336 [perl #125825] PATCH: [perl 125825] {n}+ possessive quantifier broken
	DEBPKG:fixes/5.20.3/quoted_code_crash - http://bugs.debian.org/822336 [perl #123712] Fix /$a[/ parsing
	DEBPKG:fixes/5.20.3/checking_sub_inwhat - http://bugs.debian.org/822336 [perl #123712] Don't check sub_inwhat
	DEBPKG:fixes/5.20.3/yylex_loop - http://bugs.debian.org/822336 Fix hang with "@{"
	DEBPKG:fixes/5.20.3/docs/op - http://bugs.debian.org/822336 Fix apidocs for OP_TYPE_IS(_OR_WAS) - arguments separated by |, not ,.
	DEBPKG:fixes/5.20.3/docs/encoding - http://bugs.debian.org/822336 perlpodspec: Corrections/adds to detecting =encoding
	DEBPKG:fixes/5.20.3/docs/SvPV_set - http://bugs.debian.org/822336 improve SvPV_set's docs, it really shouldn't be public API
	DEBPKG:fixes/5.20.3/docs/autodie - http://bugs.debian.org/822336 Fix warning message regarding "use autodie" and "use open".
	DEBPKG:fixes/5.20.3/docs/autodie_2_26 - http://bugs.debian.org/822336 perlunicook: Note that autodie >= 2.26 should be okay with "use open".
	DEBPKG:fixes/5.20.3/docs/setenv - http://bugs.debian.org/822336 Fix setenv() replacement documentation in perlclib
	DEBPKG:fixes/5.20.3/docs/clib_caution - http://bugs.debian.org/822336 perlhacktips: Add caution about clib ptr returns to static memory
	DEBPKG:fixes/5.20.3/docs/perlunicook_typos - http://bugs.debian.org/822336 Fix minor code typos in perlunicook
	DEBPKG:fixes/5.20.3/docs/ook_example - http://bugs.debian.org/822336 [perl #122322] Update OOK example in perlguts
	DEBPKG:fixes/5.20.3/docs/study_noop - http://bugs.debian.org/822336 perlfunc: mention that study() is currently a noop
	DEBPKG:fixes/CVE-2016-1238/remove-dot-when-loading - [perl #127834] (perl #127834) remove . from the end of @INC if complex modules are loaded
	DEBPKG:fixes/CVE-2016-1238/remove-dot-in-padwalker - [perl #127834] perl5db.pl: ensure PadWalker is loaded from standard paths
	DEBPKG:fixes/CVE-2016-1238/remove-dot-in-dist - [perl #127834] dist/: remove . from @INC when loading optional modules
	DEBPKG:fixes/CVE-2016-1238/remove-dot-in-cpan - [perl #127834] cpan/: remove . from @INC when loading optional modules
	DEBPKG:fixes/CVE-2016-1238/customized-encode - Update customized.dat for cpan/Encode/Encode.pm
	DEBPKG:debian/CVE-2016-1238/test-suite-without-dot - [perl #127810] Patch unit tests to explicitly insert "." into @INC when needed.
	DEBPKG:debian/CVE-2016-1238/eumm-without-dot - [perl #127810] Add PERL_USE_UNSAFE_INC support to EU::MM for fortify_inc support.
	DEBPKG:debian/CVE-2016-1238/cpan-without-dot - [perl #127810] Set PERL_USE_UNSAFE_INC for cpan usage
	DEBPKG:debian/CVE-2016-1238/mb-without-dot - Make Module::Build set PERL_USE_UNSAFE_INC
	DEBPKG:debian/CVE-2016-1238/sitecustomize-in-etc - Look for sitecustomize.pl in /etc/perl rather than sitelib on Debian systems
	DEBPKG:fixes/xsloader-eval - [rt.cpan.org #115808] http://bugs.debian.org/829578 =?UTF-8?q?Don=E2=80=99t=20let=20XSLoader=20load=20relative=20path?= =?UTF-8?q?s?=
  Built under linux
  Compiled at Jul 22 2016 15:48:26
  @INC:
    /etc/perl
    /usr/local/lib/x86_64-linux-gnu/perl/5.20.2
    /usr/local/share/perl/5.20.2
    /usr/lib/x86_64-linux-gnu/perl5/5.20
    /usr/share/perl5
    /usr/lib/x86_64-linux-gnu/perl/5.20
    /usr/share/perl/5.20
    /usr/local/lib/site_perl

Cheers !

@ikedas
Copy link
Member

ikedas commented Jun 18, 2017

Thanks for information. Now I understand you are using Debian 8 amd64.

FYI, below are a few example of machines I maintain (it takes short after startup). Is there any remarkable difference from your environment?


  • Version: sympa-6.2.17b.2
  • Arch: x86_64 (amd64)
$ uname -mrs
Linux 2.6.32-504.3.3.el6.x86_64 x86_64
$ perl -V | grep [a-z]size
    intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
    ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
$ ps axl | sed -ne '1p;/[.]pl\|[.]fcgi/p'
F   UID   PID  PPID PRI  NI    VSZ   RSS WCHAN  STAT TTY        TIME COMMAND
5  9001 12724     1  20   0 313840 44964 hrtime S    pts/0      1:07 /usr/bin/perl /usr/sbin/sympa_msg.pl
5  9001 12731     1  20   0 197412 20568 hrtime S    pts/0      1:27 /usr/bin/perl /usr/sbin/bulk.pl
5  9001 12739     1  20   0 286360  2384 hrtime S    pts/0      0:31 /usr/bin/perl /usr/sbin/archived.pl
5  9001 12746     1  20   0 188012 19940 hrtime S    pts/0      0:32 /usr/bin/perl /usr/sbin/bounced.pl
5  9001 12753     1  20   0 194304 57880 hrtime S    pts/0      0:12 /usr/bin/perl /usr/sbin/task_manager.pl
4  9001 20593 20328  20   0 323356 88356 skb_re S    ?          0:06 /usr/bin/perl /usr/libexec/sympa/wwsympa.fcgi
4  9001 20871 20328  20   0 320664 85664 skb_re S    ?          0:01 /usr/bin/perl /usr/libexec/sympa/wwsympa.fcgi
$ 

  • Version: sympa-6.2.17b.2
  • Arch: i686
$ uname -mrs
Linux 2.6.32-504.23.4.el6.i686 i686
$ perl -V | grep [a-z]size
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
$ ps axl | sed -ne '1p;/[.]pl\|[.]fcgi/p'
F   UID   PID  PPID PRI  NI    VSZ   RSS WCHAN  STAT TTY        TIME COMMAND
4   106  4207  3604  20   0  78168 52812 ?      S    ?          0:06 /usr/bin/perl /usr/libexec/sympa/wwsympa.fcgi
5   106 28508     1  20   0  75416 23252 ?      S    pts/2      0:32 /usr/bin/perl /usr/sbin/sympa_msg.pl
5   106 28515     1  20   0  47228 13480 ?      S    pts/2      1:00 /usr/bin/perl /usr/sbin/bulk.pl
5   106 28522     1  20   0  46872  2772 ?      S    pts/2      0:08 /usr/bin/perl /usr/sbin/archived.pl
5   106 28533     1  20   0  45744 17720 ?      S    pts/2      0:08 /usr/bin/perl /usr/sbin/bounced.pl
5   106 28541     1  20   0  73816 39668 ?      S    pts/2      0:26 /usr/bin/perl /usr/sbin/task_manager.pl
$ 

@alexAubin
Copy link
Author

alexAubin commented Jun 18, 2017

Edit: btw I'm running Sympa 6.2.16

Hi ikedas,

the main difference I see is that I'm running Linux 3.x :

$ uname -mrs
Linux 3.16.0-4-amd64 x86_64

The return of perl -V | grep [a-z]size is identical to yours.

Here's the return of the ps axl :

$ ps axl | sed -ne '1p;/[.]pl\|[.]fcgi/p'
F   UID   PID  PPID PRI  NI    VSZ   RSS WCHAN  STAT TTY        TIME COMMAND
4  1001 25395     1  20   0 311220  1420 -      Ss   ?          0:02 /usr/bin/perl /home/sympa/lib/sympa/cgi/wwsympa.fcgi
5  1001 25416     1  20   0 283268  6952 -      S    ?          0:00 /usr/bin/perl /home/sympa/sbin/sympa_msg.pl
5  1001 25434     1  20   0 288824 76076 -      S    ?          0:00 /usr/bin/perl /home/sympa/sbin/task_manager.pl
5  1001 25435     1  20   0 193892 64704 -      S    ?          0:00 /usr/bin/perl /home/sympa/sbin/bulk.pl
5  1001 25440     1  20   0 282508 67640 -      S    ?          0:00 /usr/bin/perl /home/sympa/sbin/bounced.pl
5  1001 25441     1  20   0 283420 69296 -      S    ?          0:00 /usr/bin/perl /home/sympa/sbin/archived.pl

And additionally, the output of top -u sympa which shows that 4 processes take about 13% of RAM each (maybe that info is also in ps axl but not sure how to decipher it :P) :

  PID USER      PR  NI    VIRT    RES    SHR S %CPU %MEM     TIME+ COMMAND                                                                                                                                                                     
25416 sympa     20   0  283268   7124   1984 S  0.4  1.4   0:00.11 sympa_msg.pl                                                                                                                                                                
25395 sympa     20   0  311220   1420   1420 S  0.0  0.3   0:02.14 wwsympa.fcgi                                                                                                                                                                
25434 sympa     20   0  288824  75708   6848 S  0.0 15.0   0:00.33 task_manager.pl                                                                                                                                                             
25435 sympa     20   0  193892  64468   3408 S  0.0 12.7   0:00.30 bulk.pl                                                                                                                                                                     
25440 sympa     20   0  282508  67188   3940 S  0.0 13.3   0:00.07 bounced.pl                                                                                                                                                                  
25441 sympa     20   0  283420  68812   4340 S  0.0 13.6   0:00.11 archived.pl

And the status of RAM (among which 500MB of swap) :

$ free -h
             total       used       free     shared    buffers     cached
Mem:          494M       476M        18M       3.5M        11M        95M
-/+ buffers/cache:       369M       125M
Swap:         511M       375M       136M

@ikedas
Copy link
Member

ikedas commented Jun 19, 2017

I guess using i386 packages can solve (at least mitigate) problem on memory usage. IMO 64-bit architecture (8 bytes for integers and pointers) is no more than space-wasting for many applications including Sympa.

@ikedas
Copy link
Member

ikedas commented Dec 23, 2017

Stagnated issue. Closed.

@ikedas ikedas closed this as completed Dec 23, 2017
@eiro eiro reopened this Dec 23, 2017
@eiro
Copy link

eiro commented Dec 23, 2017

RAM consumption is still too damn high. and this should be adressed some day

@ikedas
Copy link
Member

ikedas commented Dec 23, 2017 via email

@ikedas
Copy link
Member

ikedas commented Jan 27, 2018

No updates. Closed.

@ikedas ikedas closed this as completed Jan 27, 2018
@p4tpr0
Copy link

p4tpr0 commented Dec 15, 2021

Hello, I'm sorry to say that Sympa is still, in late 2021, using gigantic amount of RAM, for no valid reason. I only have a screen capture of this, but it's quite interesting.

https://www.patpro.net/cafesale/symparam.png

I'm running sympa-6.2.62 + perl5-5.32.1_1 on FreeBSD 12.x-RELEASE (amd64)

After a restart of Sympa, I've this:

PID USERNAME THR PRI NICE SIZE RES STATE C TIME WCPU COMMAND
70112 sympa 1 21 0 99M 83M nanslp 10 0:00 0.05% perl
70118 sympa 1 22 0 100M 84M nanslp 14 0:00 0.01% perl
70115 sympa 1 22 0 100M 84M nanslp 10 0:00 0.01% perl
49603 sympa 1 21 0 1191M 1166M accept 13 0:49 0.00% perl
70121 sympa 1 52 0 118M 102M nanslp 16 0:00 0.00% perl
70109 sympa 1 22 0 100M 84M nanslp 12 0:00 0.00% perl

$ perl -V | grep [a-z]size
intsize=4
longsize=8
ptrsize=8
doublesize=8
longlongsize=8
longdblsize=16
ivsize=8
nvsize=8
lseeksize=8

@racke
Copy link
Contributor

racke commented Dec 15, 2021

As far as I can tell, this is actually a problem with FreeBSD 12:

#1170

If you think this actually not the case, please open a new issue.

@p4tpr0
Copy link

p4tpr0 commented Dec 15, 2021

looks really promising, thanks for the pointer!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants