To async or not not async

To async or not not async

Post by Adrian Ch » Thu, 17 Aug 2000 04:00:00

I have a situation where I want to perform a whole bunch of writes to a
file (a database) and when they are complete I want them committed to
disk (as much as is possible given that closing or fsyncing may not
necessarily flush all the buffers in the filesystem, disk controller
card, disk drive, etc.).

I am wondering whether, it is quicker to do these writes asynchronously
using say aiowrite64() or even lio_listio64() on AIX (I am not sure
whether there is a POSIX equivalent for that) or synchronously and
whether it makes sense to enable write-through (if it is possible).

I am figuring that that whichever method loads up the disk request queue
the most will prove to be the fastest because more requests in the queue
more for the disk scheduling algorithms in the disk device driver and
the SCSI TCQ queue to work with.  Theoretically the worst performance
would be if you had write-through enabled and performed each write
synchronously.  The disk request queue would never have more than
request in it.  Enabling the write-back cache would enable writes to be
queued up (and possibly combined and merged although I do this in my own
code anyway).  However I also figure that using the async writes also
does more or less the same thing although it obviously depends on the
amount of stuff you are writing, the number of writes (probably would be
between 10 - 20), and the size of the filesystem write buffers.

If the writes are small (probably wouldn't total more than a few KBs but
they are all at different offsets in the same huge file) then I am
guessing that it doesn't make sense for the OS to write-cache them so if
it is possible enable write-through behavior then I am guessing that
that would be better.

Does anyone have any experience in this area?  The only way I know right
now is to try some different methods and find out...



1. Problem adding tty port using 128 Port Async Adapter with 16 port Async Node

This system is  43P-140 AIX 4.2.1.x  with PCI 128 port Async. with 2 16 port

I am tring to add tty ports to my ran system.  When I go to to smit

1)smitty tty
2)Add a TTY
3)tty rs232 Asynchronous Terminal
4)sa3 Available 04-05-22 16-Port RAN EIA-232 for 128-Port Adapter

I then get this error message
1800-109 There are currently no additional
SMIT screen entries available fo this
item  This item may require installation of
additional software before it can be accessed.

I have these files loaded

  devices.pci.4f111b00.asw  COMMITTED  PCI 128-Port Asynchronous
  devices.pci.4f111b00.diag  COMMITTED  RISC PC PCI Async 128 Port
  devices.pci.4f111b00.rte  COMMITTED  PCI 128-Port Asynchronous
  devices.pci.4f111b00.rte  COMMITTED  PCI 128-Port Asynchronous COMMITTED CX Common Adapter Software

 I noticed devices.pci.4f111b00.rte is defferent version I
 ibm web site but failed know how to get it to load twice (newbie).

I also notice I have COMMITTED PCI 8-Port
Asynchronous Adapter
Can not uloaded this smit deinstall reports dependents for these

devices.pci.4f111b00.rte  COMMITTED  PCI 128-Port Asynchronous
devices.pci.4f111b00.diag  COMMITTED  RISC PC PCI Async 128 Port

This may be were the problem is.

Thanks for any help,
Lance Adams

2. pppd(uugetty) does not drop

3. TCP/IP Async network I/O and select(2) is not working correctly

4. USB if

5. Delivery of signals when thread not async safe


7. poll/select not async-signal safe

8. AIX 433 ML08

9. siglongjmp not async-signal-safe?

10. NFS async writes working in 2.4.7 but not 2.4.20

11. Why is localtime_r() not ASYNC-SIGNAL-safe ?

12. More Oracle Async IO

13. async-io API registration for 2.5.29