|
|
66a37d |
From e639fe97eabe40445ad6c1308125ce8c2687ec6f Mon Sep 17 00:00:00 2001
|
|
|
66a37d |
From: Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
|
|
|
66a37d |
Date: Thu, 7 Apr 2022 16:40:37 -0300
|
|
|
66a37d |
Subject: [PATCH] Increase the value for max_vas_reuse_count
|
|
|
66a37d |
|
|
|
66a37d |
While running tests on PowerVM with 1MB files, it has been noticed a
|
|
|
66a37d |
huge delay when processing the 100th stream.
|
|
|
66a37d |
The penalty for reopening the VAS window is still too high for 100
|
|
|
66a37d |
executions and is being increased to 10000 in order to keep its execution less
|
|
|
66a37d |
than 10% of the time spent executing those 10000 streams.
|
|
|
66a37d |
|
|
|
66a37d |
Signed-off-by: Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
|
|
|
66a37d |
---
|
|
|
66a37d |
lib/nx_zlib.c | 13 ++++++++++++-
|
|
|
66a37d |
test/nx-zlib.conf | 4 ++--
|
|
|
66a37d |
2 files changed, 14 insertions(+), 3 deletions(-)
|
|
|
66a37d |
|
|
|
66a37d |
diff --git a/lib/nx_zlib.c b/lib/nx_zlib.c
|
|
|
66a37d |
index fa7000e..b3737a2 100644
|
|
|
66a37d |
--- a/lib/nx_zlib.c
|
|
|
66a37d |
+++ b/lib/nx_zlib.c
|
|
|
66a37d |
@@ -982,7 +982,18 @@ void nx_hw_init(void)
|
|
|
66a37d |
nx_config.max_byte_count_current = (1UL<<30);
|
|
|
66a37d |
nx_config.max_source_dde_count = MAX_DDE_COUNT;
|
|
|
66a37d |
nx_config.max_target_dde_count = MAX_DDE_COUNT;
|
|
|
66a37d |
- nx_config.max_vas_reuse_count = 100;
|
|
|
66a37d |
+ /** On PowerVM, reopening a VAS window takes 300x the time used to
|
|
|
66a37d |
+ * process a single stream with the maximum per job length allowed,
|
|
|
66a37d |
+ * causing serious performance issues when max_vas_reuse_count is too
|
|
|
66a37d |
+ * low. In order to avoid these issues, it has been decided the
|
|
|
66a37d |
+ * average impact of reopening a VAS window should be less than 10% of
|
|
|
66a37d |
+ * of the time spent processing max_vas_reuse_count streams at
|
|
|
66a37d |
+ * maximum per job length. That means 3000, which we rounded up.
|
|
|
66a37d |
+ * Notice that setting this number too high may impact the performance
|
|
|
66a37d |
+ * of multithreaded processes with a massive amount of threads. For
|
|
|
66a37d |
+ * those cases, it's recommended to use a lower value in the config
|
|
|
66a37d |
+ * file. */
|
|
|
66a37d |
+ nx_config.max_vas_reuse_count = 10000;
|
|
|
66a37d |
nx_config.per_job_len = nx_query_job_limits(); /* less than suspend limit */
|
|
|
66a37d |
nx_config.strm_def_bufsz = (1024 * 1024); /* affect the deflate fifo_out */
|
|
|
66a37d |
nx_config.soft_copy_threshold = 1024; /* choose memcpy or hwcopy */
|
|
|
66a37d |
diff --git a/test/nx-zlib.conf b/test/nx-zlib.conf
|
|
|
66a37d |
index 444d966..cb30c36 100644
|
|
|
66a37d |
--- a/test/nx-zlib.conf
|
|
|
66a37d |
+++ b/test/nx-zlib.conf
|
|
|
66a37d |
@@ -59,5 +59,5 @@ logfile = ./nx.log
|
|
|
66a37d |
#nx_ratio_s = 100
|
|
|
66a37d |
|
|
|
66a37d |
# Maximum number of times deflateInit/inflateInit can reuse an already-open VAS
|
|
|
66a37d |
-# window
|
|
|
66a37d |
-# max_vas_reuse_count = 100
|
|
|
66a37d |
+# window. Default: 10000
|
|
|
66a37d |
+# max_vas_reuse_count = 10000
|