3 ms·
HN has very little user specific content in it's hot pages. Also, since it's mostly time based, there's a lot of locality. It should cache like mad. My guessin
by jasonwatkinspdx 18y ago
HN has very little user specific content in it's hot pages. Also, since it's mostly time based, there's a lot of locality. It should cache like mad.
My guessing math puts it at 300MB for the hot data set (1000 100kb pages, 20k 10kb users). With 10 page views per unique, 90% hit rate on the page/user cache and 20% of page views being writes I'd guess average is less than 1 iop a second. Even at high peak to average ratios it's likely within what a single sata disk can do.
I'd say it might be a little tight on a 512MB vps, but possible if you optimized carefully. On a reasonable dedicated machine it should run very well without any particular effort paid to optimization beyond basic caching.
- wooster 18y agoGiven the "more" links on the front page, I'm guessing HN is using continuations as state storage mechanisms, and that they're stored on a per-user basis. So, I'd expect the site's RAM requirements to be pretty hefty just on that basis, hence the 12GB of RAM.