qBittorrent official forums

qBittorrent => MAC => Topic started by: vlad-i-mir on June 06, 2013, 11:09:09 AM

Title: Inactive memory
Post by: vlad-i-mir on June 06, 2013, 11:09:09 AM
Hello again!
I am continue qBittorrent testing.
Meantime I noticed one not good thing - when I am downloading something like 10-20 GB (or more) or uploading torrents for 2-3 hours my 'inactive ram' fills up with 10GB or more till 99,9%. Totally I have 16 GB RAM in my Mac Mini. So with this all my RAM will be used, causing things like video playback in vlc to crash, freezes etc.
In order to free the inactive memory I type the 'purge' command in Terminal, but that's far from ideal.
When I tried downloading a large file with Transmission/utorrent there is no problem like this at all.
Apart from this recent issue I like to keep using qBittorrent, so is there something I can do or is this a bug in qBittorrent?
Any help will be much appreciated!
Title: Re: Inactive memory
Post by: Peter on June 06, 2013, 11:15:16 AM
So basically it eats up all your free memory?
Not just file cache?
Title: Re: Inactive memory
Post by: vlad-i-mir on June 06, 2013, 12:20:10 PM
Quite correct. It eats all free memory. Not in the same minute, but during a few hours.
I tried with cache - 64, 128, 256, 512 MB and 0 (auto mode).
Nothing succeed - the same.
Title: Re: Inactive memory
Post by: Peter on June 06, 2013, 01:56:31 PM
So far so good, but I'll keep it running for a few days.
Title: Re: Inactive memory
Post by: vlad-i-mir on June 06, 2013, 02:02:47 PM
Thanks for reporting back.
I began test with you in the same time:
Title: Re: Inactive memory
Post by: Peter on June 06, 2013, 02:08:39 PM
Wow, it eats up 1.45gb private memory?
That is surely a memory leak in libtorrent...
(I'll report back later.)
Title: Re: Inactive memory
Post by: vlad-i-mir on June 06, 2013, 02:50:57 PM
ScreenShot after 50 minutes of process:
Title: Re: Inactive memory
Post by: vlad-i-mir on June 06, 2013, 06:59:21 PM
ScreenShot after 3-4 hours:
Title: Re: Inactive memory
Post by: Peter on June 06, 2013, 07:44:04 PM
It happens here as well. Went up to 600MB+ private usage.
I think this will be a libtorrent bug... but we will have to wait for the new version (with new libtorrent). If that behaves bad as well, time to report the bug at libtorrent's bugtracker.

!This is not a bug in qBittorrent.
Title: Re: Inactive memory
Post by: vlad-i-mir on June 06, 2013, 08:37:56 PM
And the last screenshot...
Title: Re: Inactive memory
Post by: Peter on June 06, 2013, 08:41:16 PM
Okay Vladimir, now we will have to wait for a new version.
You can make a script (schedule it) so it restarts qBittorrent every few hours.
If that's an option for you.
Title: Re: Inactive memory
Post by: vlad-i-mir on June 06, 2013, 08:45:01 PM
Shiki, thank you. I completely understand you.
I made last screenshot only for full history.

By the way, how do you think?
May be we will report about the libtorrent's bug before the new version? Or it is useless?
Title: Re: Inactive memory
Post by: Peter on June 06, 2013, 08:50:34 PM
I don't think we have to report it for now.
The alpha version is already out (qBittorrent), and it will use the new libtorrent.

All we can do is wait, and use the workaround (if you want to.)
http://superuser.com/questions/126907/how-can-i-get-a-script-to-run-every-day-on-mac-os-x (http://superuser.com/questions/126907/how-can-i-get-a-script-to-run-every-day-on-mac-os-x)

I can look around for a solution if you want to. (To get a script that would restart your client every few hours.)
The script would only do this:
1) kill (gracefully) qbittorrent
2) run qbittorrent
Title: Re: Inactive memory
Post by: sledgehammer_999 on June 06, 2013, 10:35:12 PM
I am curious what does the "purge" command actually do? Any links?

This may be a bug/feauture related to the way the OS handles the disk cache. We had a similar problem on Windows ~1 year ago...
Title: Re: Inactive memory
Post by: Peter on June 07, 2013, 02:27:43 AM
It is a bug, 100%.
I've been running my virtual machine and the private memory just growing and growing.
There is no end to it, there is a definite leak.

However, I'll run this overnight with constant screenshotting to see what happens.

Is it hard to compile rasterbar + qBittorrent on OS X? (I hate compiling stuff on Windows, as it's a tedious process.. but maybe it's easier on OS X?)
SO I could try the latest and see if it's got the same bug.
Title: Re: Inactive memory
Post by: loki on June 07, 2013, 09:08:38 AM
I would think compiling is a bit more accessible to Mac since it's built more like a linux/unix... as far as utilities being much more available, correct? That is to say it SHOULD operate similarly, not that packages would be compatible in any way, I don't think. But probably just as much of a pita.
Title: Re: Inactive memory
Post by: Peter on June 07, 2013, 11:27:34 AM
Sorry guys I was wrong. It looks like it just goes up to a limit that it sets and then it drops.
Behaves perfectly fine.

Vladimir met some problem/bug, but by default it behaves just fine.
(I'll post my screenshots as soon as I manage to upload the video to youtube.)
Title: Re: Inactive memory
Post by: Peter on June 07, 2013, 12:30:36 PM
Here is the video.
I ran the client all night, with all the popular torrents I could find.

http://www.youtube.com/watch?v=7bBlp3va2eY&hd=1 (http://www.youtube.com/watch?v=7bBlp3va2eY&hd=1)

The cache was set to 512mb.
Title: Re: Inactive memory
Post by: vlad-i-mir on June 13, 2013, 10:05:39 AM
I am curious what does the "purge" command actually do? Any links?

Code: [Select]
File: *manpages*,  Node: purge,  Up: (dir)
purge(8)                  BSD System Manager's Manual                 purge(8)
NAME
     purge -- force disk cache to be purged (flushed and emptied)
SYNOPSIS
     purge
DESCRIPTION
     Purge can be used to approximate initial boot conditions with a cold disk
     buffer cache for performance analysis. It does not affect anonymous mem-
     ory that has been allocated through malloc, vm_allocate, etc.
SEE ALSO
     sync(8), malloc(3)
                              September 20, 2005