Hi Douglas,

that looks like too many connections for 10 concurrent jobs.
Do you have spooling (Data or Attribute Spooling) enabled?
See 
http://doc.bareos.org/master/html/bareos-manual-main-reference.html#directiveDirJobSpool%20Attributes

I'd recommend at least
Spool Attributes = yes

because the DB inserts are batched then, so much more efficient.

But even without spooling, 100 DB connections for 10 concurrent jobs
seem to be too many.

Note that console (eg. bconsole or from webui) connections also cause a DB
connection each.

Regards,

Stephan

On 11/03/2016 03:58 PM, Douglas K. Rand wrote:
> I'm a little startled at how many connections Bareos makes to Postgres.
> We have currently have 88 backup jobs scheduled to start each day in the
> evening. The max current jobs that we run is 10. For this Bareos makes
> about 100 separate connections to Postgres, which seems quite high.
> 
> I've attached the results of these commands which ran just as Bareos was
> kicking off the backup schedule:
> 
> # Get all of the Postgres connections and recent commands
> psql --pset=pager=off --user=bareos --dbname=bareos \
>   --command="SELECT usename, pid, state, query FROM pg_stat_activity"
> 
> # List all connections to postgresql
> lsof -i :postgresql
> 
> List all Bareos processes and threads
> ps -axlwwH -U bareos
> 
> I've had to increase max_connections up to 150 in order to avoid Bareos
> from failing some jobs due to Postgres refusing additional connections.
> 
> From the lsof command you can see 100 established TCP connections from
> Bareos to Postgres. Even though there seems to be only 26 Bareos threads.
> 
> This is Bareos 15.2.2 on FreeBSD 10.2.
> 
> Thoughts on this behavior?
> 


-- 
  Stephan Dühr                              [email protected]
  Bareos GmbH & Co. KG                      Phone: +49 221-630693-90
  http://www.bareos.com

  Sitz der Gesellschaft: Köln | Amtsgericht Köln: HRA 29646
  Komplementär: Bareos Verwaltungs-GmbH
  Geschäftsführer: S. Dühr, M. Außendorf, J. Steffens, Philipp Storz

-- 
You received this message because you are subscribed to the Google Groups 
"bareos-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to