Re: Connections per second?

From: Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>
To: Alejandro Fernandez <ale(at)e-group(dot)org>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Connections per second?
Date: 2002-04-23 16:19:22
Message-ID: Pine.GSO.4.44.0204231916460.23311-100000@ra.sai.msu.su
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Try

http://www.sai.msu.su/~megera/postgres/pg-bench.pl
(change dbname, first).

Here is data for my notebook (IBM ThinkPad T21, 256 MB RAM, Postgresql 7.2.1)

Testing empty loop speed ...
100000 iterations in 0.1 cpu+sys seconds (833333 per sec)

Testing connect/disconnect speed ...
2000 connections in 2.6 cpu+sys seconds (754 per sec)

Testing CREATE/DROP TABLE speed ...
1000 files in 0.7 cpu+sys seconds (1369 per sec)

Testing INSERT speed ...
500 rows in 0.2 cpu+sys seconds (2272 per sec)

Testing UPDATE speed ...
500 rows in 0.2 cpu+sys seconds (2272 per sec)

Testing SELECT speed ...
100 single rows in 0.1 cpu+sys seconds (1428.6 per sec)

Testing SELECT speed (multiple rows) ...
100 times 100 rows in 0.1 cpu+sys seconds (714.3 per sec)

I'd recommend to use persistent connection for real-life web applications.

Oleg
On Tue, 23 Apr 2002, Alejandro Fernandez wrote:

> Hi,
>
> I'm writing a small but must-be-fast cgi program that for each hit it gets, it reads an indexed table in a postgres database and writes a log to a file based on the result. Any idea how many hits a second I can get to before things start crashing, or queuing up too much, etc? And will postgres be one of the first to fall? Do any of you think it can handle 2000 hits a second (what I think I could get at peak times) - and what would it need to do so? Persistent connections? Are there any examples or old threads on writing a similar program in C with libpq?
>
> Thanks,
>
> Ale
>
>

Regards,
Oleg
_____________________________________________________________
Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
Sternberg Astronomical Institute, Moscow University (Russia)
Internet: oleg(at)sai(dot)msu(dot)su, http://www.sai.msu.su/~megera/
phone: +007(095)939-16-83, +007(095)939-23-83

In response to

Browse pgsql-general by date

  From Date Subject
Next Message David Link 2002-04-23 16:23:34 Why is outer Join way quicker?
Previous Message Lee Kindness 2002-04-23 16:18:18 [BUGS] help!