Seafile Server Memory usage

Hi,
is there a way to reduce seafiles memory usage?
jochen@server$ ps aux --sort -rss
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
seafile 8967 0.1 8.9 213484 91320 ? S 13:07 0:15 python2.7 /home/seafile/seafile-server-6.1.2/seahub/man
seafile 8966 0.0 8.7 211904 89252 ? S 13:07 0:06 python2.7 /home/seafile/seafile-server-6.1.2/seahub/man
seafile 8964 0.0 8.2 201728 84732 ? S 13:07 0:01 python2.7 /home/seafile/seafile-server-6.1.2/seahub/man
seafile 8962 0.0 4.0 137496 41964 ? S 13:07 0:00 python2.7 /home/seafile/seafile-server-6.1.2/seahub/man
seafile 8963 0.0 3.8 137496 39828 ? S 13:07 0:00 python2.7 /home/seafile/seafile-server-6.1.2/seahub/man
seafile 8965 0.0 3.8 137496 39824 ? S 13:07 0:00 python2.7 /home/seafile/seafile-server-6.1.2/seahub/man
seafile 8874 0.0 0.6 1094908 6352 ? Ssl 13:07 0:08 seaf-server -F /home/seafile/conf -c /home/seafile/ccne
seafile 8871 0.0 0.5 267288 5832 ? Ss 13:07 0:00 ccnet-server -F /home/seafile/conf -c /home/seafile/ccn
seafile 8869 0.0 0.2 54748 2464 ? Ss 13:07 0:00 /home/seafile/seafile-server-6.1.2/seafile/bin/seafile-

This is a lot, compared with other services:
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
postgres 1964 0.0 5.7 229056 59244 ? Ss 12:31 0:04 postgres: checkpointer process
postgres 1958 0.0 2.0 228936 20896 ? S 12:31 0:03 /usr/lib/postgresql/9.4/bin/postgres -D /var/lib/postgr
postgres 8875 0.0 1.5 230604 16056 ? Ss 13:07 0:11 postgres: seafile seafile_db 127.0.0.1(60997) idle
postgres 8872 0.0 1.3 230084 14092 ? Ss 13:07 0:00 postgres: seafile ccnet_db 127.0.0.1(60995) idle
postgres 11795 0.0 1.3 230052 13392 ? Ss 13:36 0:00 postgres: seafile ccnet_db 127.0.0.1(34282) idle
postgres 10639 0.0 1.3 230024 13388 ? Ss 13:16 0:00 postgres: seafile seafile_db 127.0.0.1(33187) idle
postgres 20759 0.0 1.1 230004 11640 ? Ss 15:25 0:00 postgres: postfixadmin postfixadmin 127.0.0.1(40140) id
postgres 20760 0.0 1.1 230004 11640 ? Ss 15:25 0:00 postgres: postfixadmin postfixadmin 127.0.0.1(40141) id
postgres 1966 0.0 0.8 228936 8704 ? Ss 12:31 0:01 postgres: wal writer process
postgres 1967 0.0 0.6 229580 6976 ? Ss 12:31 0:02 postgres: autovacuum launcher process
postgres 1965 0.0 0.5 228936 5696 ? Ss 12:31 0:00 postgres: writer process
postgres 1968 0.0 0.5 85420 5280 ? Ss 12:31 0:02 postgres: stats collector process
postfix 3736 0.0 0.3 42592 3864 ? S 12:33 0:00 tlsmgr -l -t unix -u -c
postfix 22756 0.0 0.3 38232 3812 ? S 15:52 0:00 pickup -l -t fifo -u -c
postfix 3459 0.0 0.3 38408 3636 ? S 12:32 0:00 qmgr -l -t fifo -u

Hi,

If you are the only one who uses this seafile server you can reduce amount of workers in both webserver which powers seahub and worker threads in file server.

I am on version 7 of seafile and these might be a bit different in 6.x, I hope you can figure that out. Here is some further reading on github - github.com/haiwen/seafile-docs/blob/master/config/seafile-conf.md. You can tinker with lots of settings!

seafile/conf/gunicorn.conf.py - has workers setting, and you can set it lower, ex. 2 or 3. This will reduce amount of python processes you have in the beginning of ps aux output. But it might impact web interface performance.

seafile/conf/seafile.conf - has worker_threads setting and you can set to something lower than 10 (default). But it will might make syncing slower if there are lots of users.