VX_CONCURRENT flag on vxfs( 5.1 or later) for performance for postgresql?

Lists: pgsql-hackerspgsql-novicepgsql-performance
From: HSIEN-WEN CHU <hsienwen(dot)chu(at)googlemail(dot)com>
To: pgsql-performance(at)postgresql(dot)org, pgsql-hackers(at)postgresql(dot)org, pgsql-novice(at)postgresql(dot)org
Subject: VX_CONCURRENT flag on vxfs( 5.1 or later) for performance for postgresql?
Date: 2011-04-28 03:33:44
Message-ID: BANLkTinBLhq8mYyeVupWz5J02OWfbTK_nA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-novice pgsql-performance

Dear all

When database files are on a VxFS filesystem, performance can be
significantly improved by setting the VX_CONCURRENT cache advisory on
the file according to vxfs document,

my question is that have any tested by this?

#include <sys/fs/vx_ioctl.h>
ioctl(fd, VX_SETCACHE, VX_CONCURRENT);

Regards

HSIEN WEN


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: HSIEN-WEN CHU <hsienwen(dot)chu(at)googlemail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: VX_CONCURRENT flag on vxfs( 5.1 or later) for performance for postgresql?
Date: 2011-04-28 13:25:33
Message-ID: 25785.1303997133@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-novice pgsql-performance

HSIEN-WEN CHU <hsienwen(dot)chu(at)googlemail(dot)com> writes:
> When database files are on a VxFS filesystem, performance can be
> significantly improved by setting the VX_CONCURRENT cache advisory on
> the file according to vxfs document,

Presumably, if whatever behavior this invokes were an unalloyed good,
they'd have just made it the default. The existence of a flag makes
me suppose that there are some clear application-visible downsides.
What are they?

BTW, please do not cross-post the same question to three different lists.

regards, tom lane


From: Greg Smith <greg(at)2ndQuadrant(dot)com>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: VX_CONCURRENT flag on vxfs( 5.1 or later) for performance for postgresql?
Date: 2011-04-29 00:14:16
Message-ID: 4DBA02D8.4050705@2ndQuadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-novice pgsql-performance

On 04/27/2011 11:33 PM, HSIEN-WEN CHU wrote:
> When database files are on a VxFS filesystem, performance can be
> significantly improved by setting the VX_CONCURRENT cache advisory on
> the file according to vxfs document,
>

That won't improve performance, and it's not safe either. VX_CONCURRENT
switches the filesystem to use direct I/O. That's usually slower for
PostgreSQL. And it introduces some requirements for both block
alignment and the application avoiding overlapping writes. PostgreSQL
doesn't do either, so I wouldn't expect it to be compatible with
VX_CONCURRENT.

--
Greg Smith 2ndQuadrant US greg(at)2ndQuadrant(dot)com Baltimore, MD
PostgreSQL Training, Services, and 24x7 Support www.2ndQuadrant.us