View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0011023 | Rocky-Linux-9 | postgresql | public | 2025-11-10 18:07 | 2025-11-10 18:32 |
| Reporter | Duminda Karunaratne | Assigned To | Louis Abel | ||
| Priority | urgent | Severity | crash | Reproducibility | always |
| Status | needinfo | Resolution | open | ||
| Summary | 0011023: PostgreSQL memory allocation appears limited to ~50% of system RAM on Rocky Linux 9.4 (148GB system) | ||||
| Description | System Details OS: Rocky Linux release 9.4 (Blue Onyx) PostgreSQL version: 17.2 Hardware: 3-node HA cluster, each node with 148GB RAM Environment: Production PostgreSQL database server We’ve observed that on our PostgreSQL production servers running Rocky Linux 9.4, system memory allocation appears to plateau around 50–60% of the total available RAM (approximately 70–80GB out of 148GB). Despite low I/O pressure and no OOM events, neither the OS nor PostgreSQL seems to allocate or utilize the remaining available memory. The behavior is consistent across all three nodes in the HA cluster. We’d like to confirm whether this is: expected behavior under the current Linux memory management model, a configuration issue with PostgreSQL memory settings, or a potential kernel-level allocation anomaly specific to Rocky Linux 9.4. | ||||
| Tags | No tags attached. | ||||
| Attached Files | |||||
| Initially we thought it to be an Infra related issue and a Support ticket was logged with Broadcom support, they concluded that there's no issue from Hypervisor/Backend and the Memory utilization is approx. 50% when the issue occurred and advised to review the same from O/s level. I tried to attach SOS Report files but each one is exceeding 5MB file limit. | |
|
Thank you for the report. You appear to be running Rocky Linux 9.4, which is not supported. You also appear to be running postgresql that we do not provide. Our recommendations are the following: * Please update your system to 9.6 using dnf update * Considering using a built-in tuned configuration profile or creating your own (see attached for an example of a custom profile) * Reviewing the postgresql documentation For more information on supported Rocky Linux versions, please go to: https://wiki.rockylinux.org/rocky/version/ Setting to need info. |
|
|
postgresql_tuned.conf.txt (1,203 bytes)
[main] summary=Optimize for PostgreSQL RDBMS include=throughput-performance [sysctl] vm.swappiness = 10 vm.dirty_background_ratio = 10 vm.dirty_ratio = 40 vm.dirty_expire_centisecs = 3000 vm.dirty_writeback_centisecs = 500 kernel.shmmax = 18446744073692700000 kernel.shmall = 18446744073692700000 kernel.shmmni = 4096 kernel.sem = 250 512000 100 2048 fs.file-max = 312139770 fs.aio-max-nr = 1048576 net.ipv4.ip_local_port_range = 2048 65499 # Permits sockets in the time-wait state to be reused for new connections: net.ipv4.tcp_tw_reuse = 1 net.core.netdev_budget = 1024 net.core.netdev_max_backlog = 2048 net.core.rmem_default = 262144 net.core.rmem_max = 4194304 net.core.wmem_default = 262144 net.core.wmem_max = 1048576 kernel.panic_on_oops = 1 # We don't need NUMA balancing in this box: kernel.numa_balancing = 0 # Used if not defined by the service: net.core.somaxconn = 4096 # Other parameters to override throughput-performance template net.ipv4.tcp_rmem = 4096 87380 16777216 net.ipv4.tcp_wmem = 4096 65536 16777216 net.ipv4.tcp_window_scaling = 1 net.netfilter.nf_conntrack_max = 250000 net.ipv4.tcp_max_syn_backlog=4096 [vm] transparent_hugepages=never |
|
|
In addition to the above: 1. Verify that no systemd/cgroup memory limits are in the way - you can do this by using systemctl show against the postgresql service and system.slice 2. Disable transparent huge pages - the tuned profile I've provided does this, but also throughput-performance does this as well 3. If applicable: Set zone_reclaime_mode=0, review your NUMA layout and consider using numactl --interleave=all for postgres 4. Verify your configuration and read the postgresql documentation: shared_buffers, effective_cache_size, work_mem, huge_pages 5. Update your system to 9.6 Note: This is a bug tracker and not a general purpose support venue. If you are looking for support, please go to https://forums.rockylinux.org or https://chat.rockylinux.org |
|
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2025-11-10 18:07 | Duminda Karunaratne | New Issue | |
| 2025-11-10 18:07 | Duminda Karunaratne | File Added: image.png | |
| 2025-11-10 18:15 | Duminda Karunaratne | Note Added: 0011716 | |
| 2025-11-10 18:21 | Louis Abel | Assigned To | => Louis Abel |
| 2025-11-10 18:21 | Louis Abel | Status | new => needinfo |
| 2025-11-10 18:21 | Louis Abel | Note Added: 0011717 | |
| 2025-11-10 18:22 | Louis Abel | Note Added: 0011718 | |
| 2025-11-10 18:22 | Louis Abel | File Added: postgresql_tuned.conf.txt | |
| 2025-11-10 18:32 | Louis Abel | Note Added: 0011719 |