Operating System - HP-UX
1834480 Members
3848 Online
110067 Solutions
New Discussion

Asynchronous I/O...how to enable?

 
SOLVED
Go to solution
Jerry Jordak
Advisor

Asynchronous I/O...how to enable?

I have a cluster of five L2000s running HP-UX 11.00 and Oracle databases. While the systems are running fine, the DBA for the systems was wanting to know if asynchronous I/O is configured on the servers.

How do I tell if asynchronous I/O is turned on? On an AIX system, which I've been more used to, asynchronous I/O is turned off by default, but to enable or disable it, you just go into smit and turn it on or off. I haven't found anything similar yet in HP-UX, AFAIK.

I did see there is a kernel parameter called "fs_async" which turns on and off asynchronous writes to disk. Is this the parameter I'm looking for to enable asynchronous I/O? If not, what all do I have to do to activate it? It can require a reboot if necessary.

Thanks!
7 REPLIES 7
Rainer_1
Honored Contributor
Solution

Re: Asynchronous I/O...how to enable?

You are right, the fs_async parameter controls the disk IO behavior.

SAM help says:
fs_async specifies whether or not asychronous writing of file-system data structures to disk is allowed. If no value for
fs_async is specified, synchronous writes are used.

Synchronous writes to disk make it easier to restore file system integrity if a system crash occurs while file system data
structures are being updated on the file system.

If asynchronous writes are selected, HP-UX file system semantics for NFS cluster environments are preserved. In
addition, files opened using open() with the 0_SYNC flag (synchronous writing) will continue to be written synchronously
when the asynchronous-writes feature has been configured into the kernel.

Asynchronous writes to disk can improve file system performance significantly. However, asynchronous writes can leave
file system data structures in an inconsistent state in the event of a system crash. For more information about when to
select synchronous or asynchronous writing, refer to the explanatory text later in this help page.
Alexander M. Ermes
Honored Contributor

Re: Asynchronous I/O...how to enable?

Hi there.
I think, that is the one.
Ask your dba, whether he wants to work with
raw devices. Otherwise don't go for this async
writing. What he would need that for, is setting up log files on raw devices.
Tell him, that this is very tricky,
especially for a restore, if you do not use OmniBack II with the backup of raw devices.
Rgds
Alexander M. Ermes
.. and all these memories are going to vanish like tears in the rain! final words from Rutger Hauer in "Blade Runner"
James R. Ferguson
Acclaimed Contributor

Re: Asynchronous I/O...how to enable?

Hi:

Yes, fs_async controls whether or not asychronous writing of file-system data structures to disk is allowed. The default is to use synchronous IO.

You can tell if its on (unlikely) with SAM, 'sysdef', or 'kmtune' (on HP 11.0). Use SAM to turn it on if you want (see the second URL below).

For a guide to kernel parameters in HP-UX, see:

http://docs.hp.com/hpux/onlinedocs/os/KCparams.OverviewAll.html

See also, this thread:

http://forums.itrc.hp.com/cm/QuestionAnswer/1,1150,0xf4ab14a24fd1d4118fef0090279cd0f9,00.html

...JRF...
DIPAK KUMAR ROY
Frequent Advisor

Re: Asynchronous I/O...how to enable?

Hi,

You can enable Async I/O by creating a device file called "/dev/async" and enable the same in kernel. Details as below:

Execute following commands as "root":

#mknod /dev/async c 101 0x000004
#chown sybase:sys /dev/async (if you are using SYBASE as your database)
#chmod o-rw /dev/async

This will create the device file needed.
And on the KERNEL side:

1. Edit the file "/stand/system" and give an entry for async i/o:

asyncdsk
asyncdsk_included

2. Rebuild the KERNEL and reboot the system. (Make sure that you have a copy of your running KERNEL).

#mk_kernel -s /stand/system
#kmupdate
# shutdown -yr


Hope this helps you.

Good Luck.

Dipak
Jerry Jordak
Advisor

Re: Asynchronous I/O...how to enable?

Thanks, Dipak. I will try that the next time I'm allowed to take the system down.

As a point of clarification for me, would it be fair to assume that I would need to enable async I/O through the kernel (following your steps) in addition to just changing the fs_async kernel parameter? I'm just trying to understand what difference I (and the database) will see on the system between enabling async I/O through the kernel via your method and simply changing the kernel parameter.
DIPAK KUMAR ROY
Frequent Advisor

Re: Asynchronous I/O...how to enable?

Jerry,

By default system will use SYNC I/O. And your database loading, dumping .... wil be slow ( I am assuming SYBASE....and I guess it will be similar in case of ORACLE also).

Enabling Async I/O will solve this problem.

Dipak
Navin Bhat
Occasional Advisor

Re: Asynchronous I/O...how to enable?

I have several posts stating that fs_async parameter is used to turn on async writes of data.

This is NOT true.
fs_async just enables async write of META data not the data itself.

All's well that ends well