Groups | Blog | Home
all groups > dotnet performance > february 2006 >

dotnet performance : Active Sync impacts performance


JimP
2/20/2006 8:13:30 AM
Using VS2005 C# to develop Windows Mobile 5 application (.Net Compact
Framework 2.0). We have two of our apps on the mobile device - one is the
application itself, the second is an event-driven system management tool that
is basically idle, except for a socket lister and a file watcher (watching
one directory that is almost never written to). Both apps perform very well
by themselves, and both apps work great together, except in one circumstance:
when the device is cradled with a USB connection, and Active Sync is active,
the system periodicaly appears to lock up for up to 1-2 minutes at a time,
then resumes normal operation for a while, then goes through the same thing
again...
Our first thought was "it's the file watcher" so we commented out the code
that does this -- no difference in the pattern.
Our next thought was "garbage collection". However, when we use a tool to
monitor CPU usage and memory, CPU usage appears to be almost zero during the
"lock-up" timeframe. We are looking at memory utilization, but as best we
can tell, are well below 32 MB total memory being used by the two C# apps
we've written, so we shouldn't be having problems with the heap sizes. Any
ideas where to look next?
stcheng NO[at]SPAM online.microsoft.com
2/21/2006 12:00:00 AM
Hi Jim,

Welcome to the MSDN newsgroup.

As for the system lock-up issue, it is likely blocked by some IO operation.
From the appearnce, we can not quite determine what's the root cause. So I
suggest you first try disabling either of your two applcations to see which
one cause this behavior. Or does the system also hangs even none of your
applications running on it? Also, it'll be better if we can isolate the
problem to a simple function call level.

BTW, what's the activesync's version you're using , is it RTM or beta
version one. If convenient, you can also test the applications on both real
device and emulator to see whether the same behavior occur.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
JimP
2/21/2006 4:47:27 PM
Thanks for your reply.

We have run the application(s) in every possible combination, and the issue
only occurs (but is 100% reproducible) with all three applications enabled.
If we disable the Systems Management tool, the problem does not occur. If we
re-enable SM, and stop our application, the problem does not occur. If we
have both SM and our application running, but disable ActiveSync, the problem
does not occur. Only with all three things running does the problem occur.

Further, we must be docked in the USB cradle for the problem to occur. As
soon as we un-dock, the problem corrects itself (though it takes a minute or
two).

We're using ActiveSync 4.1.0, build 4841, which we understand is the RTM
version.

We don't use the emulator very much - way too slow - but I will try to
deploy the application to the emulator to see if we get the same results. I
should have an answer tomorrow.

Thanks,
stcheng NO[at]SPAM online.microsoft.com
2/24/2006 12:00:00 AM
Thanks for your followup Jim,

This will make the troubleshooting more difficult. What's the approach you
use to make your application communicate with SM, I'm thinking whether it
is something of the communiation between the two applicaiton conflict with
something used by the ActiveSync. However, it's really hard to detect from
appearance and so far I haven't heard any known issue on this.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
AddThis Social Bookmark Button