You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Breaking change] Simplify object store heap size configuration (#697)
**Breaks the previously available startup options --obj-memory and --obj-total-memory**
This change simplifies configuring object store heap size for continuous monitoring. Instead of configuring total object store size, memory constraints for object store can now be configured using the following simple settings.
obj-index - Size of Object store index
obj-log-memory - Size of object store log that contains references to heap objects (Previously available as --obj-memory)
obj-heap-memory - Size of object store heap
Previously available --obj-total-memory option is now removed as object store memory can now be controlled using the above options in a fine grained manner.
Total object store memory footprint = obj-index + obj-log-memory + obj-heap-memory.
No changes to how the main store size is configured.
* Simplified object store memory configuration
* Added additional details on GC memory to INFO MEMORY command output. This also includes memory that is held by GC not yet released back to the system.
* Bug fix to account for null IGarnetObject.
* Updated documentation.
Copy file name to clipboardExpand all lines: libs/host/Configuration/Options.cs
+6-6
Original file line number
Diff line number
Diff line change
@@ -52,7 +52,7 @@ internal sealed class Options
52
52
publicstringSegmentSize{get;set;}
53
53
54
54
[MemorySizeValidation]
55
-
[Option('i',"index",Required=false,HelpText="Size of hash index in bytes (rounds down to power of 2)")]
55
+
[Option('i',"index",Required=false,HelpText="Start size of hash index in bytes (rounds down to power of 2)")]
56
56
publicstringIndexSize{get;set;}
57
57
58
58
[MemorySizeValidation(false)]
@@ -64,11 +64,11 @@ internal sealed class Options
64
64
publicintMutablePercent{get;set;}
65
65
66
66
[MemorySizeValidation(false)]
67
-
[Option("obj-total-memory",Required=false,HelpText="Total object store log memory used including heap memory in bytes")]
68
-
publicstringObjectStoreTotalMemorySize{get;set;}
67
+
[Option("obj-heap-memory",Required=false,HelpText="Object store heap memory size in bytes (Sum of size taken up by all object instances in the heap)")]
68
+
publicstringObjectStoreHeapMemorySize{get;set;}
69
69
70
70
[MemorySizeValidation]
71
-
[Option("obj-memory",Required=false,HelpText="Object store log memory used in bytes excluding heap memory")]
71
+
[Option("obj-log-memory",Required=false,HelpText="Object store log memory used in bytes (Size of only the log with references to heap objects, excludes size of heap memory consumed by the objects themselves referred to from the log)")]
72
72
publicstringObjectStoreLogMemorySize{get;set;}
73
73
74
74
[MemorySizeValidation]
@@ -80,7 +80,7 @@ internal sealed class Options
80
80
publicstringObjectStoreSegmentSize{get;set;}
81
81
82
82
[MemorySizeValidation]
83
-
[Option("obj-index",Required=false,HelpText="Size of object store hash index in bytes (rounds down to power of 2)")]
83
+
[Option("obj-index",Required=false,HelpText="Start size of object store hash index in bytes (rounds down to power of 2)")]
84
84
publicstringObjectStoreIndexSize{get;set;}
85
85
86
86
[MemorySizeValidation(false)]
@@ -575,7 +575,7 @@ public GarnetServerOptions GetServerOptions(ILogger logger = null)
Copy file name to clipboardExpand all lines: libs/host/defaults.conf
+5-5
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,7 @@
18
18
/* Size of each log segment in bytes on disk (rounds down to power of 2) */
19
19
"SegmentSize" : "1g",
20
20
21
-
/* Size of hash index in bytes (rounds down to power of 2) */
21
+
/* Start size of hash index in bytes (rounds down to power of 2) */
22
22
"IndexSize" : "128m",
23
23
24
24
/* Max size of hash index in bytes (rounds down to power of 2) */
@@ -27,10 +27,10 @@
27
27
/* Percentage of log memory that is kept mutable */
28
28
"MutablePercent" : 90,
29
29
30
-
/* Total object store log memory used including heap memory in bytes */
31
-
"ObjectStoreTotalMemorySize" : "",
30
+
/* Object store heap memory size in bytes (Sum of size taken up by all object instances in the heap) */
31
+
"ObjectStoreHeapMemorySize" : "",
32
32
33
-
/* Object store log memory used in bytes excluding heap memory */
33
+
/* Object store log memory used in bytes (Size of only the log with references to heap objects, excludes size of heap memory consumed by the objects themselves referred to from the log) */
34
34
"ObjectStoreLogMemorySize" : "32m",
35
35
36
36
/* Size of each object store page in bytes (rounds down to power of 2) */
@@ -39,7 +39,7 @@
39
39
/* Size of each object store log segment in bytes on disk (rounds down to power of 2) */
40
40
"ObjectStoreSegmentSize" : "32m",
41
41
42
-
/* Size of object store hash index in bytes (rounds down to power of 2) */
42
+
/* Start size of object store hash index in bytes (rounds down to power of 2) */
43
43
"ObjectStoreIndexSize" : "16m",
44
44
45
45
/* Max size of object store hash index in bytes (rounds down to power of 2) */
logger?.LogInformation("[Object Store] Total memory size including heap objects is {totalMemorySize}",(objTotalMemorySize>0?PrettySize(objTotalMemorySize):"unlimited"));
logger?.LogInformation("[Object Store] Total memory size including heap objects is {totalMemorySize}",(objHeapMemorySize>0?PrettySize(objHeapMemorySize):"unlimited"));
0 commit comments