Old linux lore no longer applies
From: Mladen Gogala <gogala.mladen_at_gmail.com>
Date: Thu, 22 Mar 2012 00:50:10 +0000 (UTC)
Message-ID: <pan.2012.03.22.00.50.09_at_gmail.com>
There is an interesting discussion on Oracle Support Community: http://tinyurl.com/7jfdet9. The interesting part is about the long standing rule that db_file_multiblock_read_count should not exceed the size of a single IO. On the old Linux systems, the IO limit used to be 1M. There were Linux kernel parameters like MAXPHYS and MAX-IO-SIZE that used to determine the maximum IO size.
Those parameters are gone in the newer Linux kernels (tried with CentOS 6.2 and Fedora 15) as well as the 1MB limit. The limit no longer applies:
read(0, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0
\0"..., 4194304) = 4194304
write(1, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0
\0"..., 4194304) = 4194304
read(0, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0
\0"..., 4194304) = 4194304
write(1, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0
\0"..., 4194304) = 4194304
Date: Thu, 22 Mar 2012 00:50:10 +0000 (UTC)
Message-ID: <pan.2012.03.22.00.50.09_at_gmail.com>
There is an interesting discussion on Oracle Support Community: http://tinyurl.com/7jfdet9. The interesting part is about the long standing rule that db_file_multiblock_read_count should not exceed the size of a single IO. On the old Linux systems, the IO limit used to be 1M. There were Linux kernel parameters like MAXPHYS and MAX-IO-SIZE that used to determine the maximum IO size.
Those parameters are gone in the newer Linux kernels (tried with CentOS 6.2 and Fedora 15) as well as the 1MB limit. The limit no longer applies:
I executed the following:
strace -o /tmp/out dd if=/dev/zero of=/tmp/ttt bs=4M count=2
Linux didn't break the writes into multiple system calls, it executed the 4MB write calls without breaking the sweat:
pen("/tmp/ttt", O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE, 0666) = 3
dup2(3, 1) = 1 close(3) = 0clock_gettime(CLOCK_MONOTONIC, {1186, 956603209}) = 0 mmap2(NULL, 4206592, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb717c000
read(0, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0
\0"..., 4194304) = 4194304
write(1, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0
\0"..., 4194304) = 4194304
read(0, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0
\0"..., 4194304) = 4194304
write(1, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0
\0"..., 4194304) = 4194304
close(0) = 0 close(1)
With the new FC HBA adapters, which contain significant amount of memory, it makes sense to use much larger db_file_multiblock_read_count. I saw performance improvement with setting it up to 16M on the machine in the office (8MB HBA on the DW machine).
The old lore definitely doesn't apply any longer.
-- http://mgogala.byethost5.comReceived on Wed Mar 21 2012 - 19:50:10 CDT