From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932079Ab1IPRs5 (ORCPT ); Fri, 16 Sep 2011 13:48:57 -0400 Received: from host-215.commandprompt.net ([207.173.203.215]:59903 "EHLO lists.commandprompt.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755660Ab1IPRsy (ORCPT ); Fri, 16 Sep 2011 13:48:54 -0400 X-Greylist: delayed 536 seconds by postgrey-1.27 at vger.kernel.org; Fri, 16 Sep 2011 13:48:54 EDT Content-Type: text/plain; charset=UTF-8 Cc: Matthew Wilcox , Andi Kleen , viro , linux-fsdevel , linux-kernel , robertmhaas , Pg Hackers Subject: Re: [HACKERS] Improve lseek scalability v3 From: Alvaro Herrera To: Andres Freund In-reply-to: <201109161927.34472.andres@anarazel.de> References: <1316128013-21980-1-git-send-email-andi@firstfloor.org> <201109161616.50004.andres@anarazel.de> <20110916153620.GA9913@parisc-linux.org> <201109161927.34472.andres@anarazel.de> Date: Fri, 16 Sep 2011 14:39:50 -0300 Message-Id: <1316194619-sup-2946@alvh.no-ip.org> User-Agent: Sup/git Content-Transfer-Encoding: 8bit X-Assp-Version: 2.0.1(3.2.15) on assp.commandprompt.com X-Assp-Client-TLS: yes X-Assp-ID: assp.commandprompt.com m1-94793-11293 X-Assp-Original-Subject: Re: [HACKERS] Improve lseek scalability v3 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Excerpts from Andres Freund's message of vie sep 16 14:27:33 -0300 2011: > Hi, > On Friday 16 Sep 2011 17:36:20 Matthew Wilcox wrote: > > Does the query planner need to know the exact number of bytes in the file, > > or is it after an order-of-magnitude? Or to-the-nearest-gigabyte? > It depends on where the information is used. For some of the uses it needs to > be exact (the assumed size is rechecked after acquiring a lock preventing > extension) at other places I guess it would be ok if the accuracy got lower > with bigger files (those files won't ever get bigger than 1GB). One other thing we're interested in is portability. I mean, even if Linux were to introduce a new hypothetical syscall that was able to return the file size at a ridiculously low cost, we probably wouldn't use it because it'd be Linux-specific. So an improvement of lseek() seems to be the best option. -- Álvaro Herrera The PostgreSQL Company - Command Prompt, Inc. PostgreSQL Replication, Consulting, Custom Development, 24x7 support From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alvaro Herrera Subject: Re: Improve lseek scalability v3 Date: Fri, 16 Sep 2011 14:39:50 -0300 Message-ID: <1316194619-sup-2946@alvh.no-ip.org> References: <1316128013-21980-1-git-send-email-andi@firstfloor.org> <201109161616.50004.andres@anarazel.de> <20110916153620.GA9913@parisc-linux.org> <201109161927.34472.andres@anarazel.de> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: Matthew Wilcox , Andi Kleen , viro , linux-fsdevel , linux-kernel , robertmhaas , Pg Hackers To: Andres Freund Return-path: In-reply-to: <201109161927.34472.andres@anarazel.de> List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Sender: pgsql-hackers-owner@postgresql.org List-Id: linux-fsdevel.vger.kernel.org Excerpts from Andres Freund's message of vie sep 16 14:27:33 -0300 2011: > Hi, > On Friday 16 Sep 2011 17:36:20 Matthew Wilcox wrote: > > Does the query planner need to know the exact number of bytes in the = file, > > or is it after an order-of-magnitude? Or to-the-nearest-gigabyte? > It depends on where the information is used. For some of the uses it ne= eds to=20 > be exact (the assumed size is rechecked after acquiring a lock preventi= ng=20 > extension) at other places I guess it would be ok if the accuracy got l= ower=20 > with bigger files (those files won't ever get bigger than 1GB). One other thing we're interested in is portability. I mean, even if Linux were to introduce a new hypothetical syscall that was able to return the file size at a ridiculously low cost, we probably wouldn't use it because it'd be Linux-specific. So an improvement of lseek() seems to be the best option. --=20 =C3=81lvaro Herrera The PostgreSQL Company - Command Prompt, Inc. PostgreSQL Replication, Consulting, Custom Development, 24x7 support --=20 Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers