Re: BUG #4919: CREATE USER command slows down system performance

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Lauris Ulmanis <lauris(dot)ulmanis(at)mykoob(dot)com>
Cc: "'Heikki Linnakangas'" <heikki(dot)linnakangas(at)enterprisedb(dot)com>, pgsql-bugs(at)postgresql(dot)org, pgsql-performance(at)postgresql(dot)org
Subject: Re: BUG #4919: CREATE USER command slows down system performance
Date: 2009-07-15 14:02:09
Message-ID: 20090715140209.GF4551@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-performance

Lauris Ulmanis wrote:
> Hello again!
>
> I did test on my local test server
>
> I created up 500 000 users in function loop very quickly - within 48
> seconds. I did again this script reaching up to 1 billion users - results
> was the same - 48 seconds. It is very quickly.
>
> But problem seems is with transaction preparation because if in database is
> 1 billion users and I want to create 1 new - it will take 4 seconds!
>
> After that I generated up to 2 billion users in this server (generation
> process took just 1.44 minutes of times - again quickly).
>
> And did 1 user creation again - now it took 9 seconds of time!
>
> What is a reason of this slowness? Is there a workaround or solution how to
> avoid it?

My bet is on the pg_auth flat file. I doubt we have ever tested the
behavior of that code with 1 billion users ...

Do you really need 1 billion users? Are you planning on giving accounts
to every human being in the planet or what? I mean, what's the point of
this test?

--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message toruvinn 2009-07-15 14:21:16 Re: BUG #4919: CREATE USER command slows down system performance
Previous Message Franklin Haut 2009-07-15 13:55:59 Unknown winsock error 10061

Browse pgsql-performance by date

  From Date Subject
Next Message toruvinn 2009-07-15 14:21:16 Re: BUG #4919: CREATE USER command slows down system performance
Previous Message Marc Cousin 2009-07-15 13:53:36 Re: Very big insert/join performance problem (bacula)