locked
Native module performance RRS feed

  • Question

  • User1586472150 posted

    I've written a native module which registers for the RQ_END_REQUEST notification, and implements the OnEndRequest event, and not OnPostEndRequest.  I've used the starter sample as a base for the module.

    It performs very little processing in the OnEndRequest event, calling the GetStatus API, then adding a custom http header using the SetHeader API. 

    I've also written a Managed module which does exactly the same thing - obvious difference being that the native module allows us to work at a server level, and not just a site level, which is ideally what we'd like.

    Testing has shown significant performance issues with the native module.  We're using JMeter to load test the module.

     When applying the load tests the server with the native module installed proceeds without issue for approximately 5 seconds, then appears to "clog" completely.  Throughput slows, and requests appear to start queueing and waiting.

    The managed module on the other hand proceeds throughout the same test in a smooth manner, with no clogging or waiting.

    Can anyone either point me to some background reading or give me an idea of caveats I should be looking for with this stuff, there's so little code involved here it should be trivial surely.....and as it's unmanaged (like the rest of the IIS stack) surely it should perform better than the managed module?!?


     edit:  Are there any MSFT looking at these forums?

    Tuesday, January 11, 2011 5:52 AM

Answers

  • User690216013 posted
    You can even write slow programs in assembly language, so don't think native things are always fast. To analyze performance issues, more efforts are needed and it is impossible to diagnose a problem without access to your source code and environment. Therefore, to get something like this resolved, you should open a support case via http://support.microsoft.com. Even MSFT guys monitor this forum, it is not their responsibility or capability to resolve all such issues.
    • Marked as answer by Anonymous Tuesday, September 28, 2021 12:00 AM
    Wednesday, January 12, 2011 8:09 AM

All replies

  • User690216013 posted
    You can even write slow programs in assembly language, so don't think native things are always fast. To analyze performance issues, more efforts are needed and it is impossible to diagnose a problem without access to your source code and environment. Therefore, to get something like this resolved, you should open a support case via http://support.microsoft.com. Even MSFT guys monitor this forum, it is not their responsibility or capability to resolve all such issues.
    • Marked as answer by Anonymous Tuesday, September 28, 2021 12:00 AM
    Wednesday, January 12, 2011 8:09 AM
  • User1586472150 posted
    ...
    Wednesday, January 12, 2011 4:20 PM