Received: from zok.sgi.com (zok.SGI.COM [204.94.215.101]) by postgresql.org (8.11.3/8.11.4) with ESMTP id fB5Mwum08966 for ; Wed, 5 Dec 2001 17:58:56 -0500 (EST) (envelope-from florin@sgi.com) Received: from relay1.corp.sgi.com (spindle.corp.sgi.com [198.29.75.13]) by zok.sgi.com (8.11.4/8.11.4/linux-outbound_gateway-1.1) with ESMTP id fB5MwvA25528 for <@external-mail-relay.sgi.com:pgsql-admin@postgresql.org>; Wed, 5 Dec 2001 14:58:57 -0800 Received: from stantz.corp.sgi.com (stantz.corp.sgi.com [130.62.175.86]) by relay1.corp.sgi.com (980427.SGI.8.8.8/970903.SGI.AUTOCF) via ESMTP id OAA76042 for ; Wed, 5 Dec 2001 14:58:57 -0800 (PST) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by stantz.corp.sgi.com (Postfix) with ESMTP id 1F253136431 for ; Wed, 5 Dec 2001 14:58:57 -0800 (PST) Subject: optimizing for fast INSERTs From: Florin Andrei To: pgsql-admin@postgresql.org Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Mailer: Evolution/1.0 (Preview Release) Date: 05 Dec 2001 14:58:57 -0800 Message-Id: <1007593137.2471.6.camel@stantz.corp.sgi.com> Mime-Version: 1.0 X-Archive-Number: 200112/34 X-Sequence-Number: 2758 After running several tests with PostgreSQL-7.1.3 versus some other opensourced SQL servers, i was very pleased by its performance when it comes to SELECTs on multiple large tables. But there's a problem: if i use PostgreSQL as a SQL backend for Snort, running Snort as a network sniffer and logging all relevant information about IP packets into the database, i see a lot of packet drops. Basically, once the traffic is higher that a certain limit, and once PostgreSQL starts eating up 100% CPU time, it starts missing packets. On the same hardware, sniffing the same traffic, using other SQL servers as backends, the CPU usage is smaller and i don't see any packet drops (but then i'm missing PostgreSQL capabilities). Snort is using just one database, and has several tables in it; each table has 5...10 columns, each column is an integer type. In this SQL structure, Snort is doing a lot of INSERTs, very fast. In these conditions, i need to make PostgreSQL as fast as it can be. I already tried "fsync = false", but it's not enough. It looks like i have to use every trick in the book to speed it up. Can you give me some suggestions on something else i can try? -- Florin Andrei "Engineering does not require science." - Linus Torvalds