Stating the Obvious
I'm pretty sure that you already what I'm going to say, but whatever.
- If you are trying to achieve throughput, make sure that you turn logging off. Especially if you are using NHibernate, which is quite chatty in its logs (wonderful for tracking problems, really bad otherwise). I managed to get to 40,000 logged messages before I realized what was going on. P.S: It may be a good idea to create SqlBulkCopyAppender for log4net.
- If you are trying to measure performance, be sure to use the performance counters, at the very least they will give you something to look at while the application is running.
- The speed of the messaging pipeline is irrelevant if you have long processing to do on each message. I tried to push the throughput over the 10,000 messages a second limit on an empty pipeline, but I realized it was pointless before I put some processing into it. Right now it is processing ~250 messages a second (simulating work using Sleep() ). I don't think I need to worry about increasing the pipeline's thourhgput right now.
- Adding multithreading is definately worth all the effort that went to make sure that it is correct. The above numbers are for my computer (and the reason I spilled over the 2Gb limit), I expect them to grow considerably once I move them to a real server.
- Don't you believe "SELECT COUNT(*) FROM BigTable", Sql Server will happily lie to you about the real size of the table. I believe it is a performance optimization that happens if you are a bozo and ask this question too often. Thinking about, I'm not a bozo, I don't really need it, so I took it out. Still, this is a good thing to remember.
- Related to both logging and performance counters. You can get quite a bit of information about the way an application behaves just from looking at what is going on the counters. And I don't think that there has been anything in Windows that was optimized more throughfully than the performance counters, so they are just about free.
Comments
Comment preview