james-project icon indicating copy to clipboard operation
james-project copied to clipboard

JAMES-2586 Introduce Pool PostgreExecutor

Open vttranlina opened this issue 1 year ago • 8 comments

Continue of https://github.com/apache/james-project/pull/1882

vttranlina avatar Dec 27 '23 09:12 vttranlina

Please do not merge this before doing bench using the connection pool everywhere / nowhere...

chibenwa avatar Dec 28 '23 21:12 chibenwa

Bench test

Pool vs No pool

image

// For easier get difference, I changed "fetchBody" to 60% (which uses PostgresBlobStorage) Pool size = 50 The "No-pool Connection (single-connection)" is better than "Pool Connection"

The sample data:

  • 12455/65000 mail has a size greater than 100KB
  • 6221/65000 mail has a size greater than 500KB

a bit surprised

vttranlina avatar Jan 02 '24 09:01 vttranlina

I will change the pool size from 50->2, and re-test again Then see the slowing come from the pool or another where

vttranlina avatar Jan 02 '24 09:01 vttranlina

Let's go for the pool implementation now, but all pool settings shall be configurable into postgres.properties :

  • TTL
  • Max size
  • Min size
  • Etc...

chibenwa avatar Jan 02 '24 09:01 chibenwa

Let's go for the pool implementation now, but all pool settings shall be configurable into postgres.properties :

  • TTL
  • Max size
  • Min size
  • Etc...

It is already in the last commit. Right now we can configure the maxIdleTime, initialSize (not minSize), and maxSize. Other property, I don't think is necessary, (or I don't sure ) https://github.com/r2dbc/r2dbc-pool

vttranlina avatar Jan 02 '24 09:01 vttranlina

Rebase master & squash fixup for easier follow

vttranlina avatar Jan 03 '24 06:01 vttranlina

Needs a rebase.

Status on this?

Arsnael avatar Jan 11 '24 02:01 Arsnael

Status on this?

IMO not a priority.

Let's work on this later.

chibenwa avatar Jan 11 '24 07:01 chibenwa