Cache Memory Usage #776
-
Hello Anyone, About how much memory does the included Caffeine cache use per cached user agent? I did some rough estimations using a heap dump and I calculated about 1.7 kB per user agent. Does that sound right? Thanks, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I haven't tested this and this sounds about right. The cache holds a complete parsed UserAgent which is all keys and values of both the input and output + overhead for the classes and indexing. I took two of the testcases from the yaml to do a quick estimate just based on the textual content that must be stored:
Add overhead of the Java classes to that and I expect the caching to need something in the 1-2KiB per record range. |
Beta Was this translation helpful? Give feedback.
I haven't tested this and this sounds about right.
The cache holds a complete parsed UserAgent which is all keys and values of both the input and output + overhead for the classes and indexing.
I took two of the testcases from the yaml to do a quick estimate just based on the textual content that must be stored:
Add overhead of the Java classes to that and I expect the caching to need something in the 1-2KiB per record range.
So your 1.7KiB sounds right to me.