summaryrefslogtreecommitdiffstats
path: root/infra/it/memory-benchmark/asciidoc/Readme.adoc
blob: 38611dc47544cf2a907e26c3f24e184160ac7629 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
= memory-benchmark

Overview of memory-benchmark

= Tutorial
= Configure

To run honeycomb memory benchmark, use maven profile *memory-benchmark* like so

 mvn clean install -DskipTests -Pmemory-benchmark

This will add following modules to build

* _management_ - Enable JMX for honeycomb
* _memory-benchmark-scripts_ - Script generation for benchmarks
* _memory-benchmark-api_ - Test models for benchmark
* _memory-benchmark_ - Benchmark itself

By default, 3 versions of run scripts are produces in project build folder

* _honeycomb-memory-footprint-benchmark-0_ - Tests honeycomb memory footprint on rest without any config/context data
* _honeycomb-memory-footprint-benchmark-1000_ - Tests honeycomb memory footprint while 1000 data nodes present in config data
* _honeycomb-memory-footprint-benchmark-10000_ - Tests honeycomb memory footprint while 10000 data nodes present in config data

Any other data sample size can be tested by modifying script parameter *-DsampleSize*

== Run

To run benchmark

 ./honeycomb-memory-footprint-benchmark-0

This will produce two output files.

* memory-benchmark-on-rest-out-0-HeapMemoryUsage.csv
* memory-benchmark-on-rest-out-0-NonHeapMemoryUsage.csv

For further explanation look at

 https://docs.oracle.com/javase/7/docs/api/java/lang/management/MemoryMXBean.html


Each of these files contains values in following format

 committed,init,max,used
 132644864,109051904,1525153792,12577144

These values stands for


* init - Represents the initial amount of memory (in bytes) that the Java virtual machine requests from the operating system for memory management during startup.
The Java virtual machine may request additional memory from the operating system and may also release memory to the system over time.
The value of init may be undefined(-1).
* used - Represents the amount of memory currently used (in bytes).
* committed	- Represents the amount of memory (in bytes) that is guaranteed to be available for use by the Java virtual machine.
The amount of committed memory may change over time (increase or decrease). The Java virtual machine may release memory to the system and committed could be less than init.
Committed will always be greater than or equal to used.
* max - Represents the maximum amount of memory (in bytes) that can be used for memory management. Its value may be undefined(-1).
 The maximum amount of memory may change over time if defined.
 The amount of used and committed memory will always be less than or equal to max if max is defined.
 A memory allocation may fail if it attempts to increase the used memory
 such that used > committed even if used <= max would still be true (for example, when the system is low on virtual memory).

== Configuration

Does not start any northbound interfaces, as they are not needed for this case.
Benchmark with 0 data sample size is just to compare it to each other samples size to
determine how much data each data sample takes in memory.