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 1hr7w5-0000ZB-6f for pgsql-general@arkaria.postgresql.org; Fri, 26 Jul 2019 21:39:33 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hr7w3-0001Nf-Vk for pgsql-general@arkaria.postgresql.org; Fri, 26 Jul 2019 21:39:31 +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 1hr7w3-0001NY-IH for pgsql-general@lists.postgresql.org; Fri, 26 Jul 2019 21:39:31 +0000 Received: from mail-qk1-x742.google.com ([2607:f8b0:4864:20::742]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hr7vw-00028X-0h for pgsql-general@lists.postgresql.org; Fri, 26 Jul 2019 21:39:30 +0000 Received: by mail-qk1-x742.google.com with SMTP id d15so40125078qkl.4 for ; Fri, 26 Jul 2019 14:39:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=BOVFvi1vURH/35eE5myurQnqaxUSVrsEn7h4FSUtKbE=; b=XKSYk9o1wOVkmGJPOAqhxuIXw0GAtU4FDOvgBPt9PeB36sSYc2Y51y4if8Y6MdRZiq bRfVcvcv59EQrRMqdF8g7H1q88TTucAk52NB8ThlS2cTFyMIlAAl0PAJdcsSuxnSiIPs 66keP14vYv2N2xb1eTVoQ26ETfMvP8Gf9eqVrH2lXkCAxq6fvoMfw+fR0jBjoUhppySD W9ONzY06WcdSmkTmyIU8IdBRiDDR6Ru54lFeZ9WLSZA8VNkPIhJytIbGcodQ3fLOdxb+ Z/VJLuisKgZtXgAnJ0z5baxJfKVEXLWATCZCDXxwik3EgSAMJxLYAL0BvKKaEXXvOnen 64xQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=BOVFvi1vURH/35eE5myurQnqaxUSVrsEn7h4FSUtKbE=; b=te8cbVtEb7XmA2IO5JVx+6lkROfqYtdyBu1JRdbvF6SCUtSwBjmoiEiUc0scJJsVHL v9VpJM7GHYAmFrQyFNCd5syG8MYNnepYydBfMQ612K88ZvuVbs7wAueedCfvedd+Ce2H old3+SMoL0XPudq3QM6icnXUrN/da0C4naCVplSZIBcaC8INiNucKlISH95k77BktCqj fsV+GPaFrVy/IYEKH60ZrfQrJH4Uqj7lkxlY1os9J4xQL6OsG5ySITimLUBCrXyryfES IiW71eQiJFyGUMGCYMrD/0KWYPO6DBrXF89N9uEpIoIuqNorqGsNdLdxTH2wSWlLva4V Ww4w== X-Gm-Message-State: APjAAAXkFbhWLicmOl5l/TFOzSmsKbJQ4ZXVplwUbPooLbkxwJBHz7/s YXkyrA99OuPtmeRIngO6obZbrA== X-Google-Smtp-Source: APXvYqyReCdZB5zgu3WaIky4hAB8uE6TT9jTwOpL895P1EtfiwsJl1jKEB3nkk/LOfs0KRZfR0h94Q== X-Received: by 2002:a05:620a:52e:: with SMTP id h14mr66680988qkh.358.1564177161352; Fri, 26 Jul 2019 14:39:21 -0700 (PDT) Received: from nimloth.alvh.no-ip.org ([179.56.52.252]) by smtp.gmail.com with ESMTPSA id z1sm24890797qke.122.2019.07.26.14.39.20 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Fri, 26 Jul 2019 14:39:20 -0700 (PDT) Received: by nimloth.alvh.no-ip.org (Postfix, from userid 1000) id 84C39120BF9; Fri, 26 Jul 2019 17:39:19 -0400 (-04) Date: Fri, 26 Jul 2019 17:39:19 -0400 From: Alvaro Herrera To: Arya F Cc: Tom Lane , Ron , pgsql-general@lists.postgresql.org Subject: Re: Hardware for writing/updating 12,000,000 rows per hour Message-ID: <20190726213919.GA16850@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2019-Jul-26, Arya F wrote: > I think I can modify my application to do a batch update. Right now the > server has an HDD and it really can't handle a lot of updates and inserts > per second. Would changing to a regular SSD be able to easily do 3000 > updates per second? That's a pretty hard question in isolation -- you need to consider how many indexes are there to update, whether the updated columns are indexed or not, what the datatypes are, how much locality of access you'll have ... I'm probably missing some other important factors. (Of course, you'll have to tune various PG server settings to find your sweet spot.) I suggest that should be measuring instead of trying to guess. A reasonably cheap way is to rent a machine somewhere with the type of hardware you think you'll need, and run your workload there for long enough, making sure to carefully observe important metrics such as table size, accumulated bloat, checkpoint regime, overall I/O activity, and so on. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services