Server performance question

Nextcloud version (eg, 10.0.2): 12.0.3
Operating system and version (eg, Ubuntu 16.04):16.10
Apache or nginx version (eg, Apache 2.4.25): 2.4.25
PHP version (eg, 5.6):7.0
Is this the first time you’ve seen this error?:yes

The issue you are facing:

I have a member that has connected his Synology by using webdav to nextcloud server.
The synology is polling constantly…

This is causing slow performance on the apache server.
My question is if someone has an idea how i can fix this beside of telling the user not to connect with synology.

Can you quantify that? Is it slow because it blocks the connections (a higher number of connections of your webserver could help here), does the polling itself consume many resources (which one? CPU, RAM, php, webserver, database), or is it bandwidth?

Perhaps check the logfile what the client is actually doing.

Hi @tflidd

The issue is not caused by many connections. At the moment there are only 17 connections.
When i check HTOP there is not much activity, i have 4 core cpu and they are between 2 and 18%

top - 10:51:57 up 27 days, 11:17, 1 user, load average: 0,88, 0,70, 0,59
Tasks: 159 total, 2 running, 157 sleeping, 0 stopped, 0 zombie
%Cpu(s): 10,5 us, 0,8 sy, 0,0 ni, 87,2 id, 0,8 wa, 0,0 hi, 0,5 si, 0,1 st
KiB Mem : 4045712 total, 2011104 free, 920524 used, 1114084 buff/cache
KiB Swap: 4190204 total, 3835100 free, 355104 used. 2783448 avail Mem

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
16817 www-data 20 0 552304 44424 30052 R 10,0 1,1 0:12.84 apache2
16835 www-data 20 0 552544 45836 31204 S 7,3 1,1 0:08.26 apache2
16860 www-data 20 0 552308 40280 26260 S 6,6 1,0 0:01.87 apache2
16819 www-data 20 0 785896 58452 41980 S 4,7 1,4 0:14.87 apache2
16845 www-data 20 0 552384 44752 30404 S 3,7 1,1 0:07.64 apache2
16854 www-data 20 0 552240 44272 29988 S 3,3 1,1 0:04.77 apache2
16859 www-data 20 0 552164 38420 24436 S 3,3 0,9 0:02.39 apache2
30993 mysql 20 0 2726700 297076 5496 S 3,0 7,3 223:47.78 mysqld
1806 redis 20 0 61040 11204 2500 S 1,3 0,3 1090:56 redis-server
16857 www-data 20 0 552344 42044 27956 S 1,3 1,0 0:05.24 apache2
16848 www-data 20 0 785816 55876 39560 S 0,7 1,4 0:07.96 apache2
13543 root 20 0 2440800 132528 16740 S 0,3 3,3 181:44.54 mms
1 root 20 0 55208 5216 3692 S 0,0 0,1 0:29.13 systemd
2 root 20 0 0 0 0 S 0,0 0,0 0:00.31 kthreadd
3 root 20 0 0 0 0 S 0,0 0,0 3:39.46 ksoftirqd/0
7 root 20 0 0 0 0 S 0,0 0,0 72:11.51 rcu_sched
8 root 20 0 0 0 0 S 0,0 0,0 0:00.00 rcu_bh
9 root rt 0 0 0 0 S 0,0 0,0 0:01.03 migration/0
10 root 0 -20 0 0 0 S 0,0 0,0 0:00.00 lru-add-drain
11 root rt 0 0 0 0 S 0,0 0,0 0:05.03 watchdog/0

Also memory, i have 4GB and 958mb is used.
In the logging i see a load of login attempt actions of the same user.

Probably a high disk load is a problem too, you can check that with iotop

When i do that:
Total DISK READ : 0.00 B/s | Total DISK WRITE : 61.84 K/s
Actual DISK READ: 0.00 B/s | Actual DISK WRITE: 189.40 K/s
TID PRIO USER DISK READ DISK WRITE SWAPIN IO> COMMAND
232 be/3 root 0.00 B/s 23.19 K/s 0.00 % 6.93 % [jbd2/dm-0-8]
31293 be/4 mysql 0.00 B/s 3.87 K/s 0.00 % 1.61 % mysqld
31289 be/4 mysql 0.00 B/s 3.87 K/s 0.00 % 0.73 % mysqld
14084 be/4 mysql 0.00 B/s 3.87 K/s 0.00 % 0.61 % mysqld
31031 be/4 mysql 0.00 B/s 7.73 K/s 0.00 % 0.20 % mysqld
15427 be/4 root 0.00 B/s 3.87 K/s 0.00 % 0.00 % rotatelogs /var/log/access_log 86400
16844 be/4 www-data 0.00 B/s 7.73 K/s 0.00 % 0.00 % apache2 -k start
16624 be/4 www-data 0.00 B/s 3.87 K/s 0.00 % 0.00 % apache2 -k start
16845 be/4 www-data 0.00 B/s 3.87 K/s 0.00 % 0.00 % apache2 -k start
1 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % init
2 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [kthreadd]
3 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [ksoftirqd/0]
13654 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % mms
7 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [rcu_sched]
8 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [rcu_bh]
9 rt/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [migration/0]
10 be/0 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [lru-add-drain]
11 rt/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [watchdog/0]
12 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [cpuhp/0]
13 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [cpuhp/1]
14 rt/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [watchdog/1]
15 rt/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [migration/1]
16 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [ksoftirqd/1]
12817 be/0 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [kworker/2:2H]
19 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [cpuhp/2]
20 rt/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [watchdog/2]
21 rt/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [migration/2]
22 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [ksoftirqd/2]
15895 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % mms
25 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [cpuhp/3]
26 rt/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [watchdog/3]
27 rt/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [migration/3]
28 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [ksoftirqd/3]
6174 be/4 proftpd 0.00 B/s 0.00 B/s 0.00 % 0.00 % proftpd: (accepting connections)

thats weird, probably you have some hight io-delay from selsewhere?
another VM or anything and that device is just the last nail on the coffin?
perhaps that page helps with some delay diagnosis:

Hi,

do you use the redis server for any other job than your NC file locks?
It has consumed much more CPU time than your mysqld.

You can check the redis activities with redis-cli --stat or redis-cli monitor

  • Joerg