News:

Follow BoincTasks on Twitter Facebook        Visit our website here.
BoincTasks cloud login is working again

Main Menu

Memory consumption

Started by Pepo, November 25, 2009, 04:40:12 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Pepo

My BT 0.29 seems to consume some 205 MB memory (Private, Pagefile). The Peak Working set is also around 220 MB, but settled down to 8 MB, thus it possibly happened just at the startup (a couple of minutes ago).

Is such (IMO) excessive memory requirement necessary for BT?

The application has 3 computers defined, but just 1 is reachable, 2 are and will out of reach.
Among the allocated memory, the process has 3 x 53.43 MB and 3 x 10.7 MB (possibly pre-allocated) blocks of memory (in the system commit), which seem to correspond to the 3 defined computers. Are they necessary to be statically pre-allocated in their whole size and in advance?
Peter

fred

Quote from: Pepo on November 25, 2009, 04:40:12 PM
My BT 0.29 seems to consume some 205 MB memory (Private, Pagefile). The Peak Working set is also around 220 MB, but settled down to 8 MB, thus it possibly happened just at the startup (a couple of minutes ago).

Is such (IMO) excessive memory requirement necessary for BT?

The application has 3 computers defined, but just 1 is reachable, 2 are and will out of reach.
Among the allocated memory, the process has 3 x 53.43 MB and 3 x 10.7 MB (possibly pre-allocated) blocks of memory (in the system commit), which seem to correspond to the 3 defined computers. Are they necessary to be statically pre-allocated in their whole size and in advance?
It's on my list, but with computers having 4G + memory.
But I will take a look at it someday, to make the memory more dynamically. But this is the safest and fastest way.

Pepo

With just 3 defined computers (one of them was never online), my BT already consumes (since the launch, and will consume) 280 MB from pagefile (and after clicking around on my 12+3 tasks and a couple of projects for a few seconds long, needs 230 MB RAM). The largest (clients-related I believe) memory blocks were enlarged to 68.7 and 13.8 MB.

I can not imagine someone with a decent farm (20-30 hosts) to try to define them all, not to mention connect. I'm assuming an 85 MB per-host memory requirement (+ some additional 25 MB), which could limit the use to maybe 25 hosts (a 2 GB per-process limit) on a usual (pre-SP3?) WinXP process? (Nore, these 4+ GB memory are available just to 64bit Windows processes. But still, these are loads of locked (and wasted?) memory!)

Maybe you could at least try to postpone the per-client memory allocation until a particular client is successfully communicated? At the time I've been using 5 clients (but not all online and accessible at a moment), I could be able to regularly restart my client manager on my travelling notebook (to lower the memory consumption from a half gig :o), but not willing to regularly (de)register them :(
Peter

fred

Quote from: Pepo on January 12, 2010, 01:49:42 AM
With just 3 defined computers (one of them was never online), my BT already consumes (since the launch, and will consume) 280 MB from pagefile (and after clicking around on my 12+3 tasks and a couple of projects for a few seconds long, needs 230 MB RAM). The largest (clients-related I believe) memory blocks were enlarged to 68.7 and 13.8 MB.

I can not imagine someone with a decent farm (20-30 hosts) to try to define them all, not to mention connect. I'm assuming an 85 MB per-host memory requirement (+ some additional 25 MB), which could limit the use to maybe 25 hosts (a 2 GB per-process limit) on a usual (pre-SP3?) WinXP process? (Nore, these 4+ GB memory are available just to 64bit Windows processes. But still, these are loads of locked (and wasted?) memory!)

Maybe you could at least try to postpone the per-client memory allocation until a particular client is successfully communicated? At the time I've been using 5 clients (but not all online and accessible at a moment), I could be able to regularly restart my client manager on my travelling notebook (to lower the memory consumption from a half gig :o), but not willing to regularly (de)register them :(
When you have 20 computers attached you will hardly need more memory than with 2 computers. You will certainly not reach a memory limit. ;D
64 bit Windows uses a lot more, but on those systems you need to install a lot more memory anyway, it's the 64 bit way to consume more memory.
But it's on my mind, I know how to reduce it, but as I'm planning a vacation, I don't want to do any daring things.
Another point is that memory gets cheaper and cheaper bit wise.

