Repository navigation
feat(playbooks/apache_solr): set vm.swappiness to 1 - #784
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Solr Reference Guide recommends disabling swap or setting
vm.swappinessto 1 ("Avoid Swapping" in "Taking Solr to Production"). With the distribution default (60, or 30 with TuneD'svirtual-guestprofile), the kernel swaps out idle parts of the Java heap while page cache is still available. On a host with a 4 GB heap on an 8 GB VM, the whole 2 GB swap ended up filled with Solr heap.playbooks/apache_solr.ymlrunskernel_settings, fed byapache_solr__kernel_settings__sysctl__dependent_var(vm.swappiness: 1), skippable viaapache_solr__skip_kernel_settings. Same pattern aselasticsearchandmongodb.z00-after-tuned.conf: the kernel honoursvm.swappinesscontinuously.kernel_settingsyet, the playbook now also installs TuneD and applies its sysctl hardening baseline.Tested:
molecule test --scenario-name apache_solr/installon Debian 13 and Rocky 9, verify asserts/proc/sys/vm/swappinessis 1. The other targets and thesolr10scenario are not run yet.