Foreman - How to verify applied tuning profile

Problem:
I have applied medium tuning profile according to our size, recommended by this documentation:
https://docs.theforeman.org/nightly/Tuning_Performance/index-katello.html#Applying_configurations_performance-tuning

However I have not find a way how to verify what is set/applied. Id there anything like a command or settings in a file. I have not found anything in the answer file, just in the log:

2025-06-26 09:34:32 [DEBUG ] [boot] [“Hook /usr/share/foreman-installer/hooks/boot/13-tuning.rb returned #<Kafo::AppOption::Definition:0x00007fe246fd7908 @advanced=false, @switches=["–tuning"], @type="INSTALLATION_SIZE", @description="Tune for an installation size. Choices: default, medium, large, extra-large, extra-extra-large, development", @default_value="medium", @multivalued=nil, @attribute_name="tuning">”]
2025-06-26 09:34:34 [DEBUG ] [root] Running installer with args [[“–tuning”, “medium”]]
2025-06-26 09:34:41 [DEBUG ] [configure] Facter: fact “kafo” has resolved to: {“scenario”=>{“id”=>“katello”, “name”=>“Katello”, “answer_file”=>“/tmp/kafo_installation20250626-9435-z0mzbi/answers.yaml”, “custom”=>{“tuning”=>“medium”}}}
2025-06-26 09:34:41 [DEBUG ] [configure] Path “/usr/share/foreman-installer/config/foreman.hiera/tuning/sizes/medium.yaml”

Expected outcome:

Command to check what tuning profile is set

Foreman and Proxy versions:
foreman-3.14.0-1.el9.noarch

Foreman and Proxy plugin versions:
katello-4.16.1-1.el9.noarch

Distribution and version:
RHEL9.9 5.14.0-570.23.1.el9_6.x86_64

Thanks!

Regards
Jan

If you run foreman-installer with the --help option, and grep for tuning, it should show you what value is currently set.

Hi Jeremy,

I think I tried this before too, but I have got only 1 line with possible options:

[root@foremanbkp ~]# foreman-installer --help | grep -i tuning
–tuning INSTALLATION_SIZE Tune for an installation size. Choices: default, medium, large, extra-large, extra-extra-large, development (default: “medium”)
[root@foremanbkp ~]#

Only confirmation I have got during the actual run of the command, posted in my initial comment.

I also checked the “answer” file, nothing there either…

[root@foremanbkp ~]# grep -i tuning /etc/foreman-installer/scenarios.d/foreman-answers.yaml
[root@foremanbkp ~]#

I built a shell script that just compares the values and displays what is set base on tuning profiles, do not beat me just yet, there is indeed a room for improvement, it is just a 1st shot …

this is the output:

./check_foreman_tuning.sh
Comparing current system tuning parameters with ‘medium’, ‘large’, ‘extra-large’, and ‘extra-extra-large’ profiles…

Tuning Profile Comparison Table:

Parameter medium large extra-large extra-extra-large
Apache ServerLimit 64 64 64 64
Apache MaxRequestWorkers 1024 1024 1024 1024
PostgreSQL max_connections 1000 1000 1000 1000
PostgreSQL shared_buffers 4GB 8GB 16GB 32GB
PostgreSQL effective_cache_size 16GB 16GB 32GB 32GB
PostgreSQL autovacuum_vacuum_cost_limit 2000 2000 2000 2000
PostgreSQL work_mem - - 8MB 8MB
Candlepin Java Options - - -Xms1024m -Xmx8192m -Xms1024m -Xmx8192m

Current Apache settings:
/etc/httpd/conf.modules.d/event.conf: ServerLimit 64
/etc/httpd/conf.modules.d/event.conf: MaxRequestWorkers 1024

Current PostgreSQL settings:
max_connections: 1000
shared_buffers: 4GB
effective_cache_size: 16GB
autovacuum_vacuum_cost_limit: 2000
work_mem: 4MB

Current Candlepin Java Options (if running):

And the code, if some one is interested:

#!/bin/bash

echo “Comparing current system tuning parameters with ‘medium’, ‘large’, ‘extra-large’, and ‘extra-extra-large’ profiles…”
echo “”

Display expected values table

echo “Tuning Profile Comparison Table:”
echo “”
printf “%-40s | %-8s | %-8s | %-20s | %-20s\n” “Parameter” “medium” “large” “extra-large” “extra-extra-large”
printf “%s\n” “-----------------------------------------|----------|----------|----------------------|----------------------”
printf “%-40s | %-8s | %-8s | %-20s | %-20s\n” “Apache ServerLimit” “64” “64” “64” “64”
printf “%-40s | %-8s | %-8s | %-20s | %-20s\n” “Apache MaxRequestWorkers” “1024” “1024” “1024” “1024”
printf “%-40s | %-8s | %-8s | %-20s | %-20s\n” “PostgreSQL max_connections” “1000” “1000” “1000” “1000”
printf “%-40s | %-8s | %-8s | %-20s | %-20s\n” “PostgreSQL shared_buffers” “4GB” “8GB” “16GB” “32GB”
printf “%-40s | %-8s | %-8s | %-20s | %-20s\n” “PostgreSQL effective_cache_size” “16GB” “16GB” “32GB” “32GB”
printf “%-40s | %-8s | %-8s | %-20s | %-20s\n” “PostgreSQL autovacuum_vacuum_cost_limit” “2000” “2000” “2000” “2000”
printf “%-40s | %-8s | %-8s | %-20s | %-20s\n” “PostgreSQL work_mem” “-” “-” “8MB” “8MB”
printf “%-40s | %-8s | %-8s | %-20s | %-20s\n” “Candlepin Java Options” “-” “-” “-Xms1024m -Xmx8192m” “-Xms1024m -Xmx8192m”

echo “”
echo “Current Apache settings:”
grep -i ‘ServerLimit|MaxRequestWorkers’ /etc/httpd/conf*/* /etc/httpd/conf.d/* 2>/dev/null
echo “”

echo “Current PostgreSQL settings:”
echo -n " max_connections: "
sudo -u postgres psql -tAc “SHOW max_connections;” 2>/dev/null

echo -n " shared_buffers: "
sudo -u postgres psql -tAc “SHOW shared_buffers;” 2>/dev/null

echo -n " effective_cache_size: "
sudo -u postgres psql -tAc “SHOW effective_cache_size;” 2>/dev/null

echo -n " autovacuum_vacuum_cost_limit: "
sudo -u postgres psql -tAc “SHOW autovacuum_vacuum_cost_limit;” 2>/dev/null

echo -n " work_mem: "
sudo -u postgres psql -tAc “SHOW work_mem;” 2>/dev/null

echo “”
echo “Current Candlepin Java Options (if running):”
ps aux | grep ‘[j]ava’ | grep candlepin

Regards, Jan