|
Some users than the size of the archive log online journal Small wonder, in this case:
First, check to see if your archive log file compression:
SELECT to_char (first_time, 'yyyy-mm-dd hh24: mi: ss'), blocks * block_size / 1024/1024, compressed from v $ archived_log;
If not compressed, then the problem may be related to your number of CPU.
Please check your number of CPU:
show parameter CPU_COUNT
The size of the log file is real amount of online log file, which is the size of the front-line log file switch writes the content.
However, in order to better parallel to reduce conflicts, Oracle will be every 16 minutes an CPU (strand), each share a space independent from redo buffer allocation and redo log, when this one redo buffer runs out, write redo log and continue to allocate space in the redo log from the same size, if you can not allocate free space will log switch, regardless of whether the other strand finished.
The following examples given to illustrate the algorithm:
For example, the number of CPU is 64, then there will be 64/16 = 4 strand
Example 1) When the size of the log buffer and redo log file size is 256M, when each strand is 256M / 4 = 64M.
Each redo log file when enabled, it will advance the redo log file in the size distribution of four 64M and log buffer corresponding to
Because the size of the log buffer and redo log file size is 256M, then redo log file is no unallocated space remaining up.
Each process is assigned to redo generated on 1,2,3,4 which one strand log buffer on a single process corresponds to only one strand,
So that when the database only redo certain processes (such as an extreme case, only one process) generated a lot of time, which quickly filled with a strand
LGWR will be filled after the log buffer contents in strand 1 is written to the redo log file, and attempts to allocate space for a new 64M from redo log file and found no, then written to a log of all the contents of the strand, and for log switch.
This may lead to a redo log file is written only the contents of a strand, the other part is almost empty, archive log is generated will only be close to 64M, rather than 256M.
When CPU_COUNT large, this difference will be even greater.
Example 2) When the log buffer size is 256M, and redo log file size is 1G, when each strand or 256M / 4 = 64M.
Each redo log file when enabled, it will advance the redo log file in the size distribution of four 64M and log buffer corresponding to
In this case, redo log file in space as well as 1G-256M = 768M remaining unallocated.
If after strand 1 is full, the contents of the log buffer LGWR will strand 1 is written to the redo log file, and attempts to allocate space for a new 64M from the redo log file, and then continue down to write.
Until redo log file can be allocated space in no more, and then written to a log of all the contents of the strand, and for log switch.
When the log buffer size is 256M, and redo log file size is 100M, when each strand or 256M / 4 = 64M.
But redo log file in the space will be divided equally by the number of strand, that is, each 100M / 4 = 25M.
Thus, when each strand write the contents of 25M and they will log switch, instead of 64M. The equivalent of log buffer part of the space is wasted.
Please refer to the following documentation:
1.Archive Logs Are Created With Smaller, Uneven Size Than The Original Redo Logs. Why? (Doc ID 388627.1)
With a high CPU_COUNT, a low load and a redo log file size smaller than the redolog buffer, you may small archived log files because of log switches at about 1/8 of the size of the define log file size.
This is because CPU_COUNT defines the number of redo strands (ncpus / 16). With a low load only a single strand may be used. With redo log file size smaller than the redolog buffer, the log file space is divided over the available strands. When for instance only a single active strand is used, a log switch can already occur when that strand is filled.
(Not necessarily at the database is not busy in fact, just in the process of generating redo a few cases) <== CPU_COUNT high and low workload will lead Archive Log is much smaller than the redo log, and log frequent switching.
2.Archived redolog is (significant) smaller than the redologfile. (Doc ID 1356604.1)
The logfile space reservation algorithm
If the logfile is smaller than the log buffer, then the whole logfile space is divided / mapped / reserved equally among all the strands, and there is no unreserved space (ie no log residue).
When any process fills a strand such that all the reserved underlying logfile space for that strand is used, AND there is no log residue, then a log switch is scheduled.
<== Log strand and log switch algorithms in this note in speaking more clearly.
Here strand is shared. redo strand refers to the redo buffer in several bars. log strand, refers to the log is divided into a plurality of strips.
Multiple processes share a strand, but a process can only use one strand, not two simultaneously. |
|
|
|