www.virtualacorn.co.uk/forum

For support and advice on VirtualAcorn products
Forums now closed. This is an HTML only record of the content.
HTML version of Forum generated Thursday 24th May 2018

All times are UTC [ DST ]




Post new topic Reply to topic  [ 10 posts ] 
Author Message
 Post subject: VRPC using 100% CPU
PostPosted: Fri Oct 30, 2009 11:44 am 
Offline

Joined: Thu Nov 28, 2002 7:08 pm
Posts: 69
Location: Cambridge
I've been using VRPC-SA long enough that I would expect to have noticed this problem if it had always been the case. My VRPC-SA on the 3.6GHz WinXP machine at work is using 100% CPU 100% of the time. Its working fine and its not sluggish but it seems to be wrong that its using 100% of one of the two CPU cores.

I checked on my home machine (VRPC-SE on 2.8GHz quad core WinXP) and CPU usage is down at 1 or 2%. Also, on the dual core 1.8GHz laptop its down at 1 or 2%. Ok, so you say it must be something that is running on VRPC-SA. Well, I killed every task running on RISC OS one by one until all that was running was the kernel, raw desktop and CPU usage app. It made no difference. Having had an issue with multiple copies of RSTools I checked that but only one instance is running (I have an auto-kill task that ensures only one instance is running). Interestingly, when I first noticed the problem there were two instances of RSTools running (I'm not sure how that escaped my auto-kill task during boot - possibly a timing issue) so I killed the second instance. The CPU usage then went from 80% of one core to 100%
(yes, you read that correctly) and since then, despite reboots of both VRPC and Windows, the usage stays at 100% even though only one instance of RSTools is running. Could the issue be with my auto-kill task? I think not, because I have the same thing running on all the other systems and they don't use 100% CPU.
Next, I tried booting RISC OS with nothing starting up except the default desktop - still the same 100% CPU usage.

Next, I tried an old copy of VRPC-SE on the 3.6GHz WinXP machine. It started at 100% CPU but after a few seconds dropped back to 1 or 2%. So it appears to be something in VRPC-SA that is sucking the CPU cycles. Next, I eliminated the loading of all non-essential DLLs in the VA.cfg and booted up again. Still the same 100% CPU.

So, at this juncture, it looks like one of the essential components of VRPC-SA is consuming excessive CPU power. I'm sure its not always been the case and I'm not aware of anything that has changed recently. I use the system every day and haven't made any changes to the VRPC configuration of a very long time.

Any ideas?


Top
 Profile  
 
 Post subject: Re: VRPC using 100% CPU
PostPosted: Fri Oct 30, 2009 12:34 pm 
Offline
Site Admin

Joined: Wed Oct 23, 2002 12:16 pm
Posts: 958
Sounds like the power management isn't kicking in. Without this a VRPC will run at full tilt regardless of the actual load from RISC OS. Check that power managment hasn't been disabled from the RISC OS Configure tool (double click on !Boot). If the VAPower plugin is missing then you might have replaced the !Boot sequence at some point.


Top
 Profile  
 
 Post subject: Re: VRPC using 100% CPU
PostPosted: Fri Oct 30, 2009 4:16 pm 
Offline

Joined: Thu Nov 28, 2002 7:08 pm
Posts: 69
Location: Cambridge
According to VAPower config, power management is enabled. I temporarily renamed Tasks.PowerManage to Tasks.!!PowerMan to execute it earlier in the boot sequence in case it wasn't getting run due to a failure in the boot sequence but it made no difference (and afik there are no failure during boot anyway). I also tried with and without battery management and I disabled it and re-enabled it with reboots between.
How can I check the status of power management?
BTW, changing the power managment setting requires a reboot but the reboot fails at a * prompt with an error "File open". Actually, normal exit back to Windows also fails (always has done) saying "Bad command 120". I have to manually kill VRPC. Does that give any clues? I've noticed that !VAShutDwn appears in different places from one version of VRPC to another.


Top
 Profile  
 
 Post subject: Re: VRPC using 100% CPU
PostPosted: Fri Oct 30, 2009 6:05 pm 
Offline

Joined: Thu Nov 28, 2002 7:08 pm
Posts: 69
Location: Cambridge
I just checked the VRPC console and it says:
'HostPower.dll': ok
PowerService: idling enabled (7ms timeslice)
PowerService: battery low indication defined by BIOS
PowerService: battery critical indication defined by BIOS
PowerService: Idle can idle until next interrupt
so it would seem that power management should be ok.
VirtualRPC-SA.exe appears to be version 1.1.0.0 dated 1/4/2006 17:59
I don't know if this info helps?


Top
 Profile  
 
 Post subject: Re: VRPC using 100% CPU
PostPosted: Sat Oct 31, 2009 12:48 pm 
Offline
Site Admin

Joined: Wed Oct 23, 2002 12:16 pm
Posts: 958
It sounds like this installation of VirtualRPC might be corrupted. I suggest:

Take a backup of the entire Installation from Windows.
Now (from Windows) delete !Boot from inside HardDisc4
Delete the rest of the install, except for HardDisc4 which must be left in place (do not use the uninstaller delete the parts yourself).
Re-install VRPC again from the orginal CD.
Unlock it and check it boots and that your work is present.
Now go to the downloads section of our werbsite and download the updates needed by this copy (carefully following the instructions)


Top
 Profile  
 
 Post subject: Re: VRPC using 100% CPU
PostPosted: Fri Nov 06, 2009 3:28 pm 
Offline

Joined: Thu Nov 28, 2002 7:08 pm
Posts: 69
Location: Cambridge
OK, this worked. Thanks.
I diff'd the old and new installations and could only find a couple of differences. One was hostfs2.dll (I guess that was because of some problem investiagtion we did a while ago) and the HostServices module (although disassembling this to compare the assembly listings showed no difference and I don't have a working binary compare tool).
The only other thing I could find was !VAShutDwn was in a different place, but I had removed that when trying to isolate the cause of the high cpu usage and it made no difference. So the cause of the problem is a bit of a mystery.


