MS Access: 50% CPU Usage?

P

PeteCresswell

One of the apps I work on grabs 50% of the CPU upon startup - but only
sometimes.

Seems tb associated with some processing that gets done automatically
the first time somebody opens the app on a given date, but it also
happens occasionally when
the app is not doing that processing but I am testing a routine that
creates Excel spreadsheets.

But three things puzzle me:
------------------------------------------------------------------------
1) After I kill MS Access via TaskMan and start the app again, all is
well.

2) I am unable to Ctl-Break into the code while it's happening.

3) For the past several months, I've been getting dialogs to the
effect that
"This will stop whatever is running" when I'm editing code - even
though
nothing sb running.
 
P

Pat Keller

Clearly something is running. Do you have an AutoExec macro or "Display
Form" selected under Acess Options? You don't say which version - I'm
speaking of 2007, but similar constructs exist in all versions.

As to 50%.... are you running a Core2Duo? I run very large databases and,
in my experience, 50% is the absolute CPU cap. I can never get Access to use
more than that. I can't be certain only one core is being used, but it seems
too much a coincidence that I get a 50% cap with a 2-processor machine.
Anyway - I would guess that the ctrl-brk is not working because Access is
using every cycle it can get and can't process the break. That's why you
have to go to task manager. Just a hunch. 50% appears to be a virtual 100%
for the Access process itself.
 
A

a a r o n _ k e m p f

no, you don't work on VLDB.
Nobody in their right might would use Jet with VLDB. And if you call
25mb in Jet a 'VLDB', then I'm going to gag.

I should know-- I was working on 5tb databases back about a decade
ago, for Microsoft-- tracking down malware / spyware / adware / porn /
mp3s.

Now that we got that straightened out-- from what you're saying-- is
that MS Access doesn't support SMP.

This is Yet Another Symptom to Move To SQL Server.

SQL Server loves dual core / dual proc, etc.

-Aaron
 
A

a a r o n _ k e m p f

if you were using SQL Server, you could run profiler to see what is
really happening.
 
S

Sylvain Lafontaine

If it's very constant the 50% limit (and not only peaking up to 50% from
time to time) then this looks like an infinite Loop. Would happen if you
have forgotten something like MoveNext when reading a recordset inside a
loop until EOF.
 
P

PeteCresswell

If it's very constant the 50% limit (and not only peaking up to 50% from
time to time) then this looks like an infinite Loop. Would happen if you
have forgotten something like MoveNext when reading a recordset inside a
loop until EOF.

Yes, Dual-Core.

I see it hit 51 occasionally, but never more..... maybe within the
limits of rounding or something for 50%?

The weird part is that, at least some times, I'm about 99.999% sure
nothing sb running. I've had it happen a number of times while
editing code and not in break mode (i.e. the app should not be doing
anything at all).
 
P

Paul Shapiro

With some Access versions I remember seeing this whenever:
a) Access was opened and not minimized.
b) Nothing else was demanding CPU.
Minimizing the Access app eliminated the CPU usage.

I concluded/guessed that Access was polling Windows queues for user
interaction, and stopped when minimized because there wasn't any possibility
of user interaction. Never found any confirmation although I seem to
remember finding a KB article that appeared to offer some support for that
explanation. It made sense because Access managed the user interface more
directly than most Windows applications. This was also why video driver
issues surfaced more often with Access apps.

If this is anywhere close to the explanation, CPU usage could depend on the
particular controls on open forms, etc., and therefore vary from app to app
and even within an app.

Since Access is a single-threaded application, cpu usage on a dual-core
system can't reach more than 50%. That would mean Access was keeping one
processor busy full-time, which is the most it can do.
 
S

Sylvain Lafontaine

Access alone can't reach over 50% on a dual-core; however, don't forget that
there are always other things running on your computer.

My point was not to know if the percentage was something like 50% or 51% but
if was at a near constant speed of 50% or if it was varying considerably in
a mostly random fashion but with lot of CPU on average with pics reaching
50%. Infinite loops will usually show themselves with the first behavior
while other kinds of activity will usually (but not always) take the second
one.

Notice also that even with an infinite loop and CPU running at 50% (or over
because of other activities); sometimes, you will see short burst of lower
activity from the CPU because this task is interrupted by some low level
activity from the Windows OS. (For example, moving a window arround or
simply a scheduled wake-up fot a running service.). Don't forget that
Windows is multi-thread and nothing is absolute 100% of the time.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top