Hi,

Are you sure it is only the first write?
I’m not aware of any lazy initialization there, so I wouldn’t expect the first 
write to be slow.

Which version do you use?
And what is the performance difference of the first transaction compared to the 
second?

I have two ideas why it may work slowly on the first write
1) WAL roll-over – every time you start to write to a new WAL segment it will 
initialize it first; perhaps it is done synchronously for the first segment.
If it is the reason then the next roll-over will also be slow and cause 
timeout. Try to check if there are periodic slow transactions.
2) Usual JVM warmup – JVM may need to load some classes, JIT simple methods, 
etc.
I guess -Xcompile would help with JIT here - it will force JVM to JIT methods 
before the first execution.
Although it seems unlikely that the performance difference would be so big that 
it causes timeouts.

Thanks,
Stan

From: Andrey Davydov
Sent: 12 декабря 2018 г. 19:36
To: user@ignite.apache.org
Subject: First write to new cache on new cluster.

Hello all,

The first write transaction on empty cluster with persistence enabled takes 
some seconds. After that, cluster works fast. It seems it is because of WAL 
file creation and so on. But I can’t setup real transaction timeout in 
configuration, because it cause exception on the first operation.

I can do dummy transaction to force initialization. But it seems not best 
practice.

If there is convenient way to force persistence initialization?

Andrey.


Reply via email to