pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Florin Andrei <florin@sgi.com>
To: pgsql-admin@postgresql.org
Subject: optimizing for fast INSERTs
Date: 05 Dec 2001 14:58:57 -0800
Message-ID: <1007593137.2471.6.camel@stantz.corp.sgi.com> (raw)

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




view thread (2+ messages)  latest in thread

Message-ID: <1007593137.2471.6.camel@stantz.corp.sgi.com>
Permalink:  ../1007593137.2471.6.camel@stantz.corp.sgi.com/
Also on:    postgresql.org/message-id/1007593137.2471.6.camel@stantz.corp.sgi.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: florin@sgi.com
  Subject: Re: optimizing for fast INSERTs
  In-Reply-To: <1007593137.2471.6.camel@stantz.corp.sgi.com>
  References: <1007593137.2471.6.camel@stantz.corp.sgi.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox