![]() Both LINQ-2-SQL and the more recent magic unicorn Entity Framwork 4.1 are built using a similar pattern. When we started off Stack Overflow we chose LINQ-2-SQL. There is an antique question on SO discussing which is best as well as probably tens if not hundreds of similar questions. There are tons of Object-Relational-Mappers for the. In the trace above you can see that EntityRef is baking a method, which is not a problem, unless it is happening 100s of times a second. Much of our work at Stack Overflow depended on the assumption that LINQ-2-SQL is fast enough. I spent a fair bit of time profiling both production and dev something kept on showing up in my cpu analyzer traces .CreateDelegate It needs do a bunch of primary key lookups to pick up all the questions, answers, comments and participating users. Our question show page does a fair bit of database work. We changed some stuff so Google triggers less background activity. This process is usually pretty fast, however when its happening 100,000 times a day in huge bursts … it can get a bit costly. We maintain a list of related questions on every question page, this list is rebuilt once a month in a on demand background process. The trouble was that crawling our question pages was expensive business. This is totally by design, we told Google: “crawl us as fast as you can” and Google did it’s best to comply. Google loves Stack Overflow, it loves it so much that it will crawl 10 pages a second sometimes. We allowed a few expensive operation to happen a bit too concurrently and … there were some framework issues. This was caused by a combination of factors, we made a few mistakes here and there. ![]() Our web tier was running hot, it was often hitting 100% CPU. A few weeks ago we started investigating some performance issues at Stack Overflow.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |