Bacula-users

Re: [Bacula-users] 2.2.8 inserting attributes taking a long time

2008-08-28 23:02:50
Subject: Re: [Bacula-users] 2.2.8 inserting attributes taking a long time
From: Dan Langille <dan AT langille DOT org>
To: Michael Galloway <mgx AT ornl DOT gov>
Date: Thu, 28 Aug 2008 23:02:13 -0400
Michael Galloway wrote:
> good day all, i've got a biggish job (1.6TB/13M files) that took a few days 
> to run, now its
> spent a couple of days working on inserting attributes into the db (postgres 
> 8.2.5), this 
> has caused a lot of jobs to queue up and i'm wondering if there is any way to 
> get a feel for
> how much time it will take to get this finished. postgres is running but not 
> very hard:
> 
> top - 17:10:07 up 27 days,  8:49,  1 user,  load average: 3.40, 3.29, 3.32
> Tasks: 188 total,   1 running, 187 sleeping,   0 stopped,   0 zombie
> Cpu0  :  0.0%us,  0.7%sy,  0.0%ni, 67.2%id, 31.5%wa,  0.3%hi,  0.3%si,  0.0%st
> Cpu1  :  0.0%us,  1.0%sy,  0.0%ni, 52.6%id, 45.4%wa,  0.0%hi,  1.0%si,  0.0%st
> Cpu2  :  3.3%us,  2.0%sy,  0.0%ni, 78.5%id, 16.2%wa,  0.0%hi,  0.0%si,  0.0%st
> Cpu3  :  0.0%us,  0.7%sy,  0.0%ni, 99.3%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
> Mem:   8183128k total,  8051916k used,   131212k free,    94844k buffers
> Swap: 16771840k total,      200k used, 16771640k free,  7478184k cached
> 
>   PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND          
>                                                                
> 21484 postgres  16   0  139m  66m  35m S    5  0.8  86:42.38 postgres         
>                                                                
> 
> 
> been running if full since the 24th:
> 
>   1414 Full    birch.2008-08-24_00.05.44 Dir inserting Attributes
> 
> getting a bit impatient here :-\

Be sure BATCH INSERT (a Bacula feature) is enabled.  This is enabled if 
and only if you set --enable-thread-safety for the PostgreSQL client.

http://www.bacula.org/en/rel-manual/Installi_Configur_PostgreS.html#PostgreSqlChapter

 From the above:


"One way is to see if the PostgreSQL library that Bacula will be linked 
against references pthreads. This can be done with a command such as:

   nm /usr/lib/libpq.a | grep pthread_mutex_lock

The above command should print a line that looks like:

          U pthread_mutex_lock

if does, then everything is OK. If it prints nothing, do not enable 
batch inserts when building Bacula."

side issue: I hope your database is SQL_ASCII, not UTF-8.

e.g.

$ psql -l | grep bacula
  bacula                | bacula     | SQL_ASCII

Otherwise, you may encounter other problems later.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users