Thread: [QUESTION]Concurrent Access

[QUESTION]Concurrent Access

From
"Leví Teodoro da Silva"
Date:
Hi guys, How are you ?


I am from Brazil and i work for a little company and it company is working is medium-big project and we want to use PostGree like the DataBase system, but i got some questions.
I want to know if the PostGree has limitations about the concurrent access, because a lot of people will access this database at the same time.
I want to know about the limitations, like how much memory do i have to use !? How big could be my database and how simultaneously access this database support ?



Thanks for attention,
Regards,
Levi

Re: [QUESTION]Concurrent Access

From
Devrim GÜNDÜZ
Date:
On Wed, 2008-07-02 at 15:31 -0300, Leví Teodoro da Silva wrote:
> we want to use PostGree like the DataBase system,
> but i got some questions.

First of all: Please learn the correct spelling: It is PostgreSQL, or
Postgres.

> I want to know if the PostGree has limitations about the concurrent
> access, because a lot of people will access this database at the same
> time.

PostgreSQL does not force a limit on concurrent access, but it is
dependent on your hardware, network, etc.

> I want to know about the limitations, like how much memory do i have
> to use !?

It depends on the size of your database. See the link below.

> How big could be my database

Depends on your disk ;) There is no PostgreSQL limitation for that.
Well, there is a limit for tables, etc:

http://www.postgresql.org/docs/faqs.FAQ.html#item4.4

-HTH.
--
Devrim GÜNDÜZ
devrim~gunduz.org, devrim~PostgreSQL.org, devrim.gunduz~linux.org.tr
                   http://www.gunduz.org


Attachment

Re: [QUESTION]Concurrent Access

From
"Scott Marlowe"
Date:
On Wed, Jul 2, 2008 at 12:31 PM, Leví Teodoro da Silva
<tlevisilva@gmail.com> wrote:
> Hi guys, How are you ?
>
>
> I am from Brazil and i work for a little company and it company is working
> is medium-big project and we want to use PostGree like the DataBase system,
> but i got some questions.
> I want to know if the PostGree has limitations about the concurrent access,
> because a lot of people will access this database at the same time.
> I want to know about the limitations, like how much memory do i have to use
> !? How big could be my database and how simultaneously access this database
> support ?

There is a limit that's basically determined by the machine you're
running on.  Each live connection uses a bit of memory itself and
there can be a few thundering herd issues with a lot of connections.
that said, a big server, properly configured can handle several
hundred to a few thousand connections at once.  We have simple little
session servers that store most of what they do in memory and handle
around 700 connections with a single SATA hard drive.  The data is
disposable so fsync is off and we can just rebuilt one from an image
in minutes if need be.

Re: [QUESTION]Concurrent Access

From
PFC
Date:
> I want to know if the PostGree has limitations about the concurrent
> access,
> because a lot of people will access this database at the same time.

    PostgreSQL has excellent concurrency provided you use it correctly.

    But what do you mean by concurrent access ?

    * Number of opened Postgres connections at the same time ?
    => each one of those uses a little bit of RAM. (see manual) but if idle
they don't use CPU.

    * Number of opened transactions at the same time ?
    (between BEGIN and COMMIT)
    If your transactions are long and you have many transactions at the same
time you can get lock problems, for instance transaction A updates row X
and transaction B updates the same row X, one will have to wait for the
other to commit or rollback of course. If your transactions last 1 ms
there is no problem, if they last 5 minutes you will suffer.

    * Number of queries executing at the same time ?
    This is different from above, each query will eat some CPU and IO
resources, and memory too.

    * Number of concurrent HTTP connections to your website ?
    If you have a website, you will probably use some form of connection
pooling, or lighttpd/fastcgi, or a proxy, whatever, so the number of open
database connections at the same time won't be that high. Unless you use
mod_php without connection pooling, in that case it will suck of course,
but that's normal.

    * Number of people using your client ?
    See number of idle connections above. Or use connection pool.

