1077887 - hp-ux mount and file system options for best performance

5
26.05.2008 Page 1 of 5 Note 1077887 - HP-UX: mount and filesystem options for best performance Note Language: English Version: 15 Validity: Valid from 06.05.2008 Summary Symptom Slow I/O, buffercache, filesystem cache, how to use direct I/O, using the correct blocksize More Terms HP-UX, 11.11, 11.23, 11.31, 11iv1, 11iv2, 11iv3, vxfs, direct I/O, buffered I/O, IO, buffercache, filecache, mount options, dbc_max_pct, filecache_max, block size, 8k, 1k, blocksize Cause and Prerequisites Slow I/O performance, unknown or unusual mount options, incorrect blocksize Solution The most common filesystem on HP-UX is VxFS (the Veritas Filesystem) - also known as JFS (Journal Filesystem). For more information on HP filesystems in general see also link: http://docs.hp.com/en/5991-5853/5991-5853.pdf ("Supported File and File System Sizes for HFS and JFS") Although HFS still exists, this is usually only used the /stand filesystem. HFS is not recommended for SAP use. Summary & WARNING This note discusses two typical configurations that can be used to mount filesystems for SAP installations on HP-UX: direct I/O and buffered I/O. RAW device usage is not discussed here. However other variations are possible and may in some cases be appropriate. Since performance depends a lot on the behaviour of the individual SAP and I/O subsystem, please test the chosen options before using them in a productive environment. This note also briefly discusses some other HP-UX I/O related customizing which can also help improve performance. Setting the correct blocksizes It is extremely important for Database performance that the filesystems use the correct blocksize. This is equally true for direct I/O and buffered I/O. Using the wrong blocksize causes unnecessary I/O overhead since blocksize used by the database processes does not match the filesystem blocksize. o Oracle For sapdata's use 8kb blockize

Upload: lek-cpe

Post on 07-Apr-2015

1.282 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: 1077887 - HP-UX Mount and File System Options for Best Performance

26.05.2008 Page 1 of 5

Note 1077887 - HP-UX: mount and filesystem options for best performance

Note Language: English Version: 15 Validity: Valid from 06.05.2008

Summary

SymptomSlow I/O, buffercache, filesystem cache, how to use direct I/O, using thecorrect blocksize

More TermsHP-UX, 11.11, 11.23, 11.31, 11iv1, 11iv2, 11iv3, vxfs, direct I/O, bufferedI/O, IO, buffercache, filecache, mount options, dbc_max_pct, filecache_max,block size, 8k, 1k, blocksize

Cause and PrerequisitesSlow I/O performance, unknown or unusual mount options, incorrect blocksize

SolutionThe most common filesystem on HP-UX is VxFS (the Veritas Filesystem) - alsoknown as JFS (Journal Filesystem).

For more information on HP filesystems in general see also link:http://docs.hp.com/en/5991-5853/5991-5853.pdf ("Supported File and FileSystem Sizes for HFS and JFS")

Although HFS still exists, this is usually only used the /stand filesystem.HFS is not recommended for SAP use.

Summary & WARNING

This note discusses two typical configurations that can be used to mountfilesystems for SAP installations on HP-UX: direct I/O and buffered I/O.RAW device usage is not discussed here.

However other variations are possible and may in some cases be appropriate.Since performance depends a lot on the behaviour of the individual SAP andI/O subsystem, please test the chosen options before using them in aproductive environment.

This note also briefly discusses some other HP-UX I/O related customizingwhich can also help improve performance.

Setting the correct blocksizes

It is extremely important for Database performance that the filesystems usethe correct blocksize. This is equally true for direct I/O and bufferedI/O.

Using the wrong blocksize causes unnecessary I/O overhead since blocksizeused by the database processes does not match the filesystem blocksize.

o Oracle

For sapdata's use 8kb blockize

Page 2: 1077887 - HP-UX Mount and File System Options for Best Performance

26.05.2008 Page 2 of 5

Note 1077887 - HP-UX: mount and filesystem options for best performance

For redologs (origlog and mirrlog) use 1kb blocksize.

o MaxDB

Use 8kb Blocksize for all database filesystems.

o DB2

Use 4kb Blocksize for all database filesystems

o How to check filesystem blocksize on HP-UX:

fstyp -v <Logical Volume> | grep f_frsize)

(e.g. fstyp -v /dev/vg00/lvol3 | grep f_frsize)

o How to create filesystems:

(For 8kb blocksize)

newfs -F vxfs -b 8192 -o largefiles /dev/<VG Name>/r<LV Name>

(For 4kb blocksize)

newfs -F vxfs -b 4096 -o largefiles /dev/<VG Name>/r<LV Name>

(For 1kb blocksize)

newfs -F vxfs -b 1024 -o largefiles /dev/<VG Name>/r<LV Name>

I want to use direct I/O

Direct I/O is usually the faster configuration for SAP systems.

How to use direct I/O:

o NOTE: The "OnlineJFS" product is required to use direct I/O. Thefollowing command can be used to check OnlineJFS is installed:

# swlist -l product |grep -i onlinejfs

