Re: high io BUT huge amount of free memory - Mailing list pgsql-hackers

From Craig Ringer
Subject Re: high io BUT huge amount of free memory
Date
Msg-id 51A3F844.60102@2ndquadrant.com
Whole thread Raw
In response to Re: high io BUT huge amount of free memory  (Andres Freund <andres@2ndquadrant.com>)
List pgsql-hackers
On 05/03/2013 07:09 AM, Andres Freund wrote:
> We've got that in 9.3 which is absolutely fabulous! But that's not
> related to doing DMA which you cannot (and should not!) do from
> userspace.
You can do zero-copy DMA directly into userspace buffers. It requires
root (or suitable capabilities that land up equivalent to root anyway)
and requires driver support, and it's often a terrible idea, but it's
possible. It's used by a lot of embedded systems, by infiniband, and (if
I vaguely recall correctly) by things like video4linux drivers. You can
use get_user_pages and set the write flag. Linux Device Drivers chapter
15 discusses it.

That said, I think some of the earlier parts of this discussion confused
direct asynchronous I/O with DMA. Within-kernel DMA may be (ok, is) used
to implement DIO, but that doesn't mean you're DMA'ing directly into
userspace buffers.

-- Craig Ringer                   http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services




pgsql-hackers by date:

Previous
From: Craig Ringer
Date:
Subject: Re: pgbench --startup option
Next
From: "Joshua D. Drake"
Date:
Subject: Re: Planning incompatibilities for Postgres 10.0