qBittorrent and RAM

Other platforms, generic questions.
arzine

qBittorrent and RAM

Post by arzine »

I was just wondering why photoshop was exporting slower than usual and why my video encoding was drastically slower until I opened my task manager to see that qBitt is taking up as much ram (less actually but still a really big amount) of my memory.

I brought this up to ask if this is an issue, and if so, is it going to be dealt with the next update? If not, how do I limit the amount of memory it uses without killing the app?
ciaobaby

Re: qBittorrent and RAM

Post by ciaobaby »

that qBitt is taking up as much ram
Not qbittorrent using it, but Windows caching is

is it going to be dealt with the next update?
It already is.
User avatar
Peter
Administrator
Administrator
Posts: 3049
Joined: Wed Jul 07, 2010 6:14 pm

Re: qBittorrent and RAM

Post by Peter »

You can set qBittorrent's cache size in settings.
This is what happens:

- HDDs are bad at random writes.
- qBittorrent downloading, non-sequential, writing data with - let's say 4-6M/s.
- You work on your project, start exporting, as fast as possible.

- Export starts eating up HDD I/O as much as possible.
- Windows tries to balance things, qBittorrent and any other app that requests I/O, also gets some I/O.
- qBittorrent eats up allowed disk cache, in order to keep downloading with some speed while disk is used.
- Disk keeps being used, cache is full, download halts, cannot flush cache due to slow speeds.
- Performance here gets much, much worse because of random reads/writes.
- Now the PC is really, really starved for I/O and everything will finish much slower.

You can check RAM use on Windows with the tools "rammap" and "vmmap".
The tool "cacheset" shows the current cached file.
Download them here: http://technet.microsoft.com/en-us/sysi ... 42062.aspx

PS.: Cheap / slow raid controllers can also cause extensive RAM use due to causing a bottleneck, and wrong OS file caching.

How to limit:
- Lower disk cache in qBittorrent.
- Lower speeds in qBittorrent.
- Set qBittorrent's priority to "Low" in Task Manager.

But it's your disk what causes the memory use / slowness, not qBittorrent.
Attachments
vmmap.jpg
rammap.jpg
arzine

Re: qBittorrent and RAM

Post by arzine »

Thank you so much for your replies! I guess i just can't seed while working
User avatar
Peter
Administrator
Administrator
Posts: 3049
Joined: Wed Jul 07, 2010 6:14 pm

Re: qBittorrent and RAM

Post by Peter »

How fast you were trying to seed?
sledgehammer_999
Administrator
Administrator
Posts: 2443
Joined: Sun Jan 23, 2011 1:17 pm

Re: qBittorrent and RAM

Post by sledgehammer_999 »

Yes you can seed. Be sure to have v3.1.11 installed. Go to advanced settings and disable OS cache.

EDIT: This will help with the RAM problem. However if your system/usage has very high I/O needs for different things then things MIGHT still respond slowly.
Last edited by sledgehammer_999 on Fri Jan 16, 2015 6:42 pm, edited 1 time in total.
Muzak

Re: qBittorrent and RAM

Post by Muzak »

I've been wondering about this.  I've disabled the OS cache and overall performance is better, still not great.  However, qBit still slowly eats RAM until I start getting "memory location not available" errors and have to restart qBit.  I've reduced the disk cache write size from 1500mb to 750 and it helped quite a bit, but every 2 weeks or so I have to restart.  As the memory size approaches where I start seeing errors performace drops off rapidly, so there is some correlation between how much "memory" is "allocated" to qBit and performance.  Running XP sp3 (for a few more weeks only) 3Gb RAM dual core pentium.
ciaobaby

Re: qBittorrent and RAM

Post by ciaobaby »

Set the cache to 0 and just let qbittorrent/libtorrent handle it. The client 'knows' how much cache space is needed at any point in time.
sledgehammer_999
Administrator
Administrator
Posts: 2443
Joined: Sun Jan 23, 2011 1:17 pm

Re: qBittorrent and RAM

Post by sledgehammer_999 »

Or what Muzak observes when the os caching is disabled, might be a slow memory leak that adds up after several days of running...
ciaobaby

Re: qBittorrent and RAM

Post by ciaobaby »

Therefore running with the cache size being managed automatically will assist in identifying if it is a memory 'leak' or not. If the client still consumes memory until a 'crash'  occurs, there is a memory 'leak'.
Henry63

Re: qBittorrent and RAM

Post by Henry63 »

[quote="sledgehammer_999"]
Or what Muzak observes when the os caching is disabled, might be a slow memory leak that adds up after several days of running...
[/quote]

It would have to be very slow. I've had qBittorrent seeding for over a month with over 2TB uploaded and it was still pretty much only consuming as much memory as the cache was reported large.
Muzak

Re: qBittorrent and RAM

Post by Muzak »

Just to follow up.  I did change the cache to 0 as requested.  I have to restart qBit every 10 days or so under XP SP3 as the memory footprint grows from around 110Mb to 600Mb over time.  Once the total size gets over 500Mb it's just a matter of time before I start getting connection errors.
User avatar
Peter
Administrator
Administrator
Posts: 3049
Joined: Wed Jul 07, 2010 6:14 pm

Re: qBittorrent and RAM

Post by Peter »

@Muzak: Download "Microsoft Sysinternals".
You can find the "vmmap.exe", "rammap.exe" and "Procexp.exe"

Check qBittorrent after such, and see how it actually eats up memory.
For example, vmmap with Dropbox:

Image

qBittorrent:
Image
diaspar

Re: qBittorrent and RAM

Post by diaspar »

Is this RAM usage normal? It grows from ~30MB to ~300MB in few weeks.

Image
ciaobaby

Re: qBittorrent and RAM

Post by ciaobaby »

[quote="diaspar"]
Is this RAM usage normal? It grows from ~30MB to ~300MB in few weeks.

Image
[/quote]

Possibly.
Post Reply