Re: [PERFORM] Can't get Dell PE T420 (Perc H710) perform better than a MacMini with PostgreSQL

2015-04-08 Thread Pietro Pugni
Ciao Pietro, stavo seguendo thread sulla mailing list Postgresql. Puoi farmi un piccolo riassunto delle conclusioni perchè non sono sicuro di aver capito tutto? Ciao Domenico, sì effettivamente la mailing list è un po’ dispersiva. Utilizzando il collation di tipo “C” il Dell T420 impiega

Re: [PERFORM] Can't get Dell PE T420 (Perc H710) perform better than a MacMini with PostgreSQL

2015-04-07 Thread Pietro Pugni
On Tue, Apr 7, 2015 at 6:27 AM, Pietro Pugni pietro.pu...@gmail.com wrote: Hi Jeff, sorry for the latency but server was down due to a error I made in the sysctl.conf file. Yes, but are the defaults for those two systems? on psql, use \l to see. \l returns the following:

Re: [PERFORM] Can't get Dell PE T420 (Perc H710) perform better than a MacMini with PostgreSQL

2015-04-07 Thread Pietro Pugni
I meant “collation”, not “collection”. Pietro Il giorno 07/apr/2015, alle ore 18:49, Pietro Pugni pietro.pu...@gmail.com ha scritto: On Tue, Apr 7, 2015 at 6:27 AM, Pietro Pugni pietro.pu...@gmail.com wrote: Hi Jeff, sorry for the latency but server was down due to a error I made

Re: [PERFORM] Can't get Dell PE T420 (Perc H710) perform better than a MacMini with PostgreSQL

