You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, running sample apps with over 100 connections in a 3-node cluster is bottlenecked by all connections hitting the yb-master to preload their local caches.
Same issue can be observed on a local cluster when using enough connections.
To replicate:
Start cluster
./bin/yb-ctl destroy; ./bin/yb-ctl create
Run sample apps with large number of threads e.g. 99 (should see no ops for quite a while)
0 [main] INFO com.yugabyte.sample.Main - Starting sample app...
26 [main] INFO com.yugabyte.sample.common.CmdLineOpts - Using a randomly generated UUID : 4d852c5d-af09-44cf-b718-af6b834169d7
37 [main] INFO com.yugabyte.sample.common.CmdLineOpts - App: SqlInserts
37 [main] INFO com.yugabyte.sample.common.CmdLineOpts - Run time (seconds): -1
37 [main] INFO com.yugabyte.sample.common.CmdLineOpts - Adding node: 127.0.0.1:5433
38 [main] INFO com.yugabyte.sample.common.CmdLineOpts - Num reader threads: 0, num writer threads: 99
38 [main] INFO com.yugabyte.sample.common.CmdLineOpts - Num unique keys to insert: 1000000000
38 [main] INFO com.yugabyte.sample.common.CmdLineOpts - Num keys to update: -1000000001
38 [main] INFO com.yugabyte.sample.common.CmdLineOpts - Num keys to read: -1
38 [main] INFO com.yugabyte.sample.common.CmdLineOpts - Value size: 0
38 [main] INFO com.yugabyte.sample.common.CmdLineOpts - Restrict values to ASCII strings: false
38 [main] INFO com.yugabyte.sample.common.CmdLineOpts - Perform sanity check at end of app run: false
38 [main] INFO com.yugabyte.sample.common.CmdLineOpts - Table TTL (secs): -1
38 [main] INFO com.yugabyte.sample.common.CmdLineOpts - Local reads: false
38 [main] INFO com.yugabyte.sample.common.CmdLineOpts - Read only load: false
1088 [main] INFO com.yugabyte.sample.apps.SqlInserts - Dropping any table(s) left from previous runs if any
5245 [main] INFO com.yugabyte.sample.apps.SqlInserts - Created table: postgresqlkeyvalue
10251 [Thread-1] INFO com.yugabyte.sample.common.metrics.MetricsTracker - Read: 0.00 ops/sec (0.00 ms/op), 0 total ops | Write: 0.00 ops/sec (0.00 ms/op), 0 total ops | Uptime: 5006 ms |
15253 [Thread-1] INFO com.yugabyte.sample.common.metrics.MetricsTracker - Read: 0.00 ops/sec (0.00 ms/op), 0 total ops | Write: 0.00 ops/sec (0.00 ms/op), 0 total ops | Uptime: 10008 ms |
20257 [Thread-1] INFO com.yugabyte.sample.common.metrics.MetricsTracker - Read: 0.00 ops/sec (0.00 ms/op), 0 total ops | Write: 0.00 ops/sec (0.00 ms/op), 0 total ops | Uptime: 15012 ms |
25260 [Thread-1] INFO com.yugabyte.sample.common.metrics.MetricsTracker - Read: 0.00 ops/sec (0.00 ms/op), 0 total ops | Write: 0.00 ops/sec (0.00 ms/op), 0 total ops | Uptime: 20015 ms |
The text was updated successfully, but these errors were encountered:
Summary:
- Use the relcache file to store relation cache data, add ysql catalog version to
detect (and clean up) old (no longer valid) files.
- No longer preload catcache (only relcache) for backend connections except during
initdb which makes heavy use of various relations and builtins.
- No longer increment catalog version for inserts, only for updates/deletes. Since we don't do
negative caching, inserts (e.g. from CREATE TABLE) do not invalidate the cache, only
updates/deletes (e.g. ALTER or DROP TABLE).
- Fix a cache refrence leak bug and clean up the logic for retry and cache-refresh due to
catalog version mismatches.
Test Plan:
jenkins, TestPgCacheConsistency, sample apps with high number of connections:
java -jar ./target/yb-sample-apps.jar --workload SqlInserts --nodes 127.0.0.1:5433 --num_threads_write 99 --num_threads_read 0 --num_unique_keys 1000000000
Reviewers: mikhail, robert
Reviewed By: robert
Subscribers: yql, bogdan
Differential Revision: https://phabricator.dev.yugabyte.com/D6412
Currently, running sample apps with over
100
connections in a3
-node cluster is bottlenecked by all connections hitting the yb-master to preload their local caches.Same issue can be observed on a local cluster when using enough connections.
To replicate:
The text was updated successfully, but these errors were encountered: