yuqi1129 opened a new issue, #13582: URL: https://github.com/apache/gravitino/issues/13582
## What would you like to be improved? Main `ab0785324c5cb391ae63e4501d349f4336b8d3aa` hard-codes JDBC maxIdle to 10 in `SqlSessionFactoryHelper`, while maxTotal defaults to 100. A local 64-client metalake-list workload repeatedly destroys and recreates database connections. With actual list-route warmup, three main runs had p99 207–221 ms (median 214 ms); the maxIdle=100 diagnostic had 85–207 ms (median 90 ms). Reverting to main reproduced 216 ms. Main opened [3356, 3636, 3443] physical connections per phase snapshot window, compared with [36, 4, 4] in the variant; the Connector/J initialization-query deltas were [3347, 3627, 3433] versus [32, 0, 0]. Snapshot windows include warmup and diagnostic connections. Successful throughput medians were 3,029 versus 3,412 requests/s. The isolated diagnostic variant changes only maxIdle from 10 to 100; normalized executable bytecode differs only at that constant. This demonstrates connection churn and associated overhead. Remaining first-run tail variability prevents attributing every slow request to the pool. There were no HTTP failures, and this is not an exhausted-pool or connection-leak claim. ## How should we improve? Expose idle-retention sizing and choose/document defaults consistent with expected concurrency, eviction and per-cluster DB connection budgets. Add a sustained concurrent read test measuring physical connection creation and tail latency. A blanket increase to 100 on every production node needs connection-budget review. Reproduction: two-node-capable main setup with MySQL 8.0.35, Java 17, fixed 512 MiB heap, authorization/auxiliary services disabled; create 73 metalakes and issue `GET /api/metalakes` from 32/64 keep-alive clients after a three-second list-route warmup, for 15 seconds, three rounds. Compare fresh-server A/B/A with only the maxIdle override. Capture `SHOW GLOBAL STATUS` Connections/Threads_created and performance-schema digest counts for Connector/J's server-variable initialization SELECT, plus JFR. The benchmark retains raw HTTP results, source/bytecode diffs, SQL snapshots and recordings. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
