Re: PostgreSQL on SMP Architectures

From: Arjen van der Meijden
Subject: Re: PostgreSQL on SMP Architectures
Date: ,
Msg-id: 4B782EE0.6070203@tweakers.net
(view: Whole thread, Raw)
In response to: PostgreSQL on SMP Architectures  (Reydan Cankur)
List: pgsql-performance

Tree view

PostgreSQL on SMP Architectures  (Reydan Cankur, )
 Re: PostgreSQL on SMP Architectures  (Arjen van der Meijden, )
 Re: PostgreSQL on SMP Architectures  (Scott Marlowe, )
  Re: PostgreSQL on SMP Architectures  (Reydan Cankur, )
   Re: PostgreSQL on SMP Architectures  (Boszormenyi Zoltan, )
 Re: PostgreSQL on SMP Architectures  ("Kevin Grittner", )

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
>


pgsql-performance by date:

From: Boszormenyi Zoltan
Date:
Subject: Re: PostgreSQL on SMP Architectures
From: AI Rumman
Date:
Subject: Why primary key index are not using in joining?