2015-04-07 Thread Pietro Pugni
Hi Jeff The default collation for the database cluster is set when you create the cluster with initdb (the package you used to install postgresql might provide scripts that wrap initdb and call it something else, sorry I can't be much use with those). You can set it with --lc-collate

Re: [PERFORM] Can't get Dell PE T420 (Perc H710) perform better than a MacMini with PostgreSQL

2015-04-03 Thread Pietro Pugni
Hi Josh, Did you already post the results of: cat /proc/sys/vm/zone_reclaim_mode zone_reclaim_mode was set on 0 for all my tests. I’ve also set it to the other values (1, 2, 4) but there was no improvement. Tests results are the following (1 run for each test): echo 0

Re: [PERFORM] Can't get Dell PE T420 (Perc H710) perform better than a MacMini with PostgreSQL

2015-04-03 Thread Josh Krupka
Sorry, how much disk space is actually used by the tables, indexes, etc involved in your queries? Or it that's a bit much to get, how much disk space is occupied by your database in total?

Re: [PERFORM] Can't get Dell PE T420 (Perc H710) perform better than a MacMini with PostgreSQL

2015-04-03 Thread Josh Krupka
A more simple overview might be numactl —hardware” It returns the following output: sh-4.3# numactl --hardware available: 2 nodes (0-1) node 0 cpus: 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 node 0 size: 64385 MB node 0 free: 56487 MB node 1 cpus: 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29

Re: [PERFORM] Can't get Dell PE T420 (Perc H710) perform better than a MacMini with PostgreSQL

2015-04-03 Thread Pietro Pugni
Hi Aidan, thank you again for your support. I found an interesting article showing better performance from a Intel i5 vs a Intel Xeon on different Postgres versions: http://blog.pgaddict.com/posts/performance-since-postgresql-7-4-to-9-4-pgbench I have to say that MacMini has a 2011 CPU (

Re: [PERFORM] Can't get Dell PE T420 (Perc H710) perform better than a MacMini with PostgreSQL

2015-04-03 Thread Pietro Pugni
Hi didier, thank you for your time. I forgot to display before the output of free. I’ve looked into it before and I found difficult to fully understand if there was something wrong. Before starting Postgres: total used free sharedbuffers cached Mem:

Re: [PERFORM] Can't get Dell PE T420 (Perc H710) perform better than a MacMini with PostgreSQL

2015-04-03 Thread Pietro Pugni
Hi Josh, at the moment the server is unreachable so I can’t calculate sizes. I run all of my test both with all data loaded into Postgres and with no data loaded (except from the single 20mln rows table with relative indexes). To give you an idea, with all data loaded into Postgres with indexes

Re: [PERFORM] Can't get Dell PE T420 (Perc H710) perform better than a MacMini with PostgreSQL

2015-04-02 Thread Pietro Pugni
Hi Wei Shan, Thank you for your response. Query B was run after initializing the DB ex-novo doing VACUUM ANALYZE before and after creating and clustering indexes. By the way, these results are consistent through time and are reproducible, so it’s not a metter of statistic collector (I guess).

Re: [PERFORM] Can't get Dell PE T420 (Perc H710) perform better than a MacMini with PostgreSQL

2015-04-02 Thread Aidan Van Dyk
On Thu, Apr 2, 2015 at 6:33 AM, Pietro Pugni pietro.pu...@gmail.com wrote: *T420* work_mem = 512MB *MacMini* work_mem = 32MB So that is why the T420 does memory sorts and the mini does disk sorts. I'd start looking at why memory sorts on the T420 is so slow. Check your numa settings,

Re: [PERFORM] Can't get Dell PE T420 (Perc H710) perform better than a MacMini with PostgreSQL

2015-04-02 Thread Pietro Pugni
Hi Jeff, thank you for your response. I’m using Postgres 9.0 on MacMini because I’ve noticed that it’s quite fast compared to different Ubuntu machines on which I’ve worked with different (and more performant) hardware. The built-in Postgres version on OS X Server is impossible to update. I

Re: [PERFORM] Can't get Dell PE T420 (Perc H710) perform better than a MacMini with PostgreSQL

2015-04-02 Thread Mkrtchyan, Tigran
: [PERFORM] Can't get Dell PE T420 (Perc H710) perform better than a MacMini with PostgreSQL Hi Ilya, thank your for your response. Both system were configured for each test I’ve done. On T420 I’ve optimized the kernel following the official Postgres documentation ( http://www.postgresql.org/docs

Re: [PERFORM] Can't get Dell PE T420 (Perc H710) perform better than a MacMini with PostgreSQL

2015-04-02 Thread didier
Hi, On Thu, Apr 2, 2015 at 12:47 PM, Pietro Pugni pietro.pu...@gmail.com wrote: Hi Jeff, thank you for your response. I’m using Postgres 9.0 on MacMini because I’ve noticed that it’s quite fast compared to different Ubuntu machines on which I’ve worked with different (and more performant)

Re: [PERFORM] Can't get Dell PE T420 (Perc H710) perform better than a MacMini with PostgreSQL

2015-04-02 Thread Pietro Pugni
Hi Gerardo, thank you for your response. At the moment I can’t switch to RAID10. I know it has best performance, but both systems have RAID5 and MacMini has a consumer desktop RAID solution while T420 has a server-grade one. Anyway, I used two configurations for each system: one for data loading

Re: [PERFORM] Can't get Dell PE T420 (Perc H710) perform better than a MacMini with PostgreSQL

2015-04-02 Thread Pietro Pugni
Hi Ilya, thank your for your response. Both system were configured for each test I’ve done. On T420 I’ve optimized the kernel following the official Postgres documentation ( http://www.postgresql.org/docs/9.4/static/kernel-resources.html ): kernel.shmmax=68719476736 kernel.shmall=16777216

Re: [PERFORM] Can't get Dell PE T420 (Perc H710) perform better than a MacMini with PostgreSQL

2015-04-02 Thread didier
Hi On Thu, Apr 2, 2015 at 3:52 PM, Pietro Pugni pietro.pu...@gmail.com wrote: I’ve searched just now what a collation is because I’ve never explicitly used one before, so I think it uses the default one. What's the output of free and sysctl -a | grep vm.zone_reclaim_mode Search the

Re: [PERFORM] Can't get Dell PE T420 (Perc H710) perform better than a MacMini with PostgreSQL

2015-04-02 Thread Pietro Pugni
Hi Tigran, The modern CPUs trying to be too smart. try to run this code to disable CPUs c-states: setcpulatency.c #include stdio.h #include fcntl.h #include stdint.h int main(int argc, char **argv) { int32_t l; int fd; if (argc != 2) { fprintf(stderr, Usage:

Re: [PERFORM] Can't get Dell PE T420 (Perc H710) perform better than a MacMini with PostgreSQL

2015-04-02 Thread Pietro Pugni
Il giorno 02/apr/2015, alle ore 14:29, didier did...@gmail.com ha scritto: Hi, On Thu, Apr 2, 2015 at 12:47 PM, Pietro Pugni pietro.pu...@gmail.com wrote: Hi Jeff, thank you for your response. I’m using Postgres 9.0 on MacMini because I’ve noticed that it’s quite fast compared to

Re: [PERFORM] Can't get Dell PE T420 (Perc H710) perform better than a MacMini with PostgreSQL

2015-04-02 Thread Pietro Pugni
Hi Aidan, T420 work_mem = 512MB MacMini work_mem = 32MB So that is why the T420 does memory sorts and the mini does disk sorts. I'd start looking at why memory sorts on the T420 is so slow. Check your numa settings, etc (as already mentioned). For a drastic test, disable

Re: [PERFORM] Can't get Dell PE T420 (Perc H710) perform better than a MacMini with PostgreSQL

2015-04-02 Thread Aidan Van Dyk
On Thu, Apr 2, 2015 at 9:23 AM, Pietro Pugni pietro.pu...@gmail.com wrote: the command dmesg | grep -i numa doesn’t display me anything. I think T420 hasn’t NUMA on it. Is there a way to enable it from Ubuntu? I don’t have immediate access to BIOS (server is in another location). NUMA

[PERFORM] Can't get Dell PE T420 (Perc H710) perform better than a MacMini with PostgreSQL

2015-04-01 Thread Pietro Pugni
This question was posted originally on http://dba.stackexchange.com/questions/96444/cant-get-dell-pe-t420-perc-h710-perform-better-than-a-macmini-with-postgresql and they suggested to post it on this mailing list. It's months that I'm trying to solve a performance issue with PostgreSQL. I’m

Re: [PERFORM] Can't get Dell PE T420 (Perc H710) perform better than a MacMini with PostgreSQL

2015-04-01 Thread Ilya Kosmodemiansky
Hi Pietro, On Wed, Apr 1, 2015 at 3:56 PM, Pietro Pugni pietro.pu...@gmail.com wrote: T420: went from 311seconds (default postgresql.conf) to 195seconds doing tuning adjustments over RAID, kernel and postgresql.conf; MacMini: 40seconds. I'am afraid, the matter is, that PostgreSQL is not

Re: [PERFORM] Can't get Dell PE T420 (Perc H710) perform better than a MacMini with PostgreSQL

2015-04-01 Thread Aidan Van Dyk
On Wed, Apr 1, 2015 at 9:56 AM, Pietro Pugni pietro.pu...@gmail.com wrote: *Now let’s propose some query profiling times.* B type set are transactions, so it's impossible for me to post EXPLAIN ANALYZE results. I've extracted two querys from a single transactions and executed the twos on

Re: [PERFORM] Can't get Dell PE T420 (Perc H710) perform better than a MacMini with PostgreSQL

2015-04-01 Thread Wei Shan
Just looking at the 2 B_2 queries, I'm curious as to why is the execution plan different between the 2 machines. Is the optimiser stats updated on both databases? Regards, Wei Shan On 1 April 2015 at 22:32, Aidan Van Dyk ai...@highrise.ca wrote: On Wed, Apr 1, 2015 at 9:56 AM, Pietro Pugni

Re: [PERFORM] Can't get Dell PE T420 (Perc H710) perform better than a MacMini with PostgreSQL

2015-04-01 Thread Gerardo Herzig
Ok, a quick view on the system, and some things that may be important to note: Our deployment machine is a Dell PowerEdge T420 with a Perc H710 RAID controller configured in this way: * VD0: two 15k SAS disks (ext4, OS partition, WAL partition, RAID1) * VD1: ten 10k SAS disks

Re: [PERFORM] Can't get Dell PE T420 (Perc H710) perform better than a MacMini with PostgreSQL

2015-04-01 Thread Jeff Janes
On Wed, Apr 1, 2015 at 6:56 AM, Pietro Pugni pietro.pu...@gmail.com wrote: This question was posted originally on http://dba.stackexchange.com/questions/96444/cant-get-dell-pe-t420-perc-h710-perform-better-than-a-macmini-with-postgresql and they suggested to post it on this mailing list.