Re: [HACKERS] PG on NFS may be just a bad idea

2007-10-09 Thread Simon Riggs
On Mon, 2007-10-01 at 19:25 -0400, Tom Lane wrote:
 Simon Riggs [EMAIL PROTECTED] writes:
  http://blogs.netapp.com/dave/2007/08/oracle-optimize.html
 
 Not a whole lot of technical content there, but pretty interesting
 nonetheless.  I *think* that the issues we're seeing are largely in the
 NFS client-side kernel code, so bypassing that stack as Oracle is doing
 might eliminate the problem.  Of course, there's a sizable amount of
 code to be written to do that ...

Yeh, that would take a while.

I thought of another reason to do that also.

If you put a tablespace on an NFS mount and the remote server crashes,
it sounds like there could be a window of potential data loss. We could
guard against that by recovering the tablespace, but we don't do that
unless the local server crashes. 

So having your own NFS client would allow you to tell that the link had
dropped and needed to be recovered.

-- 
  Simon Riggs
  2ndQuadrant  http://www.2ndQuadrant.com


---(end of broadcast)---
TIP 6: explain analyze is your friend


Re: [HACKERS] PG on NFS may be just a bad idea

2007-10-08 Thread Bruce Momjian
Alvaro Herrera wrote:
 Tom Lane wrote:
  Simon Riggs [EMAIL PROTECTED] writes:
   http://blogs.netapp.com/dave/2007/08/oracle-optimize.html
  
  Not a whole lot of technical content there, but pretty interesting
  nonetheless.  I *think* that the issues we're seeing are largely in the
  NFS client-side kernel code, so bypassing that stack as Oracle is doing
  might eliminate the problem.  Of course, there's a sizable amount of
  code to be written to do that ...
 
 Yeah.  Next step we will be writing our own malloc.

I assume there should be a ;-) in there because we already have our own
malloc (palloc).

-- 
  Bruce Momjian  [EMAIL PROTECTED]http://momjian.us
  EnterpriseDB http://postgres.enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +

---(end of broadcast)---
TIP 9: In versions below 8.0, the planner will ignore your desire to
   choose an index scan if your joining column's datatypes do not
   match


Re: [HACKERS] PG on NFS may be just a bad idea

2007-10-08 Thread Alvaro Herrera
Bruce Momjian wrote:
 Alvaro Herrera wrote:
  Tom Lane wrote:
   Simon Riggs [EMAIL PROTECTED] writes:
http://blogs.netapp.com/dave/2007/08/oracle-optimize.html
   
   Not a whole lot of technical content there, but pretty interesting
   nonetheless.  I *think* that the issues we're seeing are largely in the
   NFS client-side kernel code, so bypassing that stack as Oracle is doing
   might eliminate the problem.  Of course, there's a sizable amount of
   code to be written to do that ...
  
  Yeah.  Next step we will be writing our own malloc.
 
 I assume there should be a ;-) in there because we already have our own
 malloc (palloc).

Yeah, some sort of smiley should be there.  But what I'm talking about
is rewriting the underlying memory allocation mechanism, just like we
would be rewriting the NFS client.

palloc uses malloc underneath.  My thought is to replace that with
sbrk, mmap or something like that.  Not very portable though, a lot of
work, and most likely not nearly enough benefits.

-- 
Alvaro Herrera   http://www.PlanetPostgreSQL.org/
Nadie esta tan esclavizado como el que se cree libre no siendolo (Goethe)

---(end of broadcast)---
TIP 9: In versions below 8.0, the planner will ignore your desire to
   choose an index scan if your joining column's datatypes do not
   match


Re: [HACKERS] PG on NFS may be just a bad idea

2007-10-08 Thread Neil Conway
On Mon, 2007-10-08 at 16:50 -0400, Alvaro Herrera wrote:
 palloc uses malloc underneath.  My thought is to replace that with
 sbrk, mmap or something like that.  Not very portable though, a lot of
 work, and most likely not nearly enough benefits.

Yeah, I agree this isn't likely to be a win in the general case.
However, it would be interesting to explore a specialized allocator for
short-lived memory contexts, where we don't care about having an
effective pfree(). If the context is going to be reset or deleted
shortly anyway, we could probably optimize and simplify palloc() by
skipping free space accounting and then make pfree() a no-op. I recall
Tom mentioning something to this effect a few months back...

-Neil



---(end of broadcast)---
TIP 3: Have you checked our extensive FAQ?

   http://www.postgresql.org/docs/faq


Re: [HACKERS] PG on NFS may be just a bad idea

2007-10-01 Thread Josh Berkus

Tom,


Maybe we need to actively discourage people from running Postgres
against NFS-mounted data directories.  Shane Kerr's paper cited above
mentions some other rather scary properties, including O_EXCL file
creation not really working properly.


Wouldn't you be describing a Linux-specific issue, though?  And possibly 
kernel-specific?


It's hard to reconcile this with the real-world performance of 
PostgreSQL on NFS, which is happening all over the place.  Most notably, 
Joe Conway's 20,000 txn/sec.


