Hi Joey, Henry,
> 根據我的附件,似乎sga allocate size跟vmstat裡面
> free 減少的size的確不會相等
Yes. It is different if only DB instance server processes starting.
也就是說, 減少的 free memory 低於您所看到的 SGA space.
When DB server processes running, the shared memory
(VM - Virtual memory) allocation matched to SGA and
the VSZ of "ps aux" will greater to SGA as you saw.
But the physical memory access will calling from Virtual
memory address mapping to physical memory address
while DB program processes gradually running increasingly.
For example:
SQL> show sga
Total System Global Area 2664649700 bytes
Fixed Size 103396 bytes
Variable Size 1844305920 bytes
Database Buffers 819200000 bytes
Redo Buffers 1040384 bytes
The Database Buffers (819200000 bytes) should be
allocated immediately while DB starting, but the Variable Size
will processing by DB jobs running.
就好像是一 ora_dbfile.dbf pre-allocted a filesize 10GB,
但是它真正的資料可能只有 10MB.
其餘皆是 sparse data.
詳盡的 SGA 使用狀況得諮詢 ORACLE 公司.
PS: Explain both VSZ and RSS on ps aux.
Process virtual address size (VSZ)--This is the total amount of anonymous memory allocated to the process (in bytes).
Real memory (resident set) size of the process (RSS)--This is the total amount of physical memory (in bytes) mapped to virtual pages (that is, the total amount of memory that the application has physically used). Shared memory is included in the resident set size figures; as a result, the total of these figures may exceed the total amount of physical memory available on the system.
Best regards,
Richard.