Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gwYL0-0000FP-Vw for pgsql-admin@arkaria.postgresql.org; Wed, 20 Feb 2019 20:19:27 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gwYKz-0008Nc-Ld for pgsql-admin@arkaria.postgresql.org; Wed, 20 Feb 2019 20:19:25 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gwYKz-0008NT-0a for pgsql-admin@lists.postgresql.org; Wed, 20 Feb 2019 20:19:25 +0000 Received: from resqmta-ch2-11v.sys.comcast.net ([2001:558:fe21:29:69:252:207:43]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gwYKv-0000Qx-Ht for pgsql-admin@lists.postgresql.org; Wed, 20 Feb 2019 20:19:24 +0000 Received: from resomta-ch2-13v.sys.comcast.net ([69.252.207.109]) by resqmta-ch2-11v.sys.comcast.net with ESMTP id wVVDgmZEndcv3wYKqggCNZ; Wed, 20 Feb 2019 20:19:16 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=q20161114; t=1550693956; bh=/CB+f8G9tN3kiCALMUOOTwXkWFEmIaQ93or9SjjvYvs=; h=Received:Received:Received:From:To:Subject:Date:Message-ID: MIME-Version:Content-Type; b=Z3l4q/vnUlODNib7yfZNWmqIoMHlQ2P0yumNe1MRtBi8lE7/6DfEgNJxXwPKGpsi6 JmyWhKSY6wAXFQMKuqCWQ8whYsJbCrIl4Vas8uPtOK0FgltwoTDTNXgXK3KxDp2MPU pvObCXIwfIXOUI6NBo53wV7LgPzP1uGqeWkDJKgBHDT06Cyxv883mwN4ulsKCpVFF1 PTLtj1cgJCLXmAok2ns8fH3W43PXhbSDqGxqJ0Xm0uzzSMCyWzSkqiKNH6jml6Kc15 s18wgMjDwTzsutj/6RO1XdT7CAUW17DwexVr8ragHDljr6gdN4gH9vyvwEe1gbffyL laIig9DN1Dn1Q== Received: from jsievers.comcast.net ([12.30.159.20]) by resomta-ch2-13v.sys.comcast.net with ESMTPA id wYKhga9fJl1cIwYKigTIOZ; Wed, 20 Feb 2019 20:19:14 +0000 X-Xfinity-VAAS: gggruggvucftvghtrhhoucdtuddrgedutddrtdeigddufeehucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuvehomhgtrghsthdqtfgvshhipdfqfgfvpdfpqffurfetoffkrfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhfffgjkfgfgggtgfesthhqredttderjeenucfhrhhomheplfgvrhhrhicuufhivghvvghrshcuoehgshhivghvvghrshduleestghomhgtrghsthdrnhgvtheqnecukfhppeduvddrfedtrdduheelrddvtdenucfrrghrrghmpehhvghlohepjhhsihgvvhgvrhhsrdgtohhmtggrshhtrdhnvghtpdhinhgvthepuddvrdeftddrudehledrvddtpdhmrghilhhfrhhomhepghhsihgvvhgvrhhsudelsegtohhmtggrshhtrdhnvghtpdhrtghpthhtohepkhgruggvkhhoughirhhohhgrnhesghhmrghilhdrtghomhdprhgtphhtthhopehpghhsqhhlqdgrughmihhnsehlihhsthhsrdhpohhsthhgrhgvshhqlhdrohhrghenucevlhhushhtvghrufhiiigvpedt X-Xfinity-VMeta: sc=-100;st=legit Received: from jsievers.enova.com (localhost [127.0.0.1]) by jsievers.comcast.net (Postfix) with ESMTP id 87426260056; Wed, 20 Feb 2019 14:19:07 -0600 (CST) From: Jerry Sievers To: Rohan Kadekodi Cc: pgsql-admin@lists.postgresql.org Subject: Re: Regarding postgreSQL performance on DRAM References: Date: Wed, 20 Feb 2019 14:19:07 -0600 In-Reply-To: (Rohan Kadekodi's message of "Wed, 20 Feb 2019 11:41:39 -0600") Message-ID: <87va1exlfo.fsf@jsievers.enova.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Rohan Kadekodi writes: > Hello, > > I am a researcher in the Storage and Systems Lab at UT Austin. I am > working on analyzing the performance of PostgreSQL on Persistent > Memory. To be more specific, I am trying to analyze the performance > of PostgreSQL-10.5 on a ramdisk device mounted with the ext4 file > system. > > My workload is simple. I=C2=A0 insert 1 million rows into a table with 100 > columns, where each column is 256 bytes in length, and every 10 > inserts are batched into a transaction.=C2=A0 Your test workload qualifies for TOASTing due to the $unrealistically long physical tuple size. Thusly, by default compression is also in-scope and the heavy CPU impact showing up in your performance metrics. Revising the test to substantially reduce or eliminate the burden of toasting and especially compression should help in the I/O measurements. HTH > > On running strace on all the PostgreSQL processes spawned by the > server, I am observing that the total time taken in system calls is > less than 5% of the total time it takes to do the 1 million inserts. > I changed the configuration file to make PostgreSQL as synchronous as > possible, and even then the time spent in system calls is very low.=C2=A0 > > When I run the perf tool to check where the majority time is being > spent, I see that there is a function called pglz_compress() where a > lot of time is getting spent and also there is a function called > heap_compute_data_size() where there is significant time spent.=C2=A0 > > Could I know why so much time is being spent in user space, and how I > can make PostgreSQL more I/O bound than it is now? > > Thanks! > - Rohan > > --=20 Jerry Sievers Postgres DBA/Development Consulting e: postgres.consulting@comcast.net