[HACKERS] Async IO description - Mailing list pgsql-hackers

From Zeugswetter Andreas SARZ
Subject [HACKERS] Async IO description
Date
Msg-id 219F68D65015D011A8E000006F8590C6010A5256@sdexcsrv1.sd.spardat.at
Whole thread Raw
Responses Re: [HACKERS] Async IO description
List pgsql-hackers
> When using aio for file or raw device access the following functions
> have to be used (from sys/aio.h):
>
int     aio_read(int, struct aiocb *);
int     aio_write(int, struct aiocb *);
int     aio_cancel(int, struct aiocb *);
    int     aio_suspend(int, struct aiocb *[]);

    The main advantage is not read ahead or the like (read ahead can be
    accomplished with other means, e.g. separate reader and writer
processes).
    The main advantage is, that a process that calls these for IO will
not
    be suspended by the OPsys, and can therefore do other work
    until the data is available. On fast disks the data will be
available
    before the process time slice (20 - 50 ms) is over !
    A process using normal read or write will have to wait until
    all other processes have consumed their time slice.

    I think the first step should be separate global IO processes,
    these could then in a second step use aio.

    Andreas

pgsql-hackers by date:

Previous
From: "Kent S. Gordon"
Date:
Subject: Re: [HACKERS] Re: [QUESTIONS] How to use memory instead of hd?
Next
From: Zeugswetter Andreas SARZ
Date:
Subject: patch for explain.c that shows index (il secondo)