Seafile 6.2.x (WSGI mode) Idle CPU Usage too High


#1

Hi,
Ever since following the docs to upgrade to 6.2.1/6.2.2, I’ve noticed constant CPU usage by Seafile due to WSGI mode that wasn’t present with fastcgi:

There is no Seafile activity occurring, and this has only started since switching away from fastcgi. There are 4 processes, totalling about 10% CPU combined.


#2

Screenshot of fastcgi for reference:


#3

Bumping for other people’s experiences (Is this issue only occuring on my server?)


#4

I can’t really help you, but maybe this informations will get you a step further:
I’m (still) on Seafile 6.1.x (pro) and recently switched from fastcgi to wsgi in preparation for 6.2 and for me everything stayed the same. “seahub.wsgi” processes always have no/zero CPU usage unless there is something done with the web interface of course.
So maybe, just maybe, it is something special with wsgi mode and 6.2.x?


#5

Hi,

I can confirm this behaviour for Seafile 6.2.1. The Seafile processes constantly using CPU cycles even when nginx is stopped to prevent access.

Best regards

Thomas


#6

I have to echo Nytrm. I went to wsgi from fastcgi on my 6.1.2 CE server and everything is quiet.


#7

I can confirm this, too! All of the seafile processes have high CPU load after the upgrade to WSGI. Seafile version 6.2.2 CE


#8

So to do a vague summary of this issue:

  • Seafile 6.1.x CE/Pro with WSGI (after switching from FastCGI): no occurrence of abnormal CPU usage of Seahub’s processes
  • Seafile 6.2.x CE with WSGI (after switching from FastCGI): abnormal high CPU usage of Seahub’s processes when idle

Maybe something interesting for you @daniel.pan !?


#9

You can see when I switched from FastCGI to WSGI.


#10

@Martin Just to make it specific: Which seafile version are you using?


#11

6.2.2 CE on Debian Jessie x64


#12

Using WSGI, the python processors will communicate with a master processor even when idle. So I think such CPU usage is normal.


#13

Using CPU whilst ‘idle’ is the opposite of being ‘idle’, whether it’s normal or not for WSGI. This kills all power management strategies.
Well this thread’s easily found via Google now, so for those server admins reading with small users; ignore the docs and keep fastcgi.


#14

FastCGI is in deprecated state and will be removed after some time …

Am I right?


#15

But why, as it is state of our investigation now, is there the “high” idle CPU usage only with 6.2.x and not with 6.1.x with WSGI?


#16

The only difference from 6.1.x is that in seafile-server-6.2.x/runtime/seahub.conf, there are:

workers = 3
threads = 5

Can you try remove the two lines and restart Seahub?


Seafile server 6.2.3 is ready! OAuth support and other improvements
#17

@pod0087 @Martin @scheff @P-atrick-B


Seafile server 6.2.3 is ready! OAuth support and other improvements
#18

Yes, this worked. The CPU load is as expected (all 0,0% CPU when idle - first line behind “S”, the second is memory usage):

Can I leave the lines out?


#19

Yes, this reduces the load.


#20

Fixed for me too