Top
 Profile  
 
 Post subject: Re: VRPC using 100% CPU
PostPosted: Fri Nov 06, 2009 5:25 pm 
Offline

Joined: Thu Nov 28, 2002 7:08 pm
Posts: 69
Location: Cambridge
Oh dear, things are not as good as I thought. Since following the instructions to re-install VRPC-SA I've been having lots of total hangs. At first I thought it was !PDF that was crashing but then hangs occured when using TechWriter, DirSync and the my original version of PDF. Each time it seems to have been associated with lots of NFS traffic (I'm using Sunfish). Since the only noticeable difference between my old installation and the re-installation is HostFS2.dll I've put it back to the one I had previously. This has not affected the cpu usage (its idling at 1 or 2%) but I'm waiting to see if this improves the reliability. The two DLLs are 76K (the official copy from installed upgrades) and 80K (the version I received a while back when investigating issues).

When these total hangs occur the cpu usage goes to 100% and Alt-Break does not do anything. The mouse pointer moves but VRPC has to be forcibly closed.

I also noticed that after reinstallation typing was missing characters (badly). I increased the processor priority to 3 (as it was previously) and things appear to be OK again. Clearly the default priority of 0 is not high enough even on a 3.6GHz dual core machine.

Any ideas?


Top
 Profile  
 
 Post subject: Re: VRPC using 100% CPU
PostPosted: Sat Nov 07, 2009 12:13 pm 
Offline
Site Admin

Joined: Wed Oct 23, 2002 12:16 pm
Posts: 958
First point, you shouldn't be using on of the beta versions of HostFS2. The correct one to use is the one supplied in the "HostFS Jan 2009 Update". Manually messing with components can easily cause problems as you can end up with incompatable bits :(

Did you follow my instructions and go and download and install all the updates from the VirtualAcorn website?

The ProcessorPriority value is set to 0 by default as this is correct for 90%+ of machines. Where a machine has lots of other stuff running that has a higher prioroty then it is sometimes necessary to increase the value of the ProcessorPriority flag. This is because is some circumstances VRPC can not get the CPU cycles it needs to keep the
emulation thread running correctly. The clock speed of the machine doesn't have much bearing on this. The number of cores does. A quad core machine will be able to run a lot more at the same time than a dual core machine. So, the problem is being caused by other app(s)/services that are being run on the machine.


Top
 Profile  
 
 Post subject: Re: VRPC using 100% CPU
PostPosted: Sun Nov 08, 2009 2:24 am 
Offline

Joined: Thu Nov 28, 2002 7:08 pm
Posts: 69
Location: Cambridge
I did follow your instructions, absolutely to the letter. The resulting system then had the problems I described (numerous hangs). It may still be too early to say for certain but after reverting to the beta hostfs2.dll and changing the procressor priority to 3 I had no more hangs during the remainder of the week (using VRPC all day, every day).
Because I don't know the intimate workings of the VRPC components I'm working from intuition and layman's reasoning but at this stage it seems to me that the fresh installation and all the upgrades applied in the correct order produced a system with reliability problems and my subsequent actions appear to have made an improvement (whether orthodox or not). Time will tell because in due course I'll revert back to the unaltered clean installation and see if the reliability changes.
The important thing, though, is that the 100% cpu usage problem is gone following the reinstall.

I believe the problem with missing characters when typing may be due to anti-virus software running in the background. On the system at work I have no control over this AV scanning as the IT sys admin controls the policies. On the machine at home I arrange scanning to occur at times when I'm out and now I have a quad core machine anyway so I never have any problems with typed characters being missed.


Top
 Profile  
 
 Post subject: Re: VRPC using 100% CPU
PostPosted: Mon Nov 09, 2009 12:01 am 
Offline
Site Admin

Joined: Wed Oct 23, 2002 12:16 pm
Posts: 958
I am pleased that the CPU usage problem has been resolved. I would expect the "hangs" - which were probably slow down events- have also been fixed. However...

Please Stop Using The Beta HostFS.


Top
 Profile  
 
 
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

   
Forums originally Powered by phpBB © 2007 phpBB Group. Contents © 3QD Developments Ltd 2018 version no. 1.07