Hello,

On 4/23/2007 9:20 PM, Per Andreas Buer wrote:
> Hi.
> 
> I've got a director which at the moment is using ~4GB of memory (~30 
> clients). While I've got no problem with Bacula using this much memory 
> (the server got 12GB of memory) I wonder if this is an indication of a 
> leak somewhere and if I should start debugging this. Bacula has mostly 
> been doing backups but a few restores of a server with 2M files might 
> have eaten a bit of memory.
> 
> I'm running 2.0.3 on Ubuntu Dapper / amd64.

When you terminate the DIR, it should print a lsit of allocated memory 
blocks. These might help analyzing why this much meory is used. (This 
only works if your Bacula is linked with smartalloc.)

In my experience, the DIR tends to need lots of memory, but doesn't 
track much of it in the smartalloc list.

I *assume* that some libraries it uses need all this memory - the MySQL 
client libraries seem most likely to need lots and lots of memory.

Unfortunately, I know of no way to track the memory usage except for 
using valgrind, which is not really an option in a production environment.

But, in my experience, the memory is freed once no jobs run. For 
reference: I run a server with 128 MB of RAM (IIRC) plus about 512 MB 
swap and that does five jobs in parallel. When I keep these jobs waiting 
for a long time (for example, because the need new volumes) I can crash 
the machine because the memory runs out.

On a clients system, for example, there are 512 (+swap) MB, and running 
10-15 jobs in parallel works fine, but >30 jobs result in the kernel 
running out of memory, too.

The memory is used even if the majority of the jobs are only waiting for 
the SD to becoma available.

Short answer: If you can debug this I'd be quite interested in your 
results. But you can easily work around the problem (if it is one for 
you) by stretching the schedules over a longer time. If you want to 
debug this, I'd recommend to use valgrind (perhaps strace can also 
help), but first see what the smartalloc report reveals.

Arno

> 
> Regards,
> 
> Per.
> 
> 
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Bacula-users mailing list
> Bacula-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bacula-users

-- 
IT-Service Lehmann                    [EMAIL PROTECTED]
Arno Lehmann                  http://www.its-lehmann.de

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to