* (global): added --no-mem-optimization flag

This commit adds a new command-line argument that disables memory
optimizations AGH is using. These memory optimizations might be
necessary on low-memory devices, but they aren't free and there's a
performance hit (see #2044). Now they can be disabled - just pass
--no-mem-optimization when you run AGH or when you install the service
-- ./AdGuardHome -s install --no-mem-optimization

Closes: #2044
This commit is contained in:
Andrey Meshkov
2020-09-11 13:19:37 +03:00
parent cb8afde629
commit b3a68bb806
4 changed files with 60 additions and 32 deletions

View File

@@ -161,6 +161,9 @@ func run(args options) {
// configure log level and output
configureLogger(args)
// Go memory hacks
memoryUsage(args)
// print the first message after logger is configured
log.Println(version())
log.Debug("Current working directory is %s", Context.workDir)