fred

#4
I made some changes, in some of the largest arrays. They are now dynamically created.
But that involved hundreds of changes from pointer to pointer to pointer.  ;D
Hopefully that doesn't break things.

I think that did enough:

110.000 V 0.37
26.000 V 0.38 Filtering all.
34.000 V 0.38 Filtering on waiting to run off.

Open 3 computers with 6468 Tasks. All in combined mode.

So an overall decrease in memory use of more than 2/3, I think that's nice. ;D
I think the memory use is in the acceptable range now.

Pepo

Quote from: fred on January 12, 2010, 02:06:57 PM
I made some changes, in some of the largest arrays. They are now dynamically created.
That sounds very promising :)
QuoteBut that involved hundreds of changes from pointer to pointer to pointer.  ;D
Hopefully that doesn't break things.
I keep my fingers crossed. (It's pretty tough to type this way :P)

Quote110.000 V 0.37
26.000 V 0.38 Filtering all.
34.000 V 0.38 Filtering on waiting to run off.
...well, I see I'm a bit off with my 0.35, I've somehow missed to try a couple of announced updates ::)
QuoteOpen 3 computers with 6468 Tasks. All in combined mode.
I've not had more than some 15 tasks recently, but my tests mostly depended on the number of (connected) clients. Maybe you could post two figures of memory consumption - with one single-client window (having just a couple of tasks) and with one single-client window (having a loads of tasks) to get the idea.
QuoteSo an overall decrease in memory use of more than 2/3, I think that's nice. ;D
I think the memory use is in the acceptable range now.
That sounds even more promising :)

I'm now a bit late with my test, but I've found out that I was a bit wrong with my assumptions. The number of allocated (68.7MB + 13.8MB) memory blocks seems to depend just on the number of opened windows (regardless whether there is or is not yet or was a connection to a client) and as I've had 2 (out of 3) clients active and 2 single-client and 1 combined window opened, the allocation was 3 x 82.5MB. So even with 20 clients in one combined window, the allocation would probably stay at 1 x 82.5MB? (I've just 1 active client ATM, but tried to connect it simultaneously with 3 different client definitions, it seemed to behave so.)

So, I'm looking forward to 0.38, and please sorry for continuously bombarding you ::)
Peter

fred

No problem pushing, me.. This will push me over the edge and start trying.

For a lot of allocations it doesn't matter if there is a connection or not.
And the combined mode is more efficient.
For the non combined mode every window will consume about the same.

But I expect an overall reduction of 2/3. The reduction will decrease with the amount of lines shown. After 80.000 lines, I expect a break even point. ;D But thats way too much for me to test.

I suggest you try moving over to the combined mode, that's the best tested version with most of the features.

Something else did you take a look at the translation page? ::)

Pepo

Quote from: fred on January 12, 2010, 03:54:27 PM
...After 80.000 lines, I expect a break even point. ;D But thats way too much for me to test.
That's literally overkill.

QuoteI suggest you try moving over to the combined mode, that's the best tested version with most of the features.
I'm using it, as the single-client windows do not display e.g. throttle state and temperature.
But I'm also using a single-client window. When I loose connnection to a remote client, it somehow disappears from the combined-mode window, but the last state remains in the single-client window. (Hard to tell which behavior is better or preferable. It depends.)

QuoteSomething else did you take a look at the translation page? ::)
I'm observing the conversations. As the first strings for translation became available, I've had no spare time for it. It will happen... 8)
Peter

fred

#8
On Win 7 64 with only the localhost attached and 29 Tasks.

V 0.37 106.200
V 0.38 23.800

The single or combined mode are about the same.


Pepo

Nice. I think it was worth the 100 pointers ;)
Peter