News for hackers. Stuff that matters.
Re:Why HN was slow and how Rtm fixed it by earle on Wednesday January 19, 2011 @02:06PM (#2120831)
HN only supports 20 req per second???
Re:Why HN was slow and how Rtm fixed it by imp on Wednesday January 19, 2011 @02:16PM (#2120867)
Maybe that's just for dynamic pages. Probably most of the most popular pages are cached and wouldn't be considered in that 20 req/sec. Just my own wild guess though.
Re:Why HN was slow and how Rtm fixed it by PStamatiou on Wednesday January 19, 2011 @02:14PM (#2120860)
flat files, no database
Re:Why HN was slow and how Rtm fixed it by pg on Wednesday January 19, 2011 @02:22PM (#2120885)
That's not the bottleneck. Essentially there's an in-memory database (known as hash tables). Stuff is lazily loaded off disk into memory, but most of the frequently needed stuff is loaded once at startup.

The bottleneck is the amount of garbage created by generating pages. IIRC there is some horrible inefficiency involving UTF-8 characters.

Re:Why HN was slow and how Rtm fixed it by gills on Wednesday January 19, 2011 @05:00PM (#2121444)
Are you using any sort of in-memory fragment caching? That seems like it might reduce some render overhead.
Re:Why HN was slow and how Rtm fixed it by pg on Wednesday January 19, 2011 @05:51PM (#2121617)
A great deal, and it does.
Re:Why HN was slow and how Rtm fixed it by svlla on Wednesday January 19, 2011 @02:38PM (#2120945)
perhaps continuations could be used more judiciously as well
Re:Why HN was slow and how Rtm fixed it by ezalor on Wednesday January 19, 2011 @02:28PM (#2120907)
> That's not the bottleneck.

What is the main bottleneck of HN?

Re:Why HN was slow and how Rtm fixed it by pg on Wednesday January 19, 2011 @02:32PM (#2120915)
See the second paragraph.
Re:Why HN was slow and how Rtm fixed it by dauphin on Wednesday January 19, 2011 @07:30PM (#2121955)
That's 0.05 second for a single request: actually pretty good.