Looking for help with poor Ecto query performance

3rd round of tests. Notes:

  • At GIT commit 1b77536cd2214e23b3a045529e9cc4038332bc0c.
  • Added my Manjaro i3-3217U spare laptop that I turn on like five times a year.
  • Changed Erlang to 22.1.1. Elixir is unchanged and at 1.9.1-otp-22.
  • All tests are at 30s now so no point in the “duration” column.
  • All machines use SSDs, no HDDs involved.

Results:


CPU (cores/threads) Test IPS
Xeon-2150B, 10/20 Elixir create 13780
Xeon-2150B, 10/20 pgbench create 14768
Xeon-2150B, 10/20 Elixir update 14360
Xeon-2150B, 10/20 pgbench update 14563
i7-4870HQ, 4/8 Elixir create 17746
i7-4870HQ, 4/8 pgbench create 26338
i7-4870HQ, 4/8 Elixir update 22624
i7-4870HQ, 4/8 pgbench update 30569
i3-3217U, 2/4 Elixir create 194
i3-3217U, 2/4 pgbench create 191
i3-3217U, 2/4 Elixir update 198
i3-3217U, 2/4 pgbench update 190

These results are surprising to say the least. I can’t explain why the iMac Pro did so bad. I have various system monitors installed and Postgres couldn’t even go beyond ~127MB/s write throughput (and I know it has peaked at 1.6GB/s write speed when doing pg_restore). So something is severely under-utilised under this test.

Additionally: 6 out of the 10 cores were very moderately used: about 35-40%, another 2 were at about 15%, and the final 2 weren’t used at all.