I *do* think it's an accurate statement that if you're going to use 
Postgres, or any other OLTP database, on NFS you'd better have access to 
a NAS expert.  But to say that it's a bad idea even if you have expert 
help is probably going to far.


--Josh Berkus

---(end of broadcast)---
TIP 6: explain analyze is your friend


Re: [HACKERS] PG on NFS may be just a bad idea

2007-10-01 Thread Tom Lane
Josh Berkus [EMAIL PROTECTED] writes:
 Maybe we need to actively discourage people from running Postgres
 against NFS-mounted data directories.

 It's hard to reconcile this with the real-world performance of 
 PostgreSQL on NFS, which is happening all over the place.  Most notably, 
 Joe Conway's 20,000 txn/sec.

This is not a question of performance, it is a question of whether you
are willing to tolerate corner-case misbehaviors.

regards, tom lane

---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings


Re: [HACKERS] PG on NFS may be just a bad idea

2007-10-01 Thread Simon Riggs
On Mon, 2007-10-01 at 10:13 -0700, Josh Berkus wrote:

  Maybe we need to actively discourage people from running Postgres
  against NFS-mounted data directories.  Shane Kerr's paper cited above
  mentions some other rather scary properties, including O_EXCL file
  creation not really working properly.
 
 Wouldn't you be describing a Linux-specific issue, though?  And possibly 
 kernel-specific?

Possibly, though if you have any specific refutations of the Kerr paper
then it would be a good idea to air them. It isn't enough to just hint
some exist.

 It's hard to reconcile this with the real-world performance of 
 PostgreSQL on NFS, which is happening all over the place.  Most notably, 
 Joe Conway's 20,000 txn/sec.
 
 I *do* think it's an accurate statement that if you're going to use 
 Postgres, or any other OLTP database, on NFS you'd better have access to 
 a NAS expert.  But to say that it's a bad idea even if you have expert 
 help is probably going to far.

I can see many papers on database performance on NFS, but I don't see
any discussion of potential reliability concerns. If anybody sits near
an NAS expert, it would be great to have that discussion.

I have found some comments that other databases require specific
configuration settings to ensure efficient and correct usage of NFS to
access NAS storage devices. 

-- 
  Simon Riggs
  2ndQuadrant  http://www.2ndQuadrant.com


---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings


Re: [HACKERS] PG on NFS may be just a bad idea

2007-10-01 Thread Simon Riggs
On Mon, 2007-10-01 at 19:36 +0100, Simon Riggs wrote:

  I *do* think it's an accurate statement that if you're going to use 
  Postgres, or any other OLTP database, on NFS you'd better have access to 
  a NAS expert.  But to say that it's a bad idea even if you have expert 
  help is probably going to far.
 
 I can see many papers on database performance on NFS, but I don't see
 any discussion of potential reliability concerns. If anybody sits near
 an NAS expert, it would be great to have that discussion.

http://blogs.netapp.com/dave/2007/08/oracle-optimize.html

-- 
  Simon Riggs
  2ndQuadrant  http://www.2ndQuadrant.com


---(end of broadcast)---
TIP 1: if posting/reading through Usenet, please send an appropriate
   subscribe-nomail command to [EMAIL PROTECTED] so that your
   message can get through to the mailing list cleanly


Re: [HACKERS] PG on NFS may be just a bad idea

2007-10-01 Thread Tom Lane
Simon Riggs [EMAIL PROTECTED] writes:
 http://blogs.netapp.com/dave/2007/08/oracle-optimize.html

Not a whole lot of technical content there, but pretty interesting
nonetheless.  I *think* that the issues we're seeing are largely in the
NFS client-side kernel code, so bypassing that stack as Oracle is doing
might eliminate the problem.  Of course, there's a sizable amount of
code to be written to do that ...

regards, tom lane

---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster


Re: [HACKERS] PG on NFS may be just a bad idea

2007-10-01 Thread Alvaro Herrera
Tom Lane wrote:
 Simon Riggs [EMAIL PROTECTED] writes:
  http://blogs.netapp.com/dave/2007/08/oracle-optimize.html
 
 Not a whole lot of technical content there, but pretty interesting
 nonetheless.  I *think* that the issues we're seeing are largely in the
 NFS client-side kernel code, so bypassing that stack as Oracle is doing
 might eliminate the problem.  Of course, there's a sizable amount of
 code to be written to do that ...

Yeah.  Next step we will be writing our own malloc.

-- 
Alvaro Herrerahttp://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

---(end of broadcast)---
TIP 4: Have you searched our list archives?

   http://archives.postgresql.org


Re: [HACKERS] PG on NFS may be just a bad idea

2007-09-29 Thread Zdenek Kotala

Tom Lane wrote:



If this is what's happening I'd claim it is a kernel bug, but seeing
that I see it on FC6 and Miya sees it on Solaris 10, it would be a bug
widespread enough that we'd not be likely to get it killed off soon.



I think my colleague was solving similar issue in JavaDB. IIRC the 
problem is in how NFS works and conclusion was do not use JavaDB (Derby) 
on NFS. I forwarded this issue to our NFS gurus and  I will send updated 
information.


Zdenek

---(end of broadcast)---
TIP 6: explain analyze is your friend