o Make sure the correct blocksizes are being used, see the section"setting the correct blocksizes" above.

o For Oracle:

- Use the following mount options in /etc/fstab:convosync=direct,mincache=direct,delaylog,nodatainlog

- Do this for sapdata's and redologs (origlog's and mirrlog's).

Page 3: 1077887 - HP-UX Mount and File System Options for Best Performance

26.05.2008 Page 3 of 5

Note 1077887 - HP-UX: mount and filesystem options for best performance

Other filesystems should keep their default options (i.e.buffered I/O).

o For DB2/MaxDB:

- Use the following mount options in /etc/fstab: convosync=direct,delaylog,nodatainlog

- Do this for database filesystems (e.g. sapdata's). Otherfilesystems should keep their default options (i.e. bufferedI/O).

o For systems with >=40GB Memory set the buffercache/filecache to 1%of Physical Memory (since the cache is not used by direct I/O).e.g. dbc_max_pct=dbc_min_pct=1 (HP-UX 11.11/11.23) orfilecache_min=filecache_max=1 (HP-UX 11.31)

Technical notes:

o The "convosync=direct" option handles any reads or writes with theO_SYNC or O_DSYNC flags

o The "mincache=direct" option handles the reads or writes withoutthe O_SYNC flag.

o (For Oracle) Oracle opens files with the "O_DSYNC" flag, so forthis the "convosync=direct" option is needed.

o The "mincache=direct" option is needed to force other applicationsto use direct I/O, e.g. a backup program. As a result this optionhas the biggest impact when used on the sapdata filesystems.

Oracle and DBVERIFY:If you use DBVERIFY (which you're probably doing if not using RMAN forbackups) then it is not recommended to use the "mincache=direct" option,since the many small logical reads from DBVERIFY typically benefit morefrom the caching and read-ahead features of buffered I/O. However, withcareful configuration it is possible to combine direct I/O for backup andbuffered I/O for DBVERIFY by making "discovered_direct_iosz" entries forthe relevant filesystems in /etc/vx/tunefstab.

e.g. # cat /etc/vx/tunefstab /dev/vgXX/lvolXX discovered_direct_iosz=128K ... ..

NOTE: In this case it is important that the read request size of the backupsoftware is on or above the limit defined in tunefstab.

Please contact your backup software support representative for advice onconfiguring backup with direct I/O.

For more information on the above options please see "man tunefstab" and"man mount_vxfs"

I want to use buffered I/O

Page 4: 1077887 - HP-UX Mount and File System Options for Best Performance

26.05.2008 Page 4 of 5

Note 1077887 - HP-UX: mount and filesystem options for best performance

Buffered I/O is the HP-UX Operating System default configuration.

How to use buffered I/O:

o Make sure the correct blocksizes are being used, see the section"setting the correct blocksizes" above.

o Use the following mount options in /etc/fstab:delaylog,nodatainlog

o Do this for sapdata's and redologs (origlog's and mirrlog's) Usethe buffercache/filecache recommendations from note 172747

Technical notes:

o In some cases a BW/BI system might benefit from using buffered I/Ofor the sapdata filesystems. If this is the case then the"read_pref_io" parameter in /etc/vx/tunefstab should also beinvestigated. Please contact your HP support representative if youneed advise on configuring this option.

Other I/O issues which can effect performance

o Optimize the size of HP-UX kernel parameter vx_ninode (VXFS inodecache size)

- For VXFS Version 4.1 set vx_ninode to the value in note 172747(or use the formula "number CPU * 1024" for more exact tuning).

- For VXFS Version 3.x set vx_ninode to 40,000.

- To check VxFS version use:

swlist -l product grep -i "base vxfs"

(If no version number is displayed then version 3.x is installed)

o If vx_ninode has been changed to a fixed value as above, then it ispossible to reduce CPU load by making the vx_ninode cache static. Astatic vx_ninode cache means that the HP-UX OS no longer consumesCPU time trying to free memory by removing old inode cache entries.To make the vx_ninode static the HP-UX kernel parameter"vxfs_ifree_timelag" must be set to -1 (NOTE: a static vx_ninodecache should only be used when the size of vx_ninode has beencarefully defined to avoid extreme/unwanted memory consumption).

Database specific SAP notes on mount options

For more information on mount options and Oracle see SAP note 793113.

For more information on mount options and MaxDB/LiveCache see SAP note993848.

For more information on DB2 configuration see SAP note 147634, in

Page 5: 1077887 - HP-UX Mount and File System Options for Best Performance

26.05.2008 Page 5 of 5

Note 1077887 - HP-UX: mount and filesystem options for best performance

particular the "page size" recommendations in section 4.

Header Data

Release Status: Released for CustomerReleased on: 06.05.2008 11:46:39Priority: Recommendations/additional infoCategory: Performance

Main Component BC-OP-HPX HP-UX

The note is not release-dependent.

Related Notes

Number Short Text

1075118 SAP on HP-UX: FAQ

993848 Direct I/O mount options for liveCache/MaxDB

793113 FAQ: Oracle I/O configuration

147634 DB6: Tips and tricks for creating DB2 tablespaces