qbittorrent / qBittorrent

qBittorrent BitTorrent client
https://www.qbittorrent.org
Other
26.92k stars 3.88k forks source link

WebUI throws "qBittorrent client is not reachable" almost constantly #11390

Closed radumateibirle closed 4 years ago

radumateibirle commented 4 years ago
Kolcha commented 4 years ago

looks like you have some performance issues, very likely disk I/O may be bottleneck. I saw very similar behavior when OS where installed on flash drive which was close to die.

Long time ago I also tried to run torrent client on VM hosted on ESXI server and that was bad idea... Disk I/O is terrible... torrent clients intensively perform random disk I/O, but due to a lot of other VMs running on the same host there is a lack of free RAM (which could be used as disk cache to mitigate performance degradation due to disk I/O) so I/O intensive apps suffer from I/O wait. when processes run any system calls to perform I/O they (processes) go to uninterruptible state (and stop responding) until I/O operation completes.

not only download/upload speed suffer from target downloads disk I/O problems, system disk (where qBittorrent data is saved) is important too (such was in my first case). few files must be created or just updated during adding new torrent, due to bad I/O it can take a lot of time, so WebUI may decide that connection was lost. try to use watched folder and upload torrent files to it, this will significantly mitigate the issue.

also this behavior may be observed due to lack of CPU time (i.e. high CPU load, some VM(s) uses a lot of CPU).

Kolcha commented 4 years ago

moreover, as I understood, your download folder is smb share. it is known that network filesystems has pretty bad random I/O, and to mitigate that they cache a lot of data. in particular case, Samba demonstrate better performance when more RAM is accessible on both sides (smb client and smb server), client side maybe more critical. also smb client causes high CPU usage when performing a lot of I/O operations. I suggest to run torrent client on separate machine, and share downloads folder (i.e. run qBittorent on the same machine as Samba server).

radumateibirle commented 4 years ago

I managed to solve this by slightly increasing RAM for the qbittorrent vm from 512 to 1024. I've never seen it exceed 540mb but hey, it solved problem. I know of the smb issues but this is the simplest way to integrate everything for me and i get 50MBps down speed. Next step is to add some more ram as i only have 1gb for qbittorent vm and 5gb for the freenas vm, but ddr3 is still expensive (well, expensive for me :)) ).