You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@trafficserver.apache.org by "Raghav Jeyaraman (JIRA)" <ji...@apache.org> on 2010/02/19 21:58:27 UTC
[jira] Commented: (TS-157) Improve stats API
[ https://issues.apache.org/jira/browse/TS-157?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12835947#action_12835947 ]
Raghav Jeyaraman commented on TS-157:
-------------------------------------
We did a few prototype implementations and measured their performance.
Hardware used for testing:
Processors: 2 x Xeon L5320 1.86GHz (8 cores)
Memory: 7.8GB
Methodology:
We wrote a plugin in which the stats were registered in the INKPluginInit function. The plugin had code to increment all stats on INK_HTTP_CACHE_LOOKUP_COMPLETE_HOOK, which essentially means that all the stats were incremented for any request that came in.
Mean response times for each of the tests follow.
hash_map + INKMutex :
Global hash map for all stats, protected by INKMutex.
2500 stats, 1000 parallel fetches - 29520.7ms
50 stats, 1000 parallel fetches - 1051.58ms
Per thread map<string, int>:
2500 stats, 1000 parallel fetches - 3666.67ms
Per thread hash_map<string, int>:
2500 stats, 1000 parallel fetches - 1091.36ms
Per thread vector<int> with a map<int, string>:
On registering a stat, position in the vector at which the stat is held is returned. This is used for subsequent increments on the stat.
A map maintains a mapping from the position of the stat to the stat name which was used for registering it.
2500 stats, 1000 parallel fetches - 420.941ms
225 stats, 1000 parallel fetches - 184.773ms
Current INKStat:
250 stats, 1000 parallel fetches - 420.941ms
225 stats, 1000 parallel fetches - 184.773ms
>From the above numbers, the vector based implementation outperforms the current INKStat implementation.
Collection of stats from all the threads happens in a separate continuation, just like the current implementation.
Thanks,
--raghav
> Improve stats API
> -----------------
>
> Key: TS-157
> URL: https://issues.apache.org/jira/browse/TS-157
> Project: Traffic Server
> Issue Type: Improvement
> Components: Stats
> Reporter: Raghav Jeyaraman
> Assignee: Raghav Jeyaraman
>
> As it stands today, traffic server limits the number of stats that can be registered to 250.
> The code must be changed to allow a large number of stats (100000) to be tracked.
> The API for adding coupled stats is cumbersome to use and as a result, has very few users. Current stats API must be cleaned up or gotten rid of.
> Thanks,
> --raghav
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.