- Increase the "max_heap_size".

- Update a dependency.
- Update README.md
This commit is contained in:
Lampros Smyrnaios 2023-04-28 19:37:12 +03:00
parent ec4d084972
commit 7b7dd59b57
3 changed files with 4 additions and 4 deletions

View File

@ -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.<br>
- 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.<br>
- 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```.<br>
- 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.<br>
<br>

View File

@ -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"

View File

@ -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