[Libreoffice-commits] online.git: wsd/Admin.cpp wsd/LOOLWSD.cpp
Pranav Kant
pranavk at collabora.co.uk
Mon Jul 10 15:12:40 UTC 2017
wsd/Admin.cpp | 8 +++++++-
wsd/LOOLWSD.cpp | 1 -
2 files changed, 7 insertions(+), 2 deletions(-)
New commits:
commit aa6b96aaed1d9636881e1b8251ba1124dab114b5
Author: Pranav Kant <pranavk at collabora.co.uk>
Date: Mon Jul 10 20:41:49 2017 +0530
Skip memory cleanup when memproportion is not configured
Change-Id: I3799d914b5155c37f37bb497ac48e76c1a68761b
diff --git a/wsd/Admin.cpp b/wsd/Admin.cpp
index ab99a059..b4fdfa4b 100644
--- a/wsd/Admin.cpp
+++ b/wsd/Admin.cpp
@@ -536,8 +536,14 @@ void Admin::triggerMemoryCleanup(size_t totalMem)
{
LOG_TRC("Total memory we are consuming (in kB): " << totalMem);
// Trigger mem cleanup when we are consuming too much memory (as configured by sysadmin)
- const auto memLimit = LOOLWSD::getConfigValue<double>("memproportion", static_cast<double>(80.0));
+ const auto memLimit = LOOLWSD::getConfigValue<double>("memproportion", static_cast<double>(0.0));
LOG_TRC("Mem proportion for LOOL configured : " << memLimit);
+ if (memLimit == 0.0 || _totalSysMem == 0)
+ {
+ LOG_TRC("Not configured to do memory cleanup. Skipping memory cleanup.");
+ return;
+ }
+
float memToFreePercentage = 0;
if ( (memToFreePercentage = (totalMem/static_cast<double>(_totalSysMem)) - memLimit/100.) > 0.0 )
{
diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp
index b21dd3bc..3d286f3a 100644
--- a/wsd/LOOLWSD.cpp
+++ b/wsd/LOOLWSD.cpp
@@ -624,7 +624,6 @@ void LOOLWSD::initialize(Application& self)
{ "lo_jail_subpath", "lo" },
{ "server_name", "" },
{ "file_server_root_path", "loleaflet/.." },
- { "memproportion", "80.0" },
{ "num_prespawn_children", "1" },
{ "per_document.max_concurrency", "4" },
{ "per_document.idle_timeout_secs", "3600" },
More information about the Libreoffice-commits
mailing list