> I want to know about the limitations, like how much memory do i have to
> use

    That depends on what you want to do ;)

> How big could be my database ?

    That depends on what you do with it ;)

    Working set size is more relevant than total database size.

    For instance if your database contains orders from the last 10 years, but
only current orders (say orders from this month) are accessed all the
time, with old orders being rarely accessed, you want the last 1-2 months'
worth of orders to fit in RAM for fast access (caching) but you don't need
RAM to fit your entire database.
    So, think about working sets not total sizes.

    And there is no limit on the table size (well, there is, but you'll never
hit it). People have terabytes in postgres and it seems to work ;)

Re: [QUESTION]Concurrent Access

From
Chris Browne
Date:
tlevisilva@gmail.com ("Leví Teodoro da Silva") writes:
> Hi guys, How are you ?
> I am from Brazil and i work for a little company and it company is working is medium-big project and we want to use
PostGreelike the DataBase 
> system, but i got some questions.
> I want to know if the PostGree has limitations about the concurrent access, because a lot of people will access this
databaseat the same time. 
> I want to know about the limitations, like how much memory do i have to use !? How big could be my database and how
simultaneouslyaccess this 
> database support ?

PostGree is a system I am not familiar with; this list is for
discussion of PostgreSQL, sometimes aliased as "Postgres," so I will
assume you are referring instead to PostgreSQL.

PostgreSQL does have limitations; each connection spawns a process,
and makes use of its own "work_mem", which has the result that the
more connections you configure a particular backend to support, the
more memory that will consume, and eventually your system will
presumably run out of memory.

The size of the database doesn't have as much to do with how many
users you can support as does the configuration that you set up.
--
select 'cbbrowne' || '@' || 'linuxfinances.info';
http://cbbrowne.com/info/lsf.html
Rules  of the  Evil Overlord  #145. "My  dungeon cell  decor  will not
feature exposed pipes.  While they add to the  gloomy atmosphere, they
are good  conductors of vibrations and  a lot of  prisoners know Morse
code." <http://www.eviloverlord.com/>

Re: [QUESTION]Concurrent Access

From
"Leví Teodoro da Silva"
Date:
Hi guys !!!

Sorry for the wrong spelling. =)
I could see that PostgreSQL will support my application, but i have to do a good configuration on my server.

Thanks for answers, now i will look for informations about PostgreSQL on OpenSolaris 2008.05
Have a nice week,
Levi


2008/7/4 Chris Browne <cbbrowne@acm.org>:
tlevisilva@gmail.com ("Leví Teodoro da Silva") writes:
> Hi guys, How are you ?
> I am from Brazil and i work for a little company and it company is working is medium-big project and we want to use PostGree like the DataBase
> system, but i got some questions.
> I want to know if the PostGree has limitations about the concurrent access, because a lot of people will access this database at the same time.
> I want to know about the limitations, like how much memory do i have to use !? How big could be my database and how simultaneously access this
> database support ?

PostGree is a system I am not familiar with; this list is for
discussion of PostgreSQL, sometimes aliased as "Postgres," so I will
assume you are referring instead to PostgreSQL.

PostgreSQL does have limitations; each connection spawns a process,
and makes use of its own "work_mem", which has the result that the
more connections you configure a particular backend to support, the
more memory that will consume, and eventually your system will
presumably run out of memory.

The size of the database doesn't have as much to do with how many
users you can support as does the configuration that you set up.
--
select 'cbbrowne' || '@' || 'linuxfinances.info';
http://cbbrowne.com/info/lsf.html
Rules  of the  Evil Overlord  #145. "My  dungeon cell  decor  will not
feature exposed pipes.  While they add to the  gloomy atmosphere, they
are good  conductors of vibrations and  a lot of  prisoners know Morse
code." <http://www.eviloverlord.com/>

--
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance