Ask PG: What's up with the 2GB limit?

4 points by zacharydanger ↗ HN
32-bit systems can handle up to 4GB and any modern Linux system with a CPU that supports Physical Address Extension can use up to 64GB.

How are you coming up with your 2GB limitation?

10 comments

[ 4.9 ms ] story [ 33.9 ms ] thread
There's 4GB of physical memory on the server, but for various reasons we only end up with about 2GB of usable heap space.

Rtm just placed an order for a new server, so we should have more memory and a somewhat faster CPU soon.

Well, Don't you think that if you make pagination for comments of a story, that could help?

For example, if a story has 50 comments, then it should be devided into 2 pages, each page shows 25 comments... and as a result it will use less memory?

That would not use less memory. It's not the html pages that are stored in memory, but the individual comments.
Yes I know that the individual comments are the ones stored in the memory. But it takes a while to load anyway. like the feature request story... it takes around 11 seconds to load.

Thanks for making it clear to me, I really appreciate it. :)

This would presumably give some problems with votes. For instance, a comment in a long thread that starts on page 2 would have a very small chance of making it to page 1 since only a subset of users would look at the second page thus having a chance to vote it up.
This was discussed in pg's original submission on why things had been slow lately. Do we need this separate submission?
Signed 32bit numbers are +/- 2 Gig. Many x86 instructions only work with signed 32-bit displacement.