From 7b7dd59b5793b421df1fbf10bb263ceb2a096c7b Mon Sep 17 00:00:00 2001 From: LSmyrnaios Date: Fri, 28 Apr 2023 19:37:12 +0300 Subject: [PATCH] - Increase the "max_heap_size". - Update a dependency. - Update README.md --- README.md | 4 ++-- build.gradle | 2 +- installAndRun.sh | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index e36cbcb..8d8d5d3 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,6 @@ We use Facebook's [**Zstandard**](https://facebook.github.io/zstd/) compression - The above script, installs the [PublicationsRetriever](https://github.com/LSmyrnaios/PublicationsRetriever) software, as a library and then compiles and runs the whole Application.
- If you want to just run the app, then run the script with the argument "1": ```./installAndRun.sh 1```. In this scenario, apart from the SpringBoot-app not re-building, the [PublicationsRetriever](https://github.com/LSmyrnaios/PublicationsRetriever) software, will not be re-installed as well.
-- If you want to avoid re-installing the [PublicationsRetriever](https://github.com/LSmyrnaios/PublicationsRetriever) software, i.e. when using a development (non-published) version -or when nothing has changed and wanting to avoid the time-overhead, run the script with the argument "0", followed by the argument "1": ```./installAndRun.sh 0 1```.
+- If you want to avoid re-installing the [PublicationsRetriever](https://github.com/LSmyrnaios/PublicationsRetriever) software, but still building the Worker's application, run the script with the argument "0", followed by the argument "1": ```./installAndRun.sh 0 1```, i.e. when using a development (non-published) version +or when nothing has changed and wanting to avoid the time-overhead.

diff --git a/build.gradle b/build.gradle index 7ce0c85..1eb46dd 100644 --- a/build.gradle +++ b/build.gradle @@ -42,7 +42,7 @@ dependencies { implementation group: 'com.google.guava', name: 'guava', version: '31.1-jre' implementation 'org.apache.commons:commons-compress:1.23.0' - implementation 'com.github.luben:zstd-jni:1.5.5-1' // Even though this is part of the above dependency, it is needed separately as well, specifically here, in the Worker. + implementation 'com.github.luben:zstd-jni:1.5.5-2' // Even though this is part of the above dependency, it is needed separately as well, specifically here, in the Worker. testImplementation 'org.springframework.security:spring-security-test' testImplementation "org.springframework.boot:spring-boot-starter-test" diff --git a/installAndRun.sh b/installAndRun.sh index e160622..8ff3fb6 100755 --- a/installAndRun.sh +++ b/installAndRun.sh @@ -71,7 +71,7 @@ if [[ justRun -eq 0 ]]; then # Update the max-heap-size based on the machine's physical memory. machine_memory_mb=$(grep MemTotal /proc/meminfo | awk '{print $2}' | xargs -I {} echo "scale=4; {}/1024" | bc) # It returns the size in MB. - max_heap_size_mb=$(echo "($machine_memory_mb - 896)/1" | bc) # Leave 896 MB to the system (the "()/1" is used to take the floor value). + max_heap_size_mb=$(echo "($machine_memory_mb - 800)/1" | bc) # Leave 800 MB to the system (the "()/1" is used to take the floor value). # Now, we replace the "-Xmx" parameter inside the "./build.gradle" file, with "-Xmx${max_heap_size}m" echo -e "\n\nThe max-heap-size (-Xmx) will be set to: ${max_heap_size_mb}m\n\n" sed -i "s/'-Xmx[0-9]\+[gm]'/'-Xmx${max_heap_size_mb}m'/g" ./build.gradle