← Back to team overview

sslug-teknik team mailing list archive

Re: Optimering af oracle

 

Lars Brandi Jensen wrote:
> Er der nogen der kender nogle gode dokumenter eller har tips til tuning
> af oracle på linux ?. Jeg synes den er lidt sløv på min installation !.

Udover tuning kan det måske være interessant at kigge på 'scu' til at
ændre blokstørrelsen på disken. Der var en god diskussion på linux-scsi
for 1-2 måneder siden; omkring 4K var vist ret optimalt til bl.a.
databaser.

--------

The Scu kit can be found on my external web page at URL:
http://www.bit-net.com/~rmiller/scu.html

What's in it for you is more disk space - there's likely to be a gap of
around 100 bytes between sectors.

In my experience with mainframe drives (quite some years ago) optimum
space 
usage was achieved at around 4K blocks - it varies a little with drive 
characteristics.

--------

Hi John,
        Yep you certainly get more capacity, and I believe someone
told me you should get better performance too.  I tried a 4K sector
size, and see an increase of 99.22MB (base 2) on a 2GB drive.  I
was able to do I/O to the disk after rebooting, which flushed the
stale sector size.  I'm running a 2.2.16-22 kernel (RH 7.0).

scu> sho capacity

Disk Capacity Information:

                      Maximum Capacity: 4110480 (2007.070 megabytes)
                          Block Length: 512

scu> set device block 4096
scu> format
Formatting device [1/1/0] (RZ28D), please be patient...
        Working ... Tue Nov 14 09:52:00 2000
                        .
                        .
                        .
        Working ... Tue Nov 14 10:18:00 2000
scu> show capacity

Disk Capacity Information:

                      Maximum Capacity: 539209 (2106.285 megabytes)
                          Block Length: 4096

--------

You should get better performance; just think ... with 4k sectors you
have /18 the number of I/O requests you have with .5K sectors, 1/8 the
I/O interrupts, 1/8 the trips through the runtime library for your
programming language for I/O...

There are cases when it's not quite so rosy; I used to be a Systems
Engineer for a DBMS where the optimum blocksize for one of its datasets
w about 1.5 k, but for most thinks 4K is pretty good.

> was able to do I/O to the disk after rebooting, which flushed the
> stale sector size.  I'm running a 2.2.16-22 kernel (RH 7.0).
>

If you have the time & inclination, try it with the latest 2.4 kernel;
some 
bright spark took the block-handling code out at some point. I
personally have not explored just what's needed to run a 2.4 kernel on
7.0, but it's 
"2.4-ready." However, the state of being ready can change with any new 
version. Probably anything needed's at rawhide though.

If you want to evaluate general performance with different sector sizes,
look up a copy of bonnie. For straight sequential reads, use hdparm or
dd copying to /dev/null (and using a big buffer of its own).
-- 
Regards,
              Mogens Valentin
    Networking - Security - Programming
  Linux configuration and troubleshooting
http://www.danbbs.dk/~monz - monz@xxxxxxxxx


Follow ups

References