The often repeated recommendation to not exceed 8GB/25% of RAM for shared buffers in postgres is wrong. For pgbench scale 1500, on laptop with fast SSD and 32GB of RAM, parallelism of 16. s_b of 1GB, 8GB, 16GB, using huge pages. r/o: 115k, 100k, 185k r/w: 16300, 15100, 21500
-
Show this thread
-
And that's with a brief test. For the read write test, if the test is longer the differences become considerably starker.
1 reply 1 retweet 4 likesShow this thread -
Replying to @AndresFreundTec
Why do we see a performance drop between 1GB and 8GB s_b?
1 reply 0 retweets 0 likes
Replying to @lrweck
Andres Freund (Tech) Retweeted Andres Freund (Tech)
Andres Freund (Tech) added,
Andres Freund (Tech) @AndresFreundTec
Replying to @codehovel
It's due to double buffering leading to the whole working set fitting neither into kernel page cache, nor yet into postgres's shared_buffers. And it's close to the worst case for that, because there'll be substantial amounts of memory for that wasted, without too much benefit.
2:14 PM - 30 Sep 2019
0 replies
0 retweets
1 like
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.