changeset 5156:2020c2e479d3

doc
author Alain Mazy <am@osimis.io>
date Thu, 02 Feb 2023 09:34:38 +0100
parents 20911302c6e7
children 874e6b135614
files OrthancServer/Resources/ImplementationNotes/memory_consumption.txt
diffstat 1 files changed, 20 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/OrthancServer/Resources/ImplementationNotes/memory_consumption.txt	Wed Feb 01 19:32:14 2023 +0100
+++ b/OrthancServer/Resources/ImplementationNotes/memory_consumption.txt	Thu Feb 02 09:34:38 2023 +0100
@@ -2,6 +2,7 @@
 tries to give back unused memory back to the system.  This is implemented 
 by calling malloc_trim every 100ms.
 
+
 Here is how we validated the effect of this new feature:
 -------------------------------------------------------
 
@@ -9,6 +10,7 @@
 on Feb 1st 2023.  One image without the call to malloc_trim and the other with
 this call.
 
+
 1st test: unconstrained Docker containers
 .........................................
 
@@ -19,6 +21,7 @@
 - without malloc_trim:                   1500 MB
 - with malloc_trim:                       410 MB
 
+
 2nd test: memory constrained Docker containers
 ..............................................
 
@@ -37,7 +40,8 @@
 4                  out-of-memory crash                ~  345 MB
 5..20                                                 ~  380 MB (stable)
 
-3nd test: memory constrained Docker containers
+
+3rd test: memory constrained Docker containers
 ..............................................
 
 In this last test, we lowered the memory allocation to 300MB and have been able to
@@ -49,8 +53,21 @@
 The same test without malloc_trim could never run for more than 35 seconds.
 
 
-Note: 
-----
+4th test: performance impact of malloc_trim and available memory
+................................................................
+
+In this test, we have measured the time required to anonymize a 2000 instances study
+with various configurations.  It appears that malloc_trim or the total amount
+of memory available in the system has no significant impact of performance.
+
+- No malloc trim, 300 MB in the system:       ~ 38s
+- No malloc trim, 1500 MB in the system:      ~ 38s
+- With malloc trim, 300 MB in the system:     ~ 38s
+- With malloc trim, 1500 MB in the system:    ~ 38s
+
+
+Conclusion: 
+----------
 
 The use of malloc_trim does not guarantee that Orthanc will never reach a
 out-of-memory error, especially on very constrained systems.  
@@ -63,9 +80,6 @@
 
 
 
-
-
-
 malloc_trim documentation
 -------------------------