EHC ❯ Test memory usage of the ehcache-probe
-
Task
-
Status: Closed
-
1 Critical
-
Resolution: Fixed
-
ehcache,ehcache-probe
-
-
hsingh
-
Reporter: amiller
-
November 06, 2009
-
0
-
Watchers: 0
-
January 17, 2013
-
July 14, 2010
Attachments
Description
Ensure memory consumption of the probe is within the agreed amount. The probe is meant to have a light impact.
I think we said about 1 MB.
In particular if Jetty is creating thread pools, each thread may, depending on Xss and architecture be using commonly 512KB per thread. So we are possibly way over this limit right now.
Comments
Alex Miller 2009-11-19
Mike Allen 2009-11-25
Greg & I did some very superficial analysis using my sample app and visual VM.
Results as follows. App with 1 cache manager (ie one probe), 7 caches each with 6 items. No put/get activity.
Without probe: 4 threads 500k heap
With probe: 9 threads 1.3MB heap
Note 5 threads implies ~2.5MB of additional RAM, thus total mem overhead of probe is about 3MB s desired 1MB
Himadri Singh 2009-12-21
Did basic testing found
Case 1: With ehcache-dx probe enabled
Probe Memory Usage Test starts…
========= Current Heap Stats ============= Max Memory: 66650112 bytes Total Memory: 5177344 bytes Available Memory: 5059472 bytes Increased Memory: 117872 bytes ========================================== Creating CacheManager with Ehcache Dx Probe Enabled.
========= Current Heap Stats ============= Max Memory: 66650112 bytes Total Memory: 5177344 bytes Available Memory: 4179288 bytes Increased Memory: 880184 bytes ========================================== Loading each of 6 caches with 6 elements.
========= Current Heap Stats ============= Max Memory: 66650112 bytes Total Memory: 5177344 bytes Available Memory: 4171344 bytes Increased Memory: 7944 bytes ==========================================
Case 2: Without ehcache-dx probe
Probe Memory Usage Test starts…
========= Current Heap Stats ============= Max Memory: 66650112 bytes Total Memory: 5177344 bytes Available Memory: 5059472 bytes Increased Memory: 117872 bytes ========================================== Creating CacheManager w/o probe.
========= Current Heap Stats ============= Max Memory: 66650112 bytes Total Memory: 5177344 bytes Available Memory: 4621072 bytes Increased Memory: 438400 bytes ========================================== Loading each of 6 caches with 6 elements.
========= Current Heap Stats ============= Max Memory: 66650112 bytes Total Memory: 5177344 bytes Available Memory: 4614008 bytes Increased Memory: 7064 bytes ==========================================
Diff in Memory Usage: 441784 (441 KB)
Himadri Singh 2010-01-07
Will wait for the updated version of ehcache-dx.
Fiona OShea 2010-03-11
Updating all “Brisbane - Target” to “terracotta target =Unknown”
Himadri Singh 2010-07-14
Attached ehcache-dx-memory project which
Creates 5 Cache Managers w/ 5 Caches each
Populates caches w/ 1000 elements
Can be run w/ & w/o Ehcache DX Monitor using -Dehcachedx.enabled=true
Used Yourkit Profile to compare the Memory footprint.
Case | Diff in Memory | |||
Ehcache Dx Enabled \(w/ few operations on the console) vs Ehcache Dx Disabled | 1,143,472 bytes |
Also tested the memory increase on doing operations on Dx console and just enabling the probe.
Yourkit Snapshots: http://fileserver.terracotta.lan/terra/qa/ehcacheDxMemory-EHC-494/EhcacheDxSnapshots.zip
I guess you’ve been doing this already so I’ll assign it to you…