Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
ansible-public
Manage
Activity
Members
Plan
Redmine
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
system
ansible-public
Commits
c3310a7e
Commit
c3310a7e
authored
1 year ago
by
Baptiste DE RENZO
Browse files
Options
Downloads
Patches
Plain Diff
Add PostgreSQL swappiness configuration in HA
parent
4fb94243
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
roles/postgres-ha/tasks/main.yml
+18
-0
18 additions, 0 deletions
roles/postgres-ha/tasks/main.yml
with
18 additions
and
0 deletions
roles/postgres-ha/tasks/main.yml
+
18
−
0
View file @
c3310a7e
...
...
@@ -99,6 +99,24 @@
/bin/systemctl restart postgresql@{{ repmgr_database_version }}-{{ repmgr_database_cluster }}, \
/bin/systemctl reload postgresql@{{ repmgr_database_version }}-{{ repmgr_database_cluster }}
-
name
:
configure swappiness
ansible.builtin.copy
:
dest
:
/etc/sysctl.d/40-swappiness.conf
owner
:
"
root"
group
:
"
root"
mode
:
"
644"
content
:
|
# UbiCast Swappiness settings configuration for PostgreSQL on Linux
# Parameter that controls the relative weight given to swapping out of runtime memory,
# as opposed to dropping pages from the system page cache.
# A low value causes the kernel to prefer to evict pages from the page cache while
# a higher value causes the kernel to prefer to swap out "cold" memory pages.
# Swappiness can be set to a value from 0 to 200. Default is 60.
# See RM#38809 and https://dali.bo/j1_html#configuration-du-swap
vm.swappiness = 10
# SSH
-
name
:
ensure postgres account have a ssh keypair
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment