performance

Hello,

I have written a filter driver which will be installed on a web server.
I want to know how much performance overhead because of my
filter driver. Is there any tools or a procedure to determine this.

I also want to know, Is it good to use __try and __except blocks in every
function in the code.

Thanks in advance
rajesh bp


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

> I have written a filter driver which will be installed on a web server.

I want to know how much performance overhead because of my
filter driver. Is there any tools or a procedure to determine this.

TrueTime from NuMega does this, but you won’t want it for this single job
(it comes bundled with other things for $3K)
However, depending on what your driver does, you can get from no to big
performance degradation.

I also want to know, Is it good to use __try and __except blocks in every
function in the code.

It’s good because otherwise you open the driver to easy crashes.


Kind regards, Dejan M. www.alfasp.com
E-mail: xxxxx@alfasp.com ICQ#: 56570367
Alfa File Monitor - File monitoring library for Win32 developers.
Alfa File Protector - File protection and hiding library for Win32
developers.
Alfa Registry Monitor - Registry monitoring library for Win32 developers.
Alfa Registry Protector - Registry protection library for Win32 developers.


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Another nice and easy solution is to run some ‘performance’ testing
without your driver then install it and run them again. This can give
you a gross estimate of the performance degradation. As Dejan points
out, if all you are doing is some monitoring of requests then your
degradation will probably go unnoticed but then again you can easily
bring your system performance to that of a TRS-80.

Pete

Peter Scott
xxxxx@KernelDrivers.com
http://www.KernelDrivers.com

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Dejan Maksimovic
Sent: Tuesday, January 29, 2002 1:43 PM
To: File Systems Developers
Subject: [ntfsd] Re: performance

I have written a filter driver which will be installed on a web
server.
I want to know how much performance overhead because of my
filter driver. Is there any tools or a procedure to determine this.

TrueTime from NuMega does this, but you won’t want it for this
single job
(it comes bundled with other things for $3K)
However, depending on what your driver does, you can get from no to
big
performance degradation.

I also want to know, Is it good to use __try and __except blocks in
every
function in the code.

It’s good because otherwise you open the driver to easy crashes.


Kind regards, Dejan M. www.alfasp.com
E-mail: xxxxx@alfasp.com ICQ#: 56570367
Alfa File Monitor - File monitoring library for Win32 developers.
Alfa File Protector - File protection and hiding library for Win32
developers.
Alfa Registry Monitor - Registry monitoring library for Win32
developers.
Alfa Registry Protector - Registry protection library for Win32
developers.


You are currently subscribed to ntfsd as: xxxxx@KernelDrivers.com
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

I am using “system monitor” for performance testing. I would like to know

what are the performance counters I should look for to test filter drivers.

Thanks

rajesh

“Peter Scott” wrote in message
news:xxxxx@ntfsd…
>
>
> Another nice and easy solution is to run some ‘performance’ testing
> without your driver then install it and run them again. This can give
> you a gross estimate of the performance degradation. As Dejan points
> out, if all you are doing is some monitoring of requests then your
> degradation will probably go unnoticed but then again you can easily
> bring your system performance to that of a TRS-80.
>
> Pete
>
> Peter Scott
> xxxxx@KernelDrivers.com
> http://www.KernelDrivers.com
>
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Dejan Maksimovic
> Sent: Tuesday, January 29, 2002 1:43 PM
> To: File Systems Developers
> Subject: [ntfsd] Re: performance
>
> > I have written a filter driver which will be installed on a web
> server.
> > I want to know how much performance overhead because of my
> > filter driver. Is there any tools or a procedure to determine this.
>
> TrueTime from NuMega does this, but you won’t want it for this
> single job
> (it comes bundled with other things for $3K)
> However, depending on what your driver does, you can get from no to
> big
> performance degradation.
>
> > I also want to know, Is it good to use try and except blocks in
> every
> > function in the code.
>
> It’s good because otherwise you open the driver to easy crashes.
>
> –
> Kind regards, Dejan M. www.alfasp.com
> E-mail: xxxxx@alfasp.com ICQ#: 56570367
> Alfa File Monitor - File monitoring library for Win32 developers.
> Alfa File Protector - File protection and hiding library for Win32
> developers.
> Alfa Registry Monitor - Registry monitoring library for Win32
> developers.
> Alfa Registry Protector - Registry protection library for Win32
> developers.
>
>
>
>
>
> —
> You are currently subscribed to ntfsd as: xxxxx@KernelDrivers.com
> To unsubscribe send a blank email to
leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>
>
>
> —
> You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
> To unsubscribe send a blank email to
leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>
>


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

I would monitor pathways that you feel will be affected. If your filter
is heavy on the IO processing pathway, then monitor the reads/writes per
second, IO rates, etc. Do this with and without your filter and this
should give you a gross estimate of any degradation in performance.

Pete

Peter Scott
xxxxx@KernelDrivers.com
http://www.KernelDrivers.com

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of rajesh
Sent: Wednesday, January 30, 2002 9:35 AM
To: File Systems Developers
Subject: [ntfsd] Re: performance

I am using “system monitor” for performance testing. I would like to
know

what are the performance counters I should look for to test filter
drivers.

Thanks

rajesh

“Peter Scott” wrote in message
news:xxxxx@ntfsd…
>
>
> Another nice and easy solution is to run some ‘performance’ testing
> without your driver then install it and run them again. This can give
> you a gross estimate of the performance degradation. As Dejan points
> out, if all you are doing is some monitoring of requests then your
> degradation will probably go unnoticed but then again you can easily
> bring your system performance to that of a TRS-80.
>
> Pete
>
> Peter Scott
> xxxxx@KernelDrivers.com
> http://www.KernelDrivers.com
>
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Dejan Maksimovic
> Sent: Tuesday, January 29, 2002 1:43 PM
> To: File Systems Developers
> Subject: [ntfsd] Re: performance
>
> > I have written a filter driver which will be installed on a web
> server.
> > I want to know how much performance overhead because of my
> > filter driver. Is there any tools or a procedure to determine this.
>
> TrueTime from NuMega does this, but you won’t want it for this
> single job
> (it comes bundled with other things for $3K)
> However, depending on what your driver does, you can get from no
to
> big
> performance degradation.
>
> > I also want to know, Is it good to use try and except blocks in
> every
> > function in the code.
>
> It’s good because otherwise you open the driver to easy crashes.
>
> –
> Kind regards, Dejan M. www.alfasp.com
> E-mail: xxxxx@alfasp.com ICQ#: 56570367
> Alfa File Monitor - File monitoring library for Win32 developers.
> Alfa File Protector - File protection and hiding library for Win32
> developers.
> Alfa Registry Monitor - Registry monitoring library for Win32
> developers.
> Alfa Registry Protector - Registry protection library for Win32
> developers.
>
>
>
>
>
> —
> You are currently subscribed to ntfsd as: xxxxx@KernelDrivers.com
> To unsubscribe send a blank email to
leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>
>
>
> —
> You are currently subscribed to ntfsd as: xxxxx@KernelDrivers.com
> To unsubscribe send a blank email to
leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>
>


You are currently subscribed to ntfsd as: xxxxx@KernelDrivers.com
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

I will try this.

Thank you
rajesh

“Peter Scott” wrote in message
news:xxxxx@ntfsd…
>
>
> I would monitor pathways that you feel will be affected. If your filter
> is heavy on the IO processing pathway, then monitor the reads/writes per
> second, IO rates, etc. Do this with and without your filter and this
> should give you a gross estimate of any degradation in performance.
>
> Pete
>
> Peter Scott
> xxxxx@KernelDrivers.com
> http://www.KernelDrivers.com
>
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of rajesh
> Sent: Wednesday, January 30, 2002 9:35 AM
> To: File Systems Developers
> Subject: [ntfsd] Re: performance
>
> I am using “system monitor” for performance testing. I would like to
> know
>
> what are the performance counters I should look for to test filter
> drivers.
>
> Thanks
>
> rajesh
>
> “Peter Scott” wrote in message
> news:xxxxx@ntfsd…
> >
> >
> > Another nice and easy solution is to run some ‘performance’ testing
> > without your driver then install it and run them again. This can give
> > you a gross estimate of the performance degradation. As Dejan points
> > out, if all you are doing is some monitoring of requests then your
> > degradation will probably go unnoticed but then again you can easily
> > bring your system performance to that of a TRS-80.
> >
> > Pete
> >
> > Peter Scott
> > xxxxx@KernelDrivers.com
> > http://www.KernelDrivers.com
> >
> >
> > -----Original Message-----
> > From: xxxxx@lists.osr.com
> > [mailto:xxxxx@lists.osr.com] On Behalf Of Dejan Maksimovic
> > Sent: Tuesday, January 29, 2002 1:43 PM
> > To: File Systems Developers
> > Subject: [ntfsd] Re: performance
> >
> > > I have written a filter driver which will be installed on a web
> > server.
> > > I want to know how much performance overhead because of my
> > > filter driver. Is there any tools or a procedure to determine this.
> >
> > TrueTime from NuMega does this, but you won’t want it for this
> > single job
> > (it comes bundled with other things for $3K)
> > However, depending on what your driver does, you can get from no
> to
> > big
> > performance degradation.
> >
> > > I also want to know, Is it good to use try and except blocks in
> > every
> > > function in the code.
> >
> > It’s good because otherwise you open the driver to easy crashes.
> >
> > –
> > Kind regards, Dejan M. www.alfasp.com
> > E-mail: xxxxx@alfasp.com ICQ#: 56570367
> > Alfa File Monitor - File monitoring library for Win32 developers.
> > Alfa File Protector - File protection and hiding library for Win32
> > developers.
> > Alfa Registry Monitor - Registry monitoring library for Win32
> > developers.
> > Alfa Registry Protector - Registry protection library for Win32
> > developers.
> >
> >
> >
> >
> >
> > —
> > You are currently subscribed to ntfsd as: xxxxx@KernelDrivers.com
> > To unsubscribe send a blank email to
> leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com
> >
> >
> >
> > —
> > You are currently subscribed to ntfsd as: xxxxx@KernelDrivers.com
> > To unsubscribe send a blank email to
> leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com
> >
> >
>
>
>
> —
> You are currently subscribed to ntfsd as: xxxxx@KernelDrivers.com
> To unsubscribe send a blank email to
leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>
>
>
> —
> You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
> To unsubscribe send a blank email to
leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>
>


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Rajesh,

It is not a good idea to put try/except blocks in every function in your
driver. You should only use them when required, like when trying to
access user buffers. Following are some reasons for this:

  • This does not make your code more reliable because you may be masking
    actual bugs in your code.
  • Unexpected faults are not usually correctable so how are you going to
    handle it? It is wrong to just continue processing so you probably need
    to bug check the system. Without the handler the system would do that
    for you anyway.
  • Faults in drivers below you are going to be caught by your handler,
    thus making your driver appear to be the one with the problem.
  • They make it harder to debug your driver.
  • Try/except blocks are not free and do consume some cycles.

Like everything, too much of a good thing will hurt you.

Neal Christiansen
This posting is provided “AS IS” with no warranties, and confers no
rights.

-----Original Message-----
From: rajesh [mailto:xxxxx@net-fast.com]
Sent: Tuesday, January 29, 2002 12:04 PM
To: File Systems Developers
Subject: [ntfsd] performance

Hello,

I have written a filter driver which will be installed on a web server.
I want to know how much performance overhead because of my
filter driver. Is there any tools or a procedure to determine this.

I also want to know, Is it good to use __try and __except blocks in
every
function in the code.

Thanks in advance
rajesh bp


You are currently subscribed to ntfsd as: xxxxx@Windows.Microsoft.com
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Neal,

Since the filter driver will be installed on a web server and I want to make
my driver more reliable and at the same time get good performance from
web server.

After considering your points I am going to remove my __try blocks except
in my “FastIoDispatch” where I may get bad user buffers from user mode
applications.

Thank you
rajesh

“Neal Christiansen” wrote in message
news:xxxxx@ntfsd…

Rajesh,

It is not a good idea to put try/except blocks in every function in your
driver. You should only use them when required, like when trying to
access user buffers. Following are some reasons for this:
- This does not make your code more reliable because you may be masking
actual bugs in your code.
- Unexpected faults are not usually correctable so how are you going to
handle it? It is wrong to just continue processing so you probably need
to bug check the system. Without the handler the system would do that
for you anyway.
- Faults in drivers below you are going to be caught by your handler,
thus making your driver appear to be the one with the problem.
- They make it harder to debug your driver.
- Try/except blocks are not free and do consume some cycles.

Like everything, too much of a good thing will hurt you.

Neal Christiansen
This posting is provided “AS IS” with no warranties, and confers no
rights.

-----Original Message-----
From: rajesh [mailto:xxxxx@net-fast.com]
Sent: Tuesday, January 29, 2002 12:04 PM
To: File Systems Developers
Subject: [ntfsd] performance

Hello,

I have written a filter driver which will be installed on a web server.
I want to know how much performance overhead because of my
filter driver. Is there any tools or a procedure to determine this.

I also want to know, Is it good to use try and except blocks in
every
function in the code.

Thanks in advance
rajesh bp


