I have the following doubt, I have a server with Oracle 9i and another with Oracle 12c, in both cases I have the doubt that happens when Oracle reaches the limit imposed by the defined memory parameters (SGA and PGA)? … Example hypothetical:
I have a server with 32GB of RAM in which I only have running an instance of oracle 12c which has assigned the following parameters:
sga_max_size = 19327352832
sga_target = 19327352832
pga_aggregate_target = 10737418240
pga_aggregate_limit = 12884901888
If it were to reach the limit of those parameters that would happen ?, the operating system (RedHat) would begin to swap?
Best Answer
SGA: nothing serious, it is a fix sized memory area, once it gets full, the database reuses memory that is rarely accessed using LRU (least recently used) algorithm
Memory Architecture
PGA: Once
PGA_AGGREGATE_LIMIT
is reached, the database aborts calls of sessions having the most untunable (like PL/SQL collections) PGA memory, and those sessions receiveORA-04036
error. If that does not help and PGA usage is still above the limit, the database may even kill those sessions:PGA_AGGREGATE_LIMIT
(19327352832 + 12884901888)/1024/1024/1024 = 30
You have 32 GB memory in your server, you have allocated 30 GB memory to the database, and there is nothing else running on it, as you said. With proper configuration and sizing, you should not see swapping under normal circumstances:
hugepages
for decreasing page tablesfilesystemio_options=setall
for direct I/O and avoiding filesystem cachingvm.swappiness
set to 10 or even lowerThis does not mean the system will never swap. For example:
PGA_AGGREGATE_LIMIT
. You can still have rogue procesesses consuming PGA memory above the limit causing swapping.