Did this article resolve your question/issue?



Why More APWs are Needed When Using -directio?

« Go Back


TitleWhy More APWs are Needed When Using -directio?
URL Name20687
Article Number000147974
EnvironmentProduct: Progress
Version: 8.x, 9.x
Product: OpenEdge
Version: 10.x, 11.x
Question/Problem Description
Why More APWs are Needed When Using -directio?
How does -directio impact APWs?
How does -directio impact writes?
Steps to Reproduce
Clarifying Information
Error Message
Defect Number
Enhancement Number
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.
Last Modified Date11/20/2020 7:38 AM
Disclaimer The origins of the information on this site may be internal or external to Progress Software Corporation (“Progress”). Progress Software Corporation makes all reasonable efforts to verify this information. However, the information provided is for your information only. Progress Software Corporation makes no explicit or implied claims to the validity of this information.

Any sample code provided on this site is not supported under any Progress support program or service. The sample code is provided on an "AS IS" basis. Progress makes no warranties, express or implied, and disclaims all implied warranties including, without limitation, the implied warranties of merchantability or of fitness for a particular purpose. The entire risk arising out of the use or performance of the sample code is borne by the user. In no event shall Progress, its employees, or anyone else involved in the creation, production, or delivery of the code be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the sample code, even if Progress has been advised of the possibility of such damages.