New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
v4.4.5 x64 - Insane memory usage (Windows) #17680
Comments
Why do you report about previous versions? |
Just for additional information. Main report about last version. |
Seems like a duplicate of many other issues reported this year. It is connected with libtorrent v2 - arvidn/libtorrent#6667 Speaking of the current topic, it is better to switch to the client version with libtorrent v1. And since 4.4.5 it is default build. You can get under After installing it you'll see something like this in About dialog: |
@adem4ik, sorry, there was a mistake in libtorrent ver. My current version is 1.2.17.0 already. |
@FiTADiNE in this case you can limit RAM usage by setting up Tools>Options>Advanced> |
@adem4ik, probably, in prev releases there was RAM limit, but now it's disk cache limit. Omg... Thanks, i'll try it. |
This comment was marked as off-topic.
This comment was marked as off-topic.
@adem4ik, still the same. |
4.4.5(libtorrent1+qt5) x64 uses 300-400 MB more memory than the disk cache size. 4.3.9 did not. |
@pulbitz, best way is downgrading to 4.3.9? |
I think it's a bit odd to use around 300-400 MB more memory than the disk cache size I specified. That's all. I'm still using 4.4.5 (libtorrent1+qt5) as there are no other inconveniences. |
Do you think qBittorrent uses memory only for the disk cache? |
FiTADiNE, decide already which version of qbt you are using and on which libtorrent. |
@stalkerok, already decided in 1st post. |
@glassez, yes, cuz it's older version on libtorrent 2 with Working set limit parameter and w/o memory leak. Here you can see 2 screenshots: 1066MB qB usage with total 88% of RAM (28.16GB) and 21% total of RAM (6.72GB) w/o qB. Today i've tested older version, and last on Qt5. 4.4.5 has memory leak with libtorrent 1.2.17.0 on any Qt. 4.4.3.1 on libtorrent 2.0.6.0 doesn't have memory leak, but has problem with "work around application stuttering on Windows" which was fixed in 4.4.4. Now i'm testing 4.4.5 RC_2 with libtorrent 2.0.7.0 |
@FiTADiNE, have you tried lowering the memory priority? |
Unfortunately, your screenshot does not provide any information about what actually uses all this memory.
There can be no memory usage that is not taken into account by the operating system (unless of course there is a memory leak in the operating system itself). Even if there is a memory leak in some application program, the operating system knows that this memory is occupied by this program. Of course, this memory can be used by the operating system itself for something related to the operation of qBittorrent (for example, for I/O caching). Therefore, it would be much more useful if you presented a more accurate source of memory consumption. |
@stalkerok, no, should i? And why? @glassez, lolwhat? 1st screen: qB works, 88% of 32GB RAM. Second: qB closed, 21% of 32GB RAM. What kind of screenshot do you need? Maybe i should record video? |
@FiTADiNE, disable the OS cache and set the memory usage to the lowest level, this will reduce the memory consumption. |
Where it is seen what exactly uses all these memory. |
Since you provide reports about different qBittorrent version don't forget to attach info about used qBittorrent, libtorrent, OS, etc. |
Okay, where could i see it?
Already done (with attached screenshots and text information in posts). v4.4.5 RC_2, Qt 6.3.0, libtorrent 2.0.7.0. 30% of RAM used. Works fine probably, but Private bytes...? |
I do not understand what people expect the RAM usage to be with 5000 torrents. |
What do you expect it to be? |
@summerqb, well, now i'm testing v4.4.5 Qt6 libtorrent 2.0.7.0 and i don't have any problems with RAM. 350MB usage with 1024MB Working set limit, and 21% usage of total RAM with no "Work around application stuttering on Windows". |
Just curious, does it mean 2.6k active (actually downloading and/or seeding) torrents? I'd assume there is a difference in system resources (i.e. CPU, RAM) between active vs stalled torrents. |
Uh, this is µTorrent 2.2.1 with 2500 and ~20TB seeding at 20mbps. Takes 14 seconds to load. Has never bogged down anything: I've always found it odd that so many people seem to think that torrenting is some high resource activity that requires a dedicated modern server, when µTorrent is basically invisible on a Pentium 3. |
I don't get it either. They are the same people who recommend a Raspi for torrenting thousands of files which is already done just fine with other clients. The issue is that libtorrent still hasn't become as stable as uTorrent. libtorrent has so many memory leaks that people just assume torrenting even just hundreds of torrents takes several GBs of memory. |
A lot of people don't understand the meaning of the term memory leak at all, so they call it any large memory consumption. |
I wonder why so many people are switching from such wonderful piece of software to an inferior client like qBt. I also wonder why they even bother to comment here 😁 |
Freetardism is a weird religion. It motivates those caught in its warped ideology to proselytize 24/7 for software based not on any analysis of quality, but merely on the legal licensing scheme it is released under. I'm not sure how people manage to get mentally trapped in such a silly bubble as Freetardism. It seems to me that just an ounce of pragmatism is all that is required to pierce the surface film and see the bubble for what it is. But it seems like the common person has an inordinate desire to belong to a group, causing all lines of intellectual inquiry to be corrupted and coopted into curved lines in the name of fulfilling said desire. I prefer straight lines. They align with my autistic desire to be objectively correct. They often lie in a messy heap, but there's an underlying, indescribable beauty to it. |
Maybe they want to simply point out that qBit is actually far from stable and that uTorrent, despite its bad reputation, remains a stable, low-resource torrent client that is still a benchmark that qBittorrent (more accurately libtorrent) still needs much work to meet or exceed. |
Your use case certainly isn't that of an average person's use case. That said, you're more than welcome to report bugs on qbt, help test and possibly provide fixes. |
To be fair, ranting about the other issues that libtorrent 2.x had finally made you guys decide to (rightfully) go back to libtorrent 1.2.x by default so user rants do actually sometimes get them somewhere that is beneficial to the userbase. Ignoring what users say is what actually gets a project nowhere, since this project is for end users including yourself, after all. |
The problem pointed out by FiTADiNE is more of a virtual memory leak than a physical memory leak. And I've also noted that physical memory usage by qBT's cache was ~30% higher than the cache size was set to, suggesting very poor memory use in indexing the cache and/or physical memory allocations for the cache larger than the cache's actual usage. |
|
Is your contention that this is not a virtual memory leak or that my terminology is incorrect? ...Because it helps to clearly define the problem, if there is one, before continuing! |
My contention that "A lot of people don't understand the meaning of the term memory leak at all". For them "high memory consumption" is equal to "memory leak" which is incorrect. "Memory leak" is a strictly defined problem. And it cannot be identified based only on symptoms in the form of high memory consumption (it may not cause such symptoms at all, while the program's error-free operation may). By using this term, you seem to be claiming that the cause has already been identified and it lies precisely in a "memory leak", and not in some other problem. |
I claimed the problem the initial poster is reporting is a virtual memory leak NOT a standard physical memory leak or high physical memory usage. I mentioned my earlier report of somewhat-higher-than-expected physical memory usage caused by qBT's file cache using 30% more physical memory than the max size of the cache...which is a side issue but perhaps related, since such things do increase virtual memory usage as well. |
As for the "virtual" memory leak, it is generally incorrect to use "virtual" in this context (when we are talking about an application program, considering it from the inside). Virtual memory is exactly what is available to the application program, it does not know anything about physical memory at all (in the sense that it does not use physical memory directly). It is the OS that decides which pages of the virtual memory of a process reside in physical memory at a given time. |
Would triggering Windows bluescreens suffice? |
I have never seen people think of those as the same thing. When people report this issue, they know it is a specific problem. They do not think that qBittorrent uses too much memory by its nature and that memory consumption should be lowered. They are saying that qBittorrent suffers from memory leaks and they should be investigated and fixed. |
That's exactly what I'm talking about. You are confusing "the cause of the disease with its symptoms". |
Inspecting the code is the only way to find the exact cause of a memory leak, but the symptoms of memory leaks get spotted all the time by people who report most or even all their RAM being used for no reason by an exe. It is strange that people seem to think that it is normal for a torrent client to require up to 32GB of RAM for a few thousand torrents when other clients seem to do similar loads with much less than 32GB of RAM. |
There may be some kind of problem or even several problems behind this (of course, there may be a memory leak among them, but you will not determine this from the outside).
https://en.m.wikipedia.org/wiki/Memory_leak
Just for fun, I could add a couple of real memory leaks to the qBittorrent code, and you wouldn't even notice it. As for the problem of high memory consumption, it is important first of all to define the boundaries of this very problem. And it's damn hard to do in an Issue like this, where a lot of contradictory information is mixed up, several versions of qBittorrent are mentioned, and most importantly different branches of libtorrent, which have fundamental differences in the disk I/O subsystem, which has a direct impact on memory consumption. |
And your code could be "bulletproof" levels of correct and the compiler can still make a mess of it too, with runtime optimizations. Incidentally, the 2 GB virtual memory crash with qBT 32bit Windows versions I found years ago...supposedly didn't happen when run on a VM. ...didn't make that problem any less real or not caused by qBitTorrent. |
You can do it yourself if you want. Your prejudice that it is a "memory leak" confuses everyone, distracting from the search for more likely causes. |
I called it a virtual memory leak. |
Can confirm, this is a relatively recent issue. I updated 4.5.0 after delaying a few versions (prolly 4.3.6 was what i was on), and while the exe itself doesn't show a lot of usage, i can come back to something like 15-25gb of memory used, more importantly DEFINITELY using windows swap file by that point, making the entire system super stuttery and sluggish. All of this goes back to normal, dropping to regular ram usage, after closing down qbittorent. Had set disk cache to auto -1 with DiskOS use on, set it to 4096 right now, will report in if that changes anything. All i'm seeing is that qbittorent now shows the increased ram usage in the exe to what i set as Disk Cache, instead of the 1gb or something it showed before. |
@sserdda-liamE couldn't be more correct. I genuinely cannot comprehend how this excuse of a program is still around. it has the same painfully annoying issues since ages ago that keep being ignored by everyone involved in qbit. and then you have insufferable people like glassez that instead of helping will close issues and tell you to shut up. what's wrong with these guys? it can only be understood as pure insanity at this point. but that's not new. people keep reinventing the wheel in here, but instead of actually making a better wheel, they'll create a square, sandpaper-covered piece of solid tungsten that is outperformed by 10 years old software and pretend it is all right with it. |
We won't be able to pinpoint the cause of this until #8664 is implemented. We need to make this issue a priority for Windows users. We need to be able to install qBittorrent-nox as a headless, barebones service on Windows so we can see if the headless version of qBittorrent is responsible or the full desktop version of qBittorrent is responsible for the excessive RAM usage a lot of people see. I very much suspect that qBittorrent-nox running as a service by itself won't have the same excessive RAM usage issue on Windows machines. Transmission does this on Windows by installing a headless version of Transmission called "transmission-daemon" as a background service on Windows and qBittorrent should do the same with -nox. |
@Pentaphon Excessive RAM usage is caused by disk cache (which is actually a good thing). |
If that were true, why doesn't every torrent client or program use more than 1 GB of your available ram? |
@Pentaphon rtorrent (without user pre-defined settings) can use more than 1.4 GB of RAM on Linux. The rtorrent developers are no fool. The are smart, that's why they do it like that. Without disk cache, your disk will be dead earlier than you expected. |
qBittorrent & operating system versions
qBittorrent: v4.4.5 x64
OS: Windows 10 x64 21H2 10.0.19044
Qt: 6.3.0
Libtorrent: 1.2.17.0
32 GB RAM
What is the problem?
Insane memory leak. 5k torrents. In previous versions there was excessive consumption and chrome/telegram/media(vids, streams) crashes, even with a memory usage limit.
Steps to reproduce
Additional context
No memory leak with all seeding torrents turned off.
Log(s) & preferences file(s)
No response
The text was updated successfully, but these errors were encountered: