Damn you Kernel Mode Caching!

Tom Keating : VoIP & Gadgets Blog
Tom Keating
| VoIP & Gadgets blog - Latest news in VoIP & gadgets, wireless, mobile phones, reviews, & opinions

Damn you Kernel Mode Caching!

Microsoft's IIS 6.0 comes with kernel mode caching for helping to speed up web page load times. Unfortunately, the kernel mode caching seems to have some side effects that are affecting my index.xml RSS feed that many of my blog readers subscribe to. You may have noticed that my blog web pages had blog entries that didn't show up in my index.xml feed until hours later. The kernel mode cache was designed to take heavily accessed files and stick them in the kernel for faster retrieval.

According to Microsoft:
"The IIS 6.0 kernel-mode cache is designed speed up static file performance significantly by bypassing the need to do a kernel-to-usermode transition to generate and serve the response," says Eric Deilly, IIS 6.0 program manager with Microsoft. "Instead, the kernel mode listener is able to receive the connection request, receive the new connection, check the kernel-mode cache, and serve the response from the cache on a cache hit."

During some troubleshooting I noticed that if I open the XML file locally on the Windows IIS server, the file is current. However, if I go to another PC which has never loaded the index.xml feed (not cached by the browser), it often loads an older version of the file. The only way I can see that happening is if the kernel is holding the file in memory using Microsoft's new kernel mode caching.

If I manually stop and start (restart) IIS, then the correct, most up-to-date index.xml file loads.

Even stranger, I can DELETE the index.xml file fom the IIS server and IIS will continue to "serve" the file as though it still exists. Weird, eh? I should get a 404 error on my browser after deleting.

If I then stop/start IIS then I get a file not found error on my browser. (or if I didn't delete the file, restarting IIS makes sure the most recent XML file is served)

I assume since the kernel cache caches heavily accessed files, such as my blog's RSS feed, that the kernel is keeping the file in memory and thus serving it from the kernel instead of the hard disk. However, it's supposed to detect changes in the file and then let the most recent version be loaded into the cache. I certainly can't restart IIS after after blog entry, so I will have to continue to work on this problem. Damn you Microsoft and damn your kernel mode caching!

Related Articles to 'Damn you Kernel Mode Caching!'

Featured Events