Find it

Wednesday, December 30, 2009

ZFS logbias property

ZFS logbias property


ZFS Synchronous write bias in short logbias property is to provide a hint to ZFS about handling of synchronous requests in particular dataset. If logging is set to "latency" (the default) ZFS will use pool log devices i.e. ZIL (if configured) to handle the requests at low latency/delay. If logging is set to "throughput" then ZFS will not use configured pool log devices kind of a separated ZIL functionality of ZFS. ZFS will instead optimize synchronous operations for global pool throughput and efficient use of resources.

Basically ZFS logbias is proposed especially for managing performance of Oracle database.
Oracle manages two major types of files, the Data Files and the Redo Log files.
Writes to Redo Log files are in the course of all transactions and low latency/delay is a vital requirement. It is critical for good performance to give high priority to these write requests.
Data Files are also the subject of writes from DB writers as a form of scrubbing dirty blocks to insure DB buffer availability. Write latency/delay is much less an issue. Of more importance is achieving an acceptable level of throughput. These writes are less critical to delivered performance.

Both types of writes are synchronous (using O_DSYNC), and thus treated equally. They compete for the same resources: separate intent log, memory, and normal pool IO. The Data File writes slow down the overall potential performance of the critical Redo Log writers.

So in short - Redo Logs need short latencies/delays, so you would use zfs set logbias=latency oradbsrv1-redo/redologs. The data files of oracle need throughput, so you would configure zfs set logbias=throughput oradbsrv1-data/datafile.

If logbias is set to 'latency' (the default) then there is no change from the current implementation. If the logbias property is set to 'throughput' then intent log blocks will be allocated from the main pool instead of any separate intent log devices (if present). Also data will be written immediately to spread the write load thus making for quicker subsequent transaction group commits to the pool. This is the important change of setting logbias to throughput property.

For Oracle datafiles specifically, using the new setting of Synchronous write bias: Throughput has potential to deliver more stable performance in general and higher performance for redo log sensitive workloads.


REF: 

http://arc.opensolaris.org/caselog/PSARC/2009/423/20090807_neil.perrin

http://www.c0t0d0s0.org/archives/5838-PSARC2009423-ZFS-logbias-property.html

Monday, December 28, 2009

How to expand Solaris Volume Manager filesystem which is exported to zones from Global Zone

Ok, it's been long that no updates on blog... Anyways, Today I'm having some good information on - "How to expand Solaris Volume Manager (Metadevice) filesystem which is exported to zones from Global Zone"

I've a uniqe system which is having little diffrent configuration than other systems. I've SPARC-Enterprise M4000 system and having 2 zones running on it. Here is the zone configuration example for one of them.

# zonecfg -z zone1 info
zonename: zone1
zonepath: /zone1/zonepath
brand: native
autoboot: true
bootargs:
pool: oracpu_pool
limitpriv: default,dtrace_proc,dtrace_user
scheduling-class:
ip-type: shared
[cpu-shares: 32]
fs:
dir: /oracle
special: /dev/md/dsk/d56
raw: /dev/md/rdsk/d56
type: ufs
options: []
fs:
dir: /oradata1
special: /dev/md/dsk/d59
raw: /dev/md/rdsk/d59
type: ufs
options: []
fs:
dir: /oradata2
special: /dev/md/dsk/d62
raw: /dev/md/rdsk/d62
type: ufs
options: []
fs:
dir: /oradata3
special: /dev/md/dsk/d63
raw: /dev/md/rdsk/d63
type: ufs
options: []
[...]


Ok, So here you can see that I've metadevices which are exported to the zone from the global zone. I need to expand one of the filesystem say /oaradata1 by XXG so how am I going to perform this? Take a look at below procedure to understand on how we can do it.

global:/
# zonecfg -z zone1 info fs dir=/oradata1
fs:
dir: /oradata1
special: /dev/md/dsk/d59
raw: /dev/md/rdsk/d59
type: ufs
options: []
global:/
# metattach d59 Storage_LUN_ID 

global:/
# growfs -M /zone1/zonepath/root/oradata1 /dev/md/rdsk/d59


This all operation needs to be performed from global zone.

Sunday, December 20, 2009

Removing ^M from unix text files

Removing ^M from unix text files

Using Perl :

Following command will change the orginal file itself so keep a backup copy .

perl -pi -e "s:^V^M::g"

You won't see the Control V on typing but it is needed to generate control

character ^M.

Using sed :

# sed -e `s/^V^M//g` existing_file_name > new_file_name

Using vi :

Open file in vi and enter the following at : prompt in command mode .

:%s/^V^M//g

BTW There's also a utility dos2unix and unix2dos that you can use to convert characters to and fro DOS and UNIX.

Sunday, December 6, 2009

Small MPxIO tip

This is a relatively undersized tip however equally important on MPxIO.

I was always wondering on how to know that MPxIO is running/enable or not and what all kernel modules it loads when it is enabled and how to identify if MPxIO is enable using MPxIO kernel module.

One way that you can tell if your MPxIO enable or not is -

# stmsboot -L

If MPxIO is not enabled then this command returns message that MPxIO is not enabled which is very straight forward & then using stmsboot –e command to enable to MPxIO, BTW which is always followed by reboot.

Yet another way to know if MPxIO is enabled or not is -

# modinfo |grep -i vhci
22 1338650 15698 189 1 scsi_vhci (SCSI VHCI Driver 1.57)

If this module is loaded then it means MPxIO is running.