[
https://issues.apache.org/jira/browse/TS-1674?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13583112#comment-13583112
]
Uri Shachar commented on TS-1674:
---------------------------------
James -- You'd win your bet.
I did the legwork on this and got the following results:
1) Switching to using global atomic variables *improves* performance by ~0.5%
in ATS without plugins
2) In ATS with a simple plugin that does 20 increments/decrements of stat
variables in 4 different hookpoints (80 calls total per transaction) I see a
~0.9% performance *degradation*.
--> Once there are a lot of counters the memory barriers/collisions start to
take a heavy toll....
I'll attach a patch for posterity, but considering these results I wouldn't
recommend integrating it :-)
> TSStatIntDecrement is broken
> ----------------------------
>
> Key: TS-1674
> URL: https://issues.apache.org/jira/browse/TS-1674
> Project: Traffic Server
> Issue Type: Bug
> Components: TS API
> Reporter: Brian Geffon
> Assignee: Brian Geffon
> Fix For: 3.3.1
>
>
> ATS keeps a thread-local copy of the stat value and aggregates it
> periodically and on demand when stats are being collected. However the
> decrement function doesn't let a value go negative. So in a thread that has
> not incremented this stat previously, the decrement call "fails". This
> negative value check is logically flawed as it doesn't account for the
> per-thread distribution of the stats.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira