今天在我们的一个项目中,客户非常关系Oracle的log file sync、db file parallel write性能。
由于我们的分布式存储zdatax已经是nvme了,因此db file parallel write的性能足够好了,平均等待时间也就0.13ms。
然后log file sync 确高达0.6ms,实际上大家都知道0.6ms也是非常非常的低了。无奈,客户要求很高,那么怎么办?
通过awr报告我发现很大一部分的等待消耗在了log file parallel write上,如何能降低这个等待,那么log file sync是不是也降低了呢?
这里想到一个测试优化的方法,以及我的测试过程和结论,供大家参考!
+++test 1
alter system set "_redo_write_coalesce_all_threshold"=1048576 scope=spfile sid='*';
alter system set "_redo_write_coalesce_slave_threshold"=1048576 scope=spfile sid='*';
alter system set "_redo_write_sync_single_io"=true scope=spfile sid='*';
--session 1
SQL> startup force
ORACLE instance started.
Total System Global Area 4294965376 bytes
Fixed Size 8947840 bytes
Variable Size 1811939328 bytes
Database Buffers 2147483648 bytes
Redo Buffers 326594560 bytes
Database mounted.
Database opened.
SQL> !host ps -ef|grep lgwr
/bin/bash: host: command not found
SQL> host ps -ef|grep lgwr
oracle 30829 1 0 20:32 ? 00:00:00 ora_lgwr_ora19c
oracle 31428 16274 0 20:32 pts/2 00:00:00 /bin/bash -c ps -ef|grep lgwr
oracle 31430 31428 0 20:32 pts/2 00:00:00 grep lgwr
SQL> @test_lgwr.sql
Table dropped.
。。。。。。
--session 2
oracle@oradb1:/home/oracle $sqlplus "/as sysdba"
SQL*Plus: Release 19.0.0.0.0 - Production on Tue Nov 19 20:33:05 2024
Version 19.23.0.0.0
Copyright (c)