Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cWJh7-0001Aa-76 for pgsql-hackers@arkaria.postgresql.org; Wed, 25 Jan 2017 09:16:45 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cWJh6-0004Aj-KC for pgsql-hackers@arkaria.postgresql.org; Wed, 25 Jan 2017 09:16:44 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cWJh5-0004AS-N1 for pgsql-hackers@postgresql.org; Wed, 25 Jan 2017 09:16:43 +0000 Received: from mail-wm0-x244.google.com ([2a00:1450:400c:c09::244]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1cWJgy-0004R4-FB for pgsql-hackers@postgresql.org; Wed, 25 Jan 2017 09:16:42 +0000 Received: by mail-wm0-x244.google.com with SMTP id d140so41321203wmd.2 for ; Wed, 25 Jan 2017 01:16:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=BAWxfz0n5tGvqEavzkwiPZrillTGggVV2iv61MQyR5A=; b=qWYtDGY4TPlYcLzaamWRISJEOcQz/79vvx+HcTMIc2Zoi4E9LdIBsHq9AkjBoUmmgG r1DZfVE9BlXvmzYO4p5H0ydsi0j+xeGvqjCUWzUAa5lp+6acGDhpWoStZFh5Z4XJ14ME izA5szyzGZI0lSXtCQW7j2mqkXA5T3FP50aQC+DKwSgxWxvdG3Zkil77K+LlWnCcbL3H etYlSlI2wLOzstuCJcSY257dCL6Sww0kgrLos20Ud0dUjXg17jD5JtXCjEhCBuWMyGQq SoDumXW02m7jDDVzWw9rtDsEjFkpTprUjkw4u3yqFgTLtU4Ri2fiD6P8DmdRu7Uxw+0n eEFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=BAWxfz0n5tGvqEavzkwiPZrillTGggVV2iv61MQyR5A=; b=FCs6tupTOmOdKAdV2aj2NyfjTuRpTiCbv+JQpkvX3NBujk54MD5IY6AULC8If0GSqz 1v3XaNIVOS8JGcCYQB9rPkj+ZNcDiGYbm7DDBcB0pSoXLtmylaYeK4dJKBMFKCFfCnIU SPSy7hUE54wSpLf0uqx1OiXKorF5T52Snpa4GeE/wEGxN9Bj1J6xlCn6f2g4RYXIWhT0 6MObXTL7QbmSFxozL6cvruNRqpug3W9b/yUEGYoyscDcgqTUPwBGnsyF9YAPSxjh8D+3 y0RHAP9jOyj8nbf3gQBi+x8knwDRI8NGPoFo8pnGJh3ehsto3cgivxbcG9GBl6LtaLBQ CvyA== X-Gm-Message-State: AIkVDXKuP2bgCmV4Xs4bmd30QEWMQ/v+XoPXxVDad5g7/jTHizzBUgacPmQLVTBKhyho+Q== X-Received: by 10.223.133.220 with SMTP id 28mr37246512wru.97.1485335794269; Wed, 25 Jan 2017 01:16:34 -0800 (PST) Received: from [192.168.1.211] (ppp-93-104-163-1.dynamic.mnet-online.de. [93.104.163.1]) by smtp.googlemail.com with ESMTPSA id t103sm22360090wrc.43.2017.01.25.01.16.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 25 Jan 2017 01:16:33 -0800 (PST) Subject: Re: lseek/read/write overhead becomes visible at scale .. To: Andres Freund References: <20170124171841.2n2nzqkuetbivzta@alap3.anarazel.de> <20170124174158.nk6htg7jjmqia7hr@alap3.anarazel.de> <422b4e6c-b7f0-90e0-6f70-389b2d50a848@gmail.com> <20170124181121.pgk7kqfkq4dd3hpo@alap3.anarazel.de> <20170124190705.2ioaocx6wuhvvegn@alap3.anarazel.de> Cc: pgsql-hackers@postgresql.org From: Tobias Oberstein Message-ID: Date: Wed, 25 Jan 2017 10:16:32 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <20170124190705.2ioaocx6wuhvvegn@alap3.anarazel.de> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.7 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org Hi Andres, >> Using pread instead of lseek+read halfes the syscalls. >> >> I really don't understand what you are fighting here .. > > Sure, there's some overhead. And as I said upthread, I'm much less > against this change than Tom. What I'm saying is that your benchmarks > haven't shown a benefit in a meaningful way, so I don't think I can > agree with > >> "Well, my point remains that I see little value in messing with >> long-established code if you can't demonstrate a benefit that's clearly >> above the noise level." >> >> I have done lots of benchmarking over the last days on a massive box, and I >> can provide numbers that I think show that the impact can be significant. > > since you've not actually shown that the impact is above the noise level > when measured with an actual postgres workload. I can follow that. So real prove cannot be done with FIO, but "actual PG workload". Synthetic PG workload or real world production workload? Also: rgd the perf profiles from production that show lseek as #1 syscall. You said it wouldn't be prove either, because it only shows number of syscalls, and though it is clear that millions of syscalls/sec do come with overhead, it is still not showing "above noise" level relevance (because PG is such a CPU hog in itself anyways;) So how would I do a perf profile that would be acceptable as prove? Maybe I can expand our https://gist.github.com/oberstet/ca03d7ab49be4c8edb70ffa1a9fe160c profiling function. Cheers, /Tobias -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers