Details
Description
Motivation
Contantion is the main issue with one-node performance. The hybrid clock is a natural contraction in our algorithm. Hence, reducing the number of HybridClock#now invocations increases performance.
hybridClock:nowLong-:java.lang.Exception: at org.apache.ignite.internal.util.IgniteUtils.dumpStack(IgniteUtils.java:682) at org.apache.ignite.internal.hlc.HybridClockImpl.nowLong(HybridClockImpl.java:76) at org.apache.ignite.internal.hlc.HybridClockImpl.now(HybridClockImpl.java:108) at org.apache.ignite.internal.hlc.ClockServiceImpl.now(ClockServiceImpl.java:43) at org.apache.ignite.internal.table.distributed.schema.SchemaVersionsImpl.schemaVersionAtNow(SchemaVersionsImpl.java:86) at org.apache.ignite.internal.table.AbstractTableView.withSchemaSync(AbstractTableView.java:139) at org.apache.ignite.internal.table.AbstractTableView.withSchemaSync(AbstractTableView.java:134) at org.apache.ignite.internal.table.AbstractTableView.doOperation(AbstractTableView.java:112) at org.apache.ignite.internal.table.KeyValueBinaryViewImpl.getAsync(KeyValueBinaryViewImpl.java:117) at org.apache.ignite.internal.table.KeyValueBinaryViewImpl.get(KeyValueBinaryViewImpl.java:104) at org.apache.ignite.internal.table.KeyValueBinaryViewImpl.get(KeyValueBinaryViewImpl.java:74) at org.apache.ignite.internal.table.PublicApiThreadingKeyValueView.lambda$get$0(PublicApiThreadingKeyValueView.java:57) at org.apache.ignite.internal.thread.PublicApiThreading.executeWithRole(PublicApiThreading.java:144) at org.apache.ignite.internal.thread.PublicApiThreading.execUserSyncOperation(PublicApiThreading.java:102) at org.apache.ignite.internal.table.PublicApiThreadingViewBase.executeSyncOp(PublicApiThreadingViewBase.java:107) at org.apache.ignite.internal.table.PublicApiThreadingKeyValueView.get(PublicApiThreadingKeyValueView.java:57) at org.apache.ignite.internal.restart.RestartProofKeyValueView.lambda$get$0(RestartProofKeyValueView.java:58) at org.apache.ignite.internal.restart.RestartProofApiObject.lambda$attached$0(RestartProofApiObject.java:46) at org.apache.ignite.internal.restart.IgniteAttachmentLock.attached(IgniteAttachmentLock.java:59) at org.apache.ignite.internal.restart.RestartProofApiObject.attached(RestartProofApiObject.java:46) at org.apache.ignite.internal.restart.RestartProofKeyValueView.get(RestartProofKeyValueView.java:58) at org.apache.ignite.internal.benchmark.SelectBenchmark.kvGet(SelectBenchmark.java:175) at org.apache.ignite.internal.benchmark.jmh_generated.SelectBenchmark_kvGet_jmhTest.kvGet_avgt_jmhStub(SelectBenchmark_kvGet_jmhTest.java:238) at org.apache.ignite.internal.benchmark.jmh_generated.SelectBenchmark_kvGet_jmhTest.kvGet_AverageTime(SelectBenchmark_kvGet_jmhTest.java:177) at jdk.internal.reflect.GeneratedMethodAccessor20.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.openjdk.jmh.runner.BenchmarkHandler$BenchmarkTask.call(BenchmarkHandler.java:527) at org.openjdk.jmh.runner.BenchmarkHandler$BenchmarkTask.call(BenchmarkHandler.java:504) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:829)
Here the call stack to determine scema version in case of an implicit transaction. But if the transaction is alredy created for at this time, we can use a transaction start time.
Implementation notes
- In the case above we ought to create an implicit transaction instance before the palce. (it could be difficult, but it will be need in the future)
- We can use a fast, not continuous method of getting timestamps based on current astronomical time. It coud be the method HybridClockSyncImpl#currentTime.
Definition of done
Do not use hybrid time in the schemaVersionAtNow method because there is no reason to capture this timestamp.
Attachments
Issue Links
- is related to
-
IGNITE-23199 Investigate GET scalability issues
- Resolved
- links to