News for hackers. Stuff that matters.
Re:PostgreSQL Performance on Raspberry Pi by MuffinFlavored on Thursday April 04, 2019 @11:54AM (#19573782)
For comparison, I ran this on a $80/mo OVH dedicated server (SP-32 Server - E3-1270v6 - 32GB - SoftRaid 2x450GB SSD NVMe)

  $ sudo su postgres
  $ createdb bench_test
  $ pgbench -i -s 10 bench_test
  $ pgbench -c 10 -j 2 -T 3600 -P 60 bench_test 
  starting vacuum...end.
  progress: 60.0 s, 9192.5 tps, lat 1.088 ms stddev 0.924
Re:PostgreSQL Performance on Raspberry Pi by altmind on Thursday April 04, 2019 @10:16PM (#19579059)
I tried to replicate this benchmark on threadripper 2950x, 16 cores, 32gb 3000mhz 14cl, samsung 860 nvme, XFS.

I was never able to achive more than 3100 tps, even with -march=native -O3 -flto, large wal and shared_buffers, without selinux and THP - I was always bottlenecked by 1 progres process staying in IOWait.

I moved data directory to ramdisk and got: [pgbench -c10 -j 2]: progress: 60.0 s, 26819.3 tps, lat 0.371 ms stddev 0.119. with LA of mere 4.

[pgbench -c30 -j 2]: progress: 60.0 s, 41572.7 tps, lat 0.720 ms stddev 0.390

How do you guys get this crazy performance? Could this be that your RAID fsyncs are not really syncing?

Re:PostgreSQL Performance on Raspberry Pi by MuffinFlavored on Friday April 05, 2019 @10:20AM (#19582745)
I think you're misreading your results lol

your -c30 is 41.5k

your -c10 is 26.89k, which smokes my 9k

edit: I just misread that and see you moved it to RAMdisk.

What would you like me to do to prove the test is fast because of the SOFTRaid?

Re:PostgreSQL Performance on Raspberry Pi by altmind on Friday April 05, 2019 @12:13PM (#19583965)
maybe you can do fio write+sync benchmark? http://uditagarwal.in/index.php/2018/05/19/comparing-io-benc...
Re:PostgreSQL Performance on Raspberry Pi by blyat on Thursday April 04, 2019 @04:56PM (#19577016)
More OVH numbers using your same pgbenches. I've got a $99/mo GAM1 - Intel i7-7700K NO OC - 4C/8T - 4.2GHz - 64GB - NO SoftRAID (using ESXi) 2x450GB NVMe running 3 VMs. Two VMs are using < 50 MHz, the other is using 30% of the CPU for an empty Minecraft server.

With the Minecraft server on: progress: 60.0 s, 6956.5 tps, lat 1.437 ms stddev 1.485

With the Minecraft server off: progress: 60.0 s, 7275.5 tps, lat 1.374 ms stddev 1.975

Looks like not having SoftRaid is killing me. I wish I could test with it on so I can see the comparison of the E3 vs the 7700K, but I would need to re-image.

For fun, a random $5 lowest tier Digital Ocean droplet running a TeamSpeak server (which is using about .07% CPU): progress: 60.0 s, 1507.3 tps, lat 6.631 ms stddev 5.809

And for even more fun, WSL running on my personal/WFH rig - i7-7820X @ 4.8GHz OC, 1TB 950 Pro NVME, 32GB RAM (I let this one run a bit longer as WSL has performance issues, was curious if I would see variance): progress: 60.0 s, 1172.4 tps, lat 8.516 ms stddev 6.017 progress: 120.0 s, 1271.3 tps, lat 7.863 ms stddev 4.817 progress: 180.0 s, 1274.0 tps, lat 7.849 ms stddev 4.943 progress: 240.0 s, 1266.1 tps, lat 7.896 ms stddev 4.875 progress: 300.0 s, 1239.2 tps, lat 8.069 ms stddev 5.211 progress: 360.0 s, 1213.1 tps, lat 8.242 ms stddev 5.447

Ouch! A $3k rig gets outperformed by a $5 DO box.

Re:PostgreSQL Performance on Raspberry Pi by MuffinFlavored on Thursday April 04, 2019 @05:15PM (#19577200)
Very weird. Can you test a more expensive DO box, please? I had to move to OVH from DO because the performance was so crap.

My iMac was smoking the more expensive DO servers.

Re:PostgreSQL Performance on Raspberry Pi by blyat on Thursday April 04, 2019 @09:18PM (#19578762)
Tried the lowest CPU optimized and the 3rd highest for kicks:

$40/mo - 4 GB Memory / 25 GB Disk / NYC1 - Ubuntu 18.04.2 x64

  progress: 60.0 s, 3295.3 tps, lat 3.034 ms stddev 1.906
  progress: 120.0 s, 3384.4 tps, lat 2.955 ms stddev 2.341
  progress: 180.0 s, 3294.9 tps, lat 3.035 ms stddev 2.384
  progress: 240.0 s, 3025.3 tps, lat 3.305 ms stddev 2.158
  progress: 300.0 s, 3158.5 tps, lat 3.166 ms stddev 2.435
  progress: 360.0 s, 3097.8 tps, lat 3.228 ms stddev 3.078
$480/mo - 64 GB Memory / 400 GB Disk / NYC3 - Ubuntu 18.04.2 x64

  progress: 60.0 s, 4114.9 tps, lat 2.429 ms stddev 7.033
  progress: 120.0 s, 4143.9 tps, lat 2.414 ms stddev 6.656
  progress: 180.0 s, 3845.5 tps, lat 2.598 ms stddev 7.774
  progress: 240.0 s, 4324.4 tps, lat 2.314 ms stddev 7.129
  progress: 300.0 s, 3892.1 tps, lat 2.569 ms stddev 8.179
  progress: 360.0 s, 4071.5 tps, lat 2.457 ms stddev 7.833
Doesn't look like they scale too well, unfortunately.
Re:PostgreSQL Performance on Raspberry Pi by MuffinFlavored on Friday April 05, 2019 @10:17AM (#19582721)
I'm surprised DO is killing it as hard as they are when OVH has dedicated servers for comparable prices and 2x the performance.

Are you able to run pgbench against their new Postgres hosted instances?

Re:PostgreSQL Performance on Raspberry Pi by MuffinFlavored on Friday April 05, 2019 @12:31PM (#19584193)
I did it myself.

$5 NYC1 droplet with pg-bench hitting a $480/mo NYC1 Postgres cluster:

  progress: 60.0 s, 2859.9 tps, lat 3.492 ms stddev 3.421
Yikes.
Re:PostgreSQL Performance on Raspberry Pi by elamje on Thursday April 04, 2019 @12:37PM (#19574287)
So the performance was lower on the server than the pi?
Re:PostgreSQL Performance on Raspberry Pi by RexM on Thursday April 04, 2019 @12:53PM (#19574473)
Not sure how you're seeing that.

From the article it says the incremental reporting (every 60 seconds) were:

> progress: 540.0 s, 171.8 tps, lat 55.105 ms stddev 946.851

> progress: 600.0 s, 24.6 tps, lat 435.693 ms stddev 2945.727

> progress: 660.0 s, 405.8 tps, lat 24.108 ms stddev 134.692

So they were getting between 24.6 and 405.8 transactions per second.

On the server, he's seeing:

> progress: 60.0 s, 9192.5 tps, lat 1.088 ms stddev 0.924

So the server is doing 9192.5 transactions per second. The test wasn't run as long, but the server is showing much lower latency and standard deviation, as well.

Re:PostgreSQL Performance on Raspberry Pi by MuffinFlavored on Thursday April 04, 2019 @12:47PM (#19574411)
No. The article claims about ~200 TPS. I was able to pull ~9k TPS.