Oracle Database 19c SGA, PGA and HugePages Sizing Calculator for ERP
This calculator splits server memory into SGA and PGA for an Oracle Database 19c instance on Linux running an ERP such as JD Edwards, E-Business Suite or PeopleSoft. It also shows the default PGA_AGGREGATE_LIMIT Oracle will apply and the number of 2 MB HugePages the SGA needs.
Your numbers
Physical memory on the database server.
Kept for the OS, page cache, agents and backup software. Never less than 4 GB.
Lower this if several instances share the server.
The init parameter, not the current session count.
Measure with V$PROCESS.PGA_ALLOC_MEM averages at peak; 5 MB is a starting assumption.
Your results
A starting split, not a substitute for advisor data. Validate with V$SGA_TARGET_ADVICE, V$PGA_TARGET_ADVICE and AWR after a representative workload, and check the HugePages count with Oracle's hugepages_settings.sh script once the instance is running.
Default PGA_AGGREGATE_LIMIT and expected PGA vs PROCESSES
Sweeps PROCESSES parameter from 200 to 6000, holding your other inputs fixed.
Get your memory settings reviewed
Send us your init parameters and an AWR report from peak hours and we will check the SGA, PGA and HugePages settings against your actual workload.
Optional. The tool and every export work without this. No spam.
How to use it
Enter the physical RAM, how much to keep back for the OS and other software, and what share of the rest belongs to this instance. Pick an SGA share: 70% suits most ERP OLTP databases, while batch heavy or reporting databases with large sorts and hash joins need more PGA. Enter the PROCESSES init parameter and a realistic average PGA per process. The calculator returns SGA_TARGET, PGA_AGGREGATE_TARGET, the default PGA_AGGREGATE_LIMIT, the expected PGA at full PROCESSES and the HugePages count. If the warning output shows 1, either PROCESSES is far higher than needed or PGA_AGGREGATE_TARGET is too small for the connection count.
- Reserve = max(4 GB, RAM x reserve %).
- Instance memory = (RAM - reserve) x share.
- SGA_TARGET = instance memory x SGA share; PGA_AGGREGATE_TARGET = the rest.
- HugePages = ceil(SGA in MB / 2).
The PGA_AGGREGATE_LIMIT default rule
In 19c, when MEMORY_TARGET is not set, PGA_AGGREGATE_LIMIT defaults to 200% of PGA_AGGREGATE_TARGET, but never less than 2 GB and never less than 3 MB times PROCESSES (5 MB times PROCESSES for a RAC instance). If MEMORY_TARGET is set, the default is MEMORY_MAX_TARGET. When the limit is reached, Oracle terminates the calls or sessions using the most untunable PGA, so ERP batch jobs can fail with ORA-04036. With a high PROCESSES value the 3 MB rule can push the default limit well above what the server can supply, which the chart shows as PROCESSES grows. Set the limit explicitly if the default is unrealistic for your RAM.
HugePages and AMM on Linux
Automatic Memory Management (MEMORY_TARGET) is not compatible with Linux HugePages, so use Automatic Shared Memory Management: set SGA_TARGET and PGA_AGGREGATE_TARGET and leave MEMORY_TARGET and MEMORY_MAX_TARGET unset. Configure vm.nr_hugepages in /etc/sysctl.conf, raise the memlock limit for the oracle user in /etc/security/limits.conf, and consider USE_LARGE_PAGES=ONLY so the instance refuses to start rather than silently using small pages. Oracle also recommends disabling Transparent HugePages for database servers. Check the alert log at startup: it reports how much of the SGA was allocated in large pages.
Worked example and how to check it
A 256 GB server with a 10% reserve leaves 230.4 GB for one instance. At 70% SGA that is about 161 GB SGA_TARGET and 69 GB PGA_AGGREGATE_TARGET. With PROCESSES=1500 the default limit is max(2, 138, 4.4) = about 138 GB, which is more than the server can give, so set PGA_AGGREGATE_LIMIT explicitly, for example near 1.2 to 1.5 times the target. HugePages needed: 82,576. After a week of real load, query V$SGA_TARGET_ADVICE and V$PGA_TARGET_ADVICE: if ESTD_DB_TIME in the SGA advice drops for a larger size, or ESTD_OVERALLOC_COUNT in the PGA advice is above zero at the current target, move memory accordingly.
Frequently Asked Questions
What is the default PGA_AGGREGATE_LIMIT in Oracle 19c?
Without MEMORY_TARGET, it is 200% of PGA_AGGREGATE_TARGET, with a floor of 2 GB and a floor of 3 MB times PROCESSES (5 MB times PROCESSES on RAC). If PGA_AGGREGATE_TARGET is explicitly 0 it is 90% of physical memory minus the SGA. With MEMORY_TARGET set it equals MEMORY_MAX_TARGET.
Should I use MEMORY_TARGET for an ERP database on Linux?
Usually not. MEMORY_TARGET (AMM) cannot use HugePages on Linux, and an ERP database with a large SGA benefits from HugePages through lower page table overhead and no SGA swapping. Use ASMM with SGA_TARGET and PGA_AGGREGATE_TARGET instead, and size from advisor views after a real workload.
How do I calculate the number of HugePages for Oracle?
Divide the total SGA of all instances on the host, in MB, by the HugePage size (normally 2 MB, check Hugepagesize in /proc/meminfo) and round up, then add a little headroom. Oracle's hugepages_settings.sh script calculates it from the running instances' shared memory segments, which is the safest final check.
How much memory should I leave for the operating system?
A common practice is around 10% of RAM with a minimum of a few GB, more if backup agents, monitoring or ERP application tiers share the server. Watch free memory and swap activity with vmstat or sar after go live; any regular swapping means the reserve or the PGA is too small.
If you want your DBAs to ask the database and AWR these questions in plain English on your own servers, we can set up a private AI layer for that.
Related Tools
Oracle Database 19c Online Redo Log Size Calculator
Turn your peak redo rate into a redo log size, switches per hour, redo disk footprint and daily archive log volume for Oracle 19c.
Developer ToolsOracle Database 19c AWR Report and Top SQL Generator
Fill in a time window and schema to get a ready SQL*Plus script: AWR HTML report, top SQL, largest segments and monthly growth from DBA_HIST views.
OracleOracle Database 19c Release Update Gap and Patch Window Calculator
Enter your current and target 19c Release Update to see the gap, the release quarter and an estimated patch window for in-place or out-of-place patching.
More Oracle tools
See all- Oracle Database 12c to 19c Upgrade Checklist for ERP Databases
- Oracle Database 19c Security Hardening Checklist for ERP
- Oracle EBS Discrete Job Statuses Reference
- Oracle EBS Inventory Transaction Types Reference
- Oracle EBS Item Attribute Template Worksheet
- Oracle EBS MRP Exception Messages Reference
- Oracle EBS BOM Interface Load Worksheet
- Oracle EBS Inventory Period Close Checklist
- Oracle EBS WIP Accounting Class Reference
Keep exploring
Free tools
- Oracle Database 19c Security Hardening Checklist for ERPA 37 item hardening checklist for Oracle Database 19c under an ERP: accounts, privileges, network, unified auditing, data protection and patching.
- Oracle EBS 12.2 Database Upgrade to 19c ChecklistA step checklist for upgrading the Oracle E-Business Suite 12.2 database to 19c, organised around the interoperability note and the multitenant requirement.
- Oracle Database 12c to 19c Upgrade Checklist for ERP DatabasesA 41 item checklist for upgrading a JD Edwards, E-Business Suite or PeopleSoft database from 12c to 19c, with the critical steps marked.