pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Arjen van der Meijden <acmmailing@tweakers.net>
To: pgsql-performance@postgresql.org
Subject: Re: PostgreSQL on SMP Architectures
Date: Sun, 14 Feb 2010 18:12:00 +0100
Message-ID: <4B782EE0.6070203@tweakers.net> (raw)
In-Reply-To: <4DA8D3EC-9868-4A6D-8806-F0534C55D2C6@gmail.com>
References: <4DA8D3EC-9868-4A6D-8806-F0534C55D2C6@gmail.com>

Hi Reydan,

PostgreSQL is unaware of the amount of cpu's and cores and doesn't 
really care about that. Its up to your OS to spread the work across the 
system.

Be careful with what you test, normal PostgreSQL cannot spread a single 
query over multiple cores. But it will of course spread its full 
workload of separate queries over the cores (or more precisely, allows 
the OS to do that).

You could tell Linux to disable some cores from the scheduler (or 
perhaps itanium-systems support to disable processors completely), it 
works quite easy. You can just do something like:
echo 0 >> /sys/devices/system/cpu/cpu1/online

This is probably not exactly the same as removing a cpu from the system, 
but may be close enough for your needs. You should be careful which 
cores/cpus you disable, i.e. a supported dual-cpu configuration might 
correspond to cpu's 0 and 7 in a fully populated system, rather than 
just 0 and 1. And even more important, if you'd remove a cpu, you'd 
remove 2 cores and you should disable them together as well (not that 
Linux cares, but it might yield somewhat skewed results).

It is quite hard to benchmark PostgreSQL (or any software) on such a 
system, in the sense that all kinds of scalability issues may occur that 
are not normally ran into with PostgreSQL (simply because most people 
have 16 cores or less in their systems). I'm not sure what to advice to 
you on that matter, we've used a read-mostly internal benchmark that 
scaled quite well to 32 (Sun T2) cores/threads, but that is probably not 
a very realistic benchmark for your system.

The only advice I can give you here is: make sure you understand all 
parts of the system and software well. Benchmarking is hard enough as it 
is, if you don't understand the software and/or system its running on, 
you may mess things up.

Best regards,

Arjen

On 14-2-2010 17:36 Reydan Cankur wrote:
> Hi,
>
> I have seen some work done about scaling PostgreSQL on SMP machines and
> see that PostgreSQL has been executed on several numbers of cores. I
> have some questions about scaling PostgreSQL on SMP architectures.
>
> System Details that I am running PostgreSQL-8.4.0:
> Server: HP Integrity Superdome SD32B
> Processor: Intel Itanium2 1.6 GHz (dual-core)
> Number of processors: 32
> Number of compute cores: 64
> Memory architecture: Shared
> Memory amount: 128 GB
> Disk amount: 4.6 TB
> High performance network: InfiniBand 20 Gbps
> Operating system: RHEL 5.1 IA64
>
> Question 1) How can I run PostgreSQL on 2,4,8,16,32 and 64 cores and get
> performance results?
> I have seen some work about scaling POstgreSQL on SMP architectures and
> in these slides there were performance results for PostgreSQL running on
> different number of cpu cores. I want to execute PostgreSQL for
> different number of cpu cores like 2,4,8,16,32,64 on above server. But I
> do not know how to compile or run PostgreSQL on multiple cpu cores. What
> is the exact command to tell Postgres to run on specified number of
> cores? I need to run Postgres on multiple CPU cores and document this work.
>
> Question 2)Are there any official benchmarks for PostgreSQL performance
> measurements?
>
> I mean when someone wants to run an official performance test on
> PostgreSQL which queries and tables must be used. I have executed my
> queries on a 5 million record table in order to measure performance, but
> I also want to use the official methods.
>
> Question 3) How can I change the allocated memory and measure the
> performance of PostgreSQL?
>
> Thanks for all answers,
>
> Reydan
>



view thread (6+ messages)  latest in thread

Message-ID: <4B782EE0.6070203@tweakers.net>
Permalink:  ../4B782EE0.6070203@tweakers.net/
Also on:    postgresql.org/message-id/4B782EE0.6070203@tweakers.net

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: acmmailing@tweakers.net
  Subject: Re: PostgreSQL on SMP Architectures
  In-Reply-To: <4B782EE0.6070203@tweakers.net>

* 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