[
https://issues.apache.org/jira/browse/IGNITE-3513?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15395278#comment-15395278
]
Eduard Shangareev edited comment on IGNITE-3513 at 7/27/16 9:05 AM:
--------------------------------------------------------------------
Night benchmark run (sleep duration - 10ms, numbers - ops/ms).
Result for *1* ExpriryPolicy:
|Thread|Sleep|Wait|Park|
|2|161.508 ± 1.308|170.009 ± 2.791|163.672 ± 2.856|
|4|263.062 ± 3.680|274.452 ± 3.191|263.886 ± 5.375|
|8|328.178 ± 4.100|378.947 ± 24.256|327.398 ± 8.166|
|16|331.939 ± 3.376|367.014 ± 6.759|324.264 ± 30.517|
|32|340.865 ± 3.612|370.433 ± 2.863|341.507 ± 4.826|
Result for *2* ExpriryPolicy:
|Thread|Sleep|Wait|Park|
|2|167.343 ± 2.423|148.122 ± 2.108|141.759 ± 4.842|
|4|260.494 ± 2.344|251.488 ± 5.418|221.650 ± 1.996|
|8|333.675 ± 3.024|325.235 ± 3.193|330.027 ± 3.249|
|16|336.898 ± 4.852|344.233 ± 4.319|335.587 ± 3.450|
|32|346.102 ± 3.045|351.342 ± 3.727|339.795 ± 4.816|
Result for *3* ExpriryPolicy:
|Thread|Sleep|Wait|Park|
|2|163.042 ± 3.640|155.299 ± 1.977|150.011 ± 3.164|
|4|257.366 ± 3.600|256.394 ± 2.352|227.143 ± 2.704|
|8|330.468 ± 4.112|329.907 ± 24.981|318.291 ± 4.997|
|16|326.528 ± 3.263|345.385 ± 2.834|326.629 ± 3.275|
|32|336.828 ± 4.916|352.499 ± 3.689|331.759 ± 6.301|
Result for *4* ExpriryPolicy:
|Thread|Sleep|Wait|Park|
|2|165.767 ± 3.107|152.139 ± 1.882|142.256 ± 2.534|
|4|263.421 ± 3.162|249.717 ± 4.320|220.386 ± 3.418|
|8|332.505 ± 2.498|330.995 ± 4.075|319.970 ± 3.628|
|16|331.850 ± 3.934|342.258 ± 2.591|328.169 ± 3.960|
|32|342.669 ± 3.990|351.790 ± 3.482|335.425 ± 2.636|
Result for *5* ExpriryPolicy:
|Thread|Sleep|Wait|Park|
|2|161.109 ± 3.544|144.023 ± 1.787|140.389 ± 3.822|
|4|262.874 ± 4.848|252.311 ± 5.104|216.460 ± 3.625|
|8|335.351 ± 4.769|325.620 ± 3.335|326.554 ± 3.145|
|16|337.047 ± 3.524|342.082 ± 2.526|327.885 ± 13.494|
|32|337.168 ± 3.587|354.922 ± 4.035|336.269 ± 3.266|
was (Author: edshanggg):
Night benchmark run (sleep duration - 10ms).
Result for *1* ExpriryPolicy:
|Thread|Sleep|Wait|Park|
|2|161.508 ± 1.308|170.009 ± 2.791|163.672 ± 2.856|
|4|263.062 ± 3.680|274.452 ± 3.191|263.886 ± 5.375|
|8|328.178 ± 4.100|378.947 ± 24.256|327.398 ± 8.166|
|16|331.939 ± 3.376|367.014 ± 6.759|324.264 ± 30.517|
|32|340.865 ± 3.612|370.433 ± 2.863|341.507 ± 4.826|
Result for *2* ExpriryPolicy:
|Thread|Sleep|Wait|Park|
|2|167.343 ± 2.423|148.122 ± 2.108|141.759 ± 4.842|
|4|260.494 ± 2.344|251.488 ± 5.418|221.650 ± 1.996|
|8|333.675 ± 3.024|325.235 ± 3.193|330.027 ± 3.249|
|16|336.898 ± 4.852|344.233 ± 4.319|335.587 ± 3.450|
|32|346.102 ± 3.045|351.342 ± 3.727|339.795 ± 4.816|
Result for *3* ExpriryPolicy:
|Thread|Sleep|Wait|Park|
|2|163.042 ± 3.640|155.299 ± 1.977|150.011 ± 3.164|
|4|257.366 ± 3.600|256.394 ± 2.352|227.143 ± 2.704|
|8|330.468 ± 4.112|329.907 ± 24.981|318.291 ± 4.997|
|16|326.528 ± 3.263|345.385 ± 2.834|326.629 ± 3.275|
|32|336.828 ± 4.916|352.499 ± 3.689|331.759 ± 6.301|
Result for *4* ExpriryPolicy:
|Thread|Sleep|Wait|Park|
|2|165.767 ± 3.107|152.139 ± 1.882|142.256 ± 2.534|
|4|263.421 ± 3.162|249.717 ± 4.320|220.386 ± 3.418|
|8|332.505 ± 2.498|330.995 ± 4.075|319.970 ± 3.628|
|16|331.850 ± 3.934|342.258 ± 2.591|328.169 ± 3.960|
|32|342.669 ± 3.990|351.790 ± 3.482|335.425 ± 2.636|
Result for *5* ExpriryPolicy:
|Thread|Sleep|Wait|Park|
|2|161.109 ± 3.544|144.023 ± 1.787|140.389 ± 3.822|
|4|262.874 ± 4.848|252.311 ± 5.104|216.460 ± 3.625|
|8|335.351 ± 4.769|325.620 ± 3.335|326.554 ± 3.145|
|16|337.047 ± 3.524|342.082 ± 2.526|327.885 ± 13.494|
|32|337.168 ± 3.587|354.922 ± 4.035|336.269 ± 3.266|
> Cleanup worker is placed in the Thread's waiting queue using Thread.sleep
> method
> --------------------------------------------------------------------------------
>
> Key: IGNITE-3513
> URL: https://issues.apache.org/jira/browse/IGNITE-3513
> Project: Ignite
> Issue Type: Bug
> Affects Versions: 1.6
> Reporter: Denis Magda
> Assignee: Eduard Shangareev
> Fix For: 1.7
>
>
> There is a bug in current implementation of
> {{GridCacheTtlManager#CleanupWorker}}.
> Refer to the implementation's code snippet and the details below.
> {code}
> EntryWrapper first = pendingEntries.firstx();
> if (first != null) {
> long waitTime = first.expireTime - U.currentTimeMillis();
> if (waitTime > 0)
> U.sleep(waitTime);
> }
> {code}
> 1. Put first item with TTL = 1 hour. CleanupWorker will go to sleep for 1
> hour.
> 2. Put second item with TTL = 1 minute. Since
> CleanupWorker's thread sleeps now, second item will not be expired at the
> time.
> NOTE: This scenario is easily to reproducible if first and second items are
> put into cache asynchronously. If try to put them in same thread one-by-one
> expiration may work fine.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)