try to release idle connections to DB, relieve database

Review Request #121120 - Created Nov. 16, 2014 and submitted

Information
Panos Christeas
akonadi
1.13
Reviewers
akonadi
dvratil

For Postgres, each DB client connection corresponds to a process
being spawn and kept alive. May even mean some SHM allocated for
it, on pre-9.3 versions of postgres.
On a system (desktop) with many akonadi resources, we may end up
occupying most/all available Postgres backends just keeping idle
agents.
This patch tries to address that, by releasing the DB connection
for those idle agents. This comes to the expense of some wake-up
latency (connect, setup db and prepare queries again). It is not
limited to QPSQL DBs yet, as to explore its effects on the other
storage engines.

Note that I had to change the DataStore::database() API from a
const to a regular method, because it would wake-up a connection.

Ran for 2 days, several resources.

Issues

  • 3
  • 8
  • 2
  • 13
Description From Last Updated
I don't think this is necessary. Daniel Vrátil Daniel Vrátil
Remove, please. Daniel Vrátil Daniel Vrátil
This will force-open a DB connection even on connections that don't need it, let's try to avoid that. Either we ... Daniel Vrátil Daniel Vrátil
Panos Christeas
Panos Christeas
Daniel Vrátil
Daniel Vrátil
Panos Christeas
Review request changed

Status: Closed (submitted)

Change Summary:

Submitted with commit 289c775d00e0ea70815664db47538ab80957823b by Dan Vrátil on behalf of P. Christeas to branch Applications/15.12.
Loading...