Consultor Eletrônico



Kbase 20687: Why More APWs are Needed When Using -directio?
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   10/15/2008
Status: Unverified

GOAL:

Why More APWs are Needed When Using -directio?

GOAL:

How does -directio impact APWs?

GOAL:

How does -directio impact writes?

FACT(s) (Environment):

UNIX

FIX:

The reason that more Asynchronous Page Writers (APW) are needed when using the Direct I/O (-directio) startup parameter in UNIX is that the APWs take longer to do the write operations. Because the parameter's write() call locks the process until the data have been written to disk, APWs slow up processing. Meanwhile, more of them are necessary because each APW is doing fewer writes.

An APW is a background process whose job is to write updated database blocks to disk as needed so that servers do not have to take the time to do these writes.
Without the use of the -directio parameter, the apw write() calls return when the data has been copied to the operating system buffer, consequently less process time is taken.

The additional time it takes an APW to do a database write when the -directio parameter is used happens because the write, rather than simply updating the OS filesystem cache, also pushes the data out to the disk sub-system. This increases what is called the I/O service time for each individual write rather significantly.

It is this increased time that makes it very critical to have enough APWs in use, and it is what makes buffers flushed at checkpoint so costly. Too few a number of APWs results in buffers flushed at checkpoints (more expensive when -directio is in use).

In extreme cases, -directio can require as many as 24 to 48 APWs, although you can expect no more than 8 for most production systems.