qBT 3.0.10 >500MB cache size can trigger crash + hashfails

Windows specific questions, problems.
ciaobaby

Re: qBT 3.0.10 >500MB cache size can trigger crash + hashfails

Post by ciaobaby »

Caching is done on disk writes ie: downloaded data blocks that your client is receiving NOT the blocks you are uploading to peers.
gwarser

Re: qBT 3.0.10 >500MB cache size can trigger crash + hashfails

Post by gwarser »

Caching is done on both - reads and writes. You can even check read cache performance (% of "hits" - reads from already cached data) in Tools -> Statistics
--8<--
http://www.rasterbar.com/products/libto ... anual.html
Ctrl+F -> "read cache"
Last edited by gwarser on Tue May 20, 2014 12:23 am, edited 1 time in total.
ciaobaby

Re: qBT 3.0.10 >500MB cache size can trigger crash + hashfails

Post by ciaobaby »

Sure. But just in case you hadn't noticed, the setting that you can change in the qBitTorrent options is for the disc [/b]write[/b] cache.
gwarser

Re: qBT 3.0.10 >500MB cache size can trigger crash + hashfails

Post by gwarser »

qbtsession.cpp line 408:

Code: Select all

  int cache_size = pref.diskCacheSize();
  sessionSettings.cache_size = cache_size ? cache_size * 64 : -1;
This code reads size of cache from settings, and sets cache_size for session.
And cache_size is:
[quote="http://www.rasterbar.com/products/libto ... tomization"]cache_size is the disk write and read cache...[/quote]
Last edited by gwarser on Tue May 20, 2014 6:45 pm, edited 1 time in total.
ciaobaby

Re: qBT 3.0.10 >500MB cache size can trigger crash + hashfails

Post by ciaobaby »

Did you happen to notice the preset cache size for a high performance seed?
Switeck

Re: qBT 3.0.10 >500MB cache size can trigger crash + hashfails

Post by Switeck »

Using qBT v3.4.0beta2 64bit on Windows 7 Pro 64bit with 10 GB DDR3 ram, Intel i5 650 3.2 Ghz CPU (not overclocked)
The ONLY apps I had open were the ones I was using for this test -- Notepad, Paint (opened 2x to save screenshots), Process Explorer, System Monitor, Windows Explorer, Windows Task Manager, uTorrent v2.2.1, and of course qBitTorrent.
System Monitor didn't show memory usage by qBitTorrent any differently than Windows Task Manager or Process Explorer, so it is not shown.
Also using Imdisk to create a 3600 MB ramdrive, which is why System shows such high ram usage...it counts the ramdrive.
Also used Game Booster to shut down background tasks/DLLs/services.

Demonstrating qBT's 4096 MB max cache size "eating" considerably more ram than should be expected.
qBT's cache was set to 4096 MB size and 600 seconds expiry interval. Tested multiple times with Enable OS cache enabled and disabled...and it made no difference.
Enabling "Send upload piece suggestions" caused qBT's upload speed to burst-then-die, not even reaching 1/10th the speed qBT reached (for my local speed from qBT->uTorrent) without it enabled.
Encryption Mode set to Prefer or Require encryption also resulted in upload speeds being reduced to roughly 1/4 of without it despite ~10% LESS cpu usage WITH encryption used.

This screenshot wasn't easy to fit everything into the picture that I wanted to show.
Process Explorer is at the top, qBitTorrent below that, uTorrent (mostly covered up) below that, and Windows Task Manager at the bottom.

CPU usage by qBT showed 52%!
qBT's Working set (Memory):  5,099,936 KB  (4980.4 MB)
qBT's Private Bytes/Commit Size:  5,406,215 KB  (5279.5 MB)
qBT's Virtual Size:  5,769,148 KB  (5633.9 MB)

Although I had 10-12 seeding torrents started in qBT, only 3 were active with peers. There were no downloading torrents in qBT.
uTorrent's CPU usage might have spiked as high as 20-25% during the test, but the CPU usage still had at least 10% idle.

Total ram usage by qBitTorrent exceeded its cache size by 880-1183.5 MB (depending on whether counting working set or private bytes) and virtual size exceeded the cache size by 1537.9 MB.
Attachments
qBitTorrent v3.4.0beta2 FAIL 2b.png
Henry63

Re: qBT 3.0.10 >500MB cache size can trigger crash + hashfails

Post by Henry63 »

I noticed when I went from mech drive to SSDs that having a large cache set in qBittorrent made it run slower and use more CPU. A possibility is the high CPU usage you're seeing may be related to a large cache.

As for the 5GiB vs 4GiB, that's total memory vs cached data. There's a lot more to allocating memory than just the data you want. There's alignments, pools, data-structure overhead, and other things that may be in addition to the 4GiB.
Switeck

Re: qBT 3.0.10 >500MB cache size can trigger crash + hashfails

Post by Switeck »

The high CPU usage is not significantly related to the large cache.
I've done other tests to confirm that.

Sometimes, qBitTorrent will be using over 25% CPU even when no torrents are running.
I don't mean started but no peers/seeds, all the torrents are paused and this happens.
Cache size is almost entirely unrelated to this. Yes, I tested that also... I can reproduce the conditions to trigger high CPU on demand, although I haven't tested v4.0.0 for that yet.

Total memory vs cached memory... The ~1 GB extra memory usage at 4 GB cache size may be associated with cache-related things without being the cache itself, but qBT would not normally use anywhere near that amount of ram without the cache being present.
Post Reply