Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Database \ Oracle archive log size than the size of the online journal of the much smaller     - How to enable curl command HTTP2 support (Linux)

- Build your own CA services: OpenSSL command line CA Quick Guide (Server)

- Linux and Windows virtual machine shared folders ---- Linux install VMware tools (Linux)

- Ubuntu 15.04 install Complete Guide (Linux)

- The istgt PSD on ported to Mac OS X (Linux)

- Raspberry Pi 2 to install the latest version of the FPC and Lazarus 1.5 (Linux)

- open V switch port mirror in OpenStack neutron (Server)

- Linux, set and view environment variables (Linux)

- RT-11SJ run at ambient PDP-11 MACRO-11 assembly (Programming)

- Ubuntu install code editor Sublime Text 3 (Linux)

- Ubuntu and derivatives installation Atom 0.104.0 (Linux)

- Open source backup software installed on Ubuntu Systemback 1.6.201 (Linux)

- How to Upgrade Ubuntu GNOME 14.10 to GNOME 3.16 Desktop (Linux)

- JavaScript prototype and prototype chain and project combat (Programming)

- Linux command -nohup & (Linux)

- Linux host dual LAN transceiver package ARP problem (Linux)

- Based Docker build stand-alone high-availability cluster Hadoop2.7.1 Spark1.7 (Server)

- After Oracle 11g dataguard failover rebuild the archive logs are not applied to be NO problem (Database)

- sudoers file parsing (Linux)

- C ++ thread creates transmission parameters are changed (Programming)

 
         
  Oracle archive log size than the size of the online journal of the much smaller
     
  Add Date : 2018-11-21      
         
         
         
  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.
     
         
         
         
  More:      
 
- Linux Live CD lets your PC is no longer secure (Linux)
- Using DBMS_STAT function closes mission (Database)
- Linux check disk parameters trapping lack amendments (Linux)
- Grep, Ack, Ag searches Efficiency Comparison (Linux)
- Android components series Activity (Programming)
- redis main building and disaster recovery from a cluster deployment (Database)
- Linux6.1 / 6.5 dual-NIC Binding (Linux)
- Varnish achieve page jump (Server)
- MySQL 5.7 perfectly distributed transaction support (Database)
- To configure linux transparent firewall (Linux)
- Java implementation of stacks and queues (Programming)
- Use mysqldump MySQL database backup - Linux Shell Scripting (Database)
- Quickly build and install Linux KVM system (Linux)
- Talk about the Linux ABI compatibility Application (Linux)
- RPM package management under Linux (Linux)
- C ++ precision performance test function (Programming)
- Linux MultiPath software implementation instructions (Linux)
- Proxmox VE implement KVM OpenVZ virtualization cloud computing (Server)
- To build a private Docker registry (Server)
- Zabbix monitors the status of TCP connections (Server)
     
           
     
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.