You are currently subscribed to ntfsd as: xxxxx@Windows.Microsoft.com
To unsubscribe send a blank email to
leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to
leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Be careful not to commit the opposite error of not using try blocks where they are required. For example, some of the cache manager’s interfaces throw structured exceptions rather than returning an error code. Be wary of API’s that return VOID where you would expect an NTSTATUS. These are likely interfaces that raise exceptions. If you do not wrap these API’s with try blocks, your driver will be incorrect, and will cause blue screens.

-----Original Message-----
From: rajesh [mailto:xxxxx@net-fast.com]
Sent: Thursday, January 31, 2002 10:16 AM
To: File Systems Developers
Subject: [ntfsd] Re: performance

Neal,

Since the filter driver will be installed on a web server and I want to make
my driver more reliable and at the same time get good performance from
web server.

After considering your points I am going to remove my __try blocks except
in my “FastIoDispatch” where I may get bad user buffers from user mode
applications.

Thank you
rajesh

“Neal Christiansen” wrote in message
news:xxxxx@ntfsd…

Rajesh,

It is not a good idea to put try/except blocks in every function in your
driver. You should only use them when required, like when trying to
access user buffers. Following are some reasons for this:
- This does not make your code more reliable because you may be masking
actual bugs in your code.
- Unexpected faults are not usually correctable so how are you going to
handle it? It is wrong to just continue processing so you probably need
to bug check the system. Without the handler the system would do that
for you anyway.
- Faults in drivers below you are going to be caught by your handler,
thus making your driver appear to be the one with the problem.
- They make it harder to debug your driver.
- Try/except blocks are not free and do consume some cycles.

Like everything, too much of a good thing will hurt you.

Neal Christiansen
This posting is provided “AS IS” with no warranties, and confers no
rights.

-----Original Message-----
From: rajesh [mailto:xxxxx@net-fast.com]
Sent: Tuesday, January 29, 2002 12:04 PM
To: File Systems Developers
Subject: [ntfsd] performance

Hello,

I have written a filter driver which will be installed on a web server.
I want to know how much performance overhead because of my
filter driver. Is there any tools or a procedure to determine this.

I also want to know, Is it good to use try and except blocks in
every
function in the code.

Thanks in advance
rajesh bp


You are currently subscribed to ntfsd as: xxxxx@Windows.Microsoft.com
To unsubscribe send a blank email to
leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: xxxxx@inin.com
To unsubscribe send a blank email to
leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: xxxxx@inin.com
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Apart from fast i/o dispatches that access the buffers:
You have to use try-except wrapper around any place in your code that
accesses user-buffers that are not probed and captured already.
This includes METHOD_NEITHER ioctls, Irp->UserBuffer access for
read/write.
You have to use a try-except wrapper around code that attempts to lock
down user-buffer pages (MmProbeAndLockPages can cause an exception).

Ravi

-----Original Message-----
From: rajesh [mailto:xxxxx@net-fast.com]
Sent: Thursday, January 31, 2002 7:16 AM
To: File Systems Developers
Subject: [ntfsd] Re: performance

Neal,

Since the filter driver will be installed on a web server and I want to
make my driver more reliable and at the same time get good performance
from web server.

After considering your points I am going to remove my __try blocks
except in my “FastIoDispatch” where I may get bad user buffers from user
mode applications.

Thank you
rajesh

“Neal Christiansen” wrote in message
news:xxxxx@ntfsd…

Rajesh,

It is not a good idea to put try/except blocks in every function in your
driver. You should only use them when required, like when trying to
access user buffers. Following are some reasons for this:
- This does not make your code more reliable because you may be masking
actual bugs in your code.
- Unexpected faults are not usually correctable so how are you going to
handle it? It is wrong to just continue processing so you probably need
to bug check the system. Without the handler the system would do that
for you anyway.
- Faults in drivers below you are going to be caught by your handler,
thus making your driver appear to be the one with the problem.
- They make it harder to debug your driver.
- Try/except blocks are not free and do consume some cycles.

Like everything, too much of a good thing will hurt you.

Neal Christiansen
This posting is provided “AS IS” with no warranties, and confers no
rights.

-----Original Message-----
From: rajesh [mailto:xxxxx@net-fast.com]
Sent: Tuesday, January 29, 2002 12:04 PM
To: File Systems Developers
Subject: [ntfsd] performance

Hello,

I have written a filter driver which will be installed on a web server.
I want to know how much performance overhead because of my filter
driver. Is there any tools or a procedure to determine this.

I also want to know, Is it good to use try and except blocks in
every function in the code.

Thanks in advance
rajesh bp


You are currently subscribed to ntfsd as: xxxxx@Windows.Microsoft.com
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com