Jump to content

WinXP items to turn off for smooth operation


Mike Ashe

Recommended Posts

I am running a LabVIEW optical inspection application under WinXP. Each iteration through the processing loop is triggered by a IMAQ-1394 (Firewire) camera occurence. We then grab images, analyze ROIs, select lookup table values and switch digital outputs (PCI-DIO-96).

I have a time budget of about 70 milliseconds/iteration to keep up. In reality I am using about 15 mS/iteration as shown by a time chart. The time line is pretty stable and flat. Every so often, (a few seconds, etc) for no apparant reason the time will spike up to some value between 25-150 mS.

I am assuming that the WinXP OS is doing something, or some other application, etc. The installation is on a new Dell machine, the default installation.

What do you guru's turn off in XP to make your apps as smooth as possible and how do you disable/delete said items?

Thanks in advance for any wisdom anyone has to offer.

Link to comment

Mike, I'm glad that you asked this question. Recently I have been getting DAQmx errors in WindowsXP when users perform window-related operations (switching between windows, launching apps, dragging windows around). I found that if I configure windows for "Performance" (no special window effects, classic window appearance, etc.) that the problem goes away.

Could you do us all a favor? Please compile the list of suggestions and tips that you receive and post it to the forums. This would make a wonderful LabVIEW FAQ entry.

Link to comment

Hi Michael:

I've struggled with similar problems many times, and with several versions of Windows. Following suggestions are not specifically relevant to XP, (and may not even be helpful with XP) but they have helped me in the past:

1. Uninstall any networking drivers for networks you do not need-- Especially if the physical network associated with the driver is not present! Previous versions of Windows took much longer to service network drivers for missing networks than for those that were actually present. Not sure if this is still true. Also, not sure if it is true for drivers related to USB or Fire wire I/O devices that are not present, but it wouldn't surprise me.

2. Turn off automatic file compression & similar "nice" (but not essential) features of the OS

However, it seems like no matter what I do, Windows will occasionally wander off to do some time-consuming and (to my mind) unimportant housekeeping task while I'm trying to do something time-critical and synchronized to the real world. It just isn't a RTOS, its better in this regard than it used to be, but it seems like it will never really replace LVRT (or other RTOS's) for the timing critical stuff.

I too am very interested in hearing all the other suggestions you can collect on this topic!

Best Regards, Louis

Link to comment

I tend to be a little fanatical about optimizing the performance of Windows, and probably do some things that make little or no difference. Here is at lease a preliminary list of possible items to include in a FAQ. (I'll include everything, even the obvious)

1) check the "Programs -> Startup" menu - delete everything not needed

2) programs which automatically start from the registry can be found in:

"\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run"

3) virus scanning software may not be necessary if the computer is connected to a secure network, or none at all

4) Stop Windows "Automatic Updates"

5) Stop Windows "System Restore"

6) Stop Windows "Indexing Service"

- This can be turned off by disabling it on the hard drive, or finding it in the list of services and disabling it, but the best way is to completely uninstall it "Add/Remove Programs --> Windows Components --> Indexing Service"

7) Stop unnecessary services

- Right Click on "My Computer", select "Manage", expand "Services and Applications", select "Services": all the services that are running are listed in the panel to the right. DO NOT stop any services unless you are reasonably confident they are not needed. Chances are you'll find at least half a dozen or so that are just not needed for your application.) Information about most services can be found at: Services 411

There are other tweaks I've done, most can be found at the following web site:

Tweaking XP

John

Link to comment
  • 11 months later...

Hi,

I believe one of the reasons behind such OS events is caching and swapfile management.

Windows (among others) will try to optimize its performance by trying to cache things up in memory (dlls, filesystem accesses and such) in order to react faster. And if you have a lot of memory, it will cache a lot. This should be ok, except if it's done at a "bad time", while you are acquiring and processing an image.

At the same time, it will write some allocated data AND code memory segments to swap on disk, because it decides those won't be needed, or simply because more space in real RAM is needed and those blocks are less important.

So, two mechanisms at work: disk caching and virtual memory (swapfile). Both may occasionaly trigger disk and memory reading and writing.

Anyway, my point is, given enough RAM (depends on your software, but 1 gig at least for XP) , you can turn off windows swapfile completely.

I used to do this in Linux machines to avoid waste of time with swap (again, assuming I would always have enough ram), and even in old Win 95,etc, to save laptop's battery (avoiding use of hard drive). Using a RAM drive would help too. (having a drive running off from your memory, instead of disk).

Nowdays, if you have 2 gigs of real RAM memory, and disable swapfile, XP will cache almost everything it needs, and will (more) rarely write or read from disk.

Some will advise against this and will suggest instead creating a RAM drive and make swap work with that RAM drive. This, to me is kind of silly, (and probably tricky to arrange), because basically you are using up memory with a RAM drive, so that then you can swap memory into memory to release memory - yeah! silly enough to me...but, I may be unware of architectural details and OS design options that justify this.

You can also pre-copy an entire branch of .exes and .dlls into a RAM drive and start your application from there. You can use a dll dependency browser to decide which dlls you should move into that RAM drive before you run your app. By doing this, even if XP doesn't cache some code in memory, it will be reading them from a disk with the memory-like speed (many 10's of times faster, at least).

Another dependency you break with not having a swapfile is thermal calibration. Most drives (except those which are built to specifically avoid this) will perform some thermal calibration to the drive heads' alignment (and disk speed?somebody?) every few minutes or so.

When thermal calibration is being performed, disk cache at the electronics in the disk may, or may not, be enoough to avoid suspension of normal flow of data to and from disk. By not having a swapfile, you avoid risking your OS to decide now it's time to swap something from/to memory at the same time the drive is doing thermal calibration and pam! you have unreasonable cycle times...

All this tends to be worse when you allocate lots of frames in memory for processing and then deallocate. Lots of memory allocation, deallocation, management, caching decisions, swaping decisions...

Hope this helps! BTW, I do this regularly in our vision systems, despite not having ever done real tests on the impact of this strategy.

I would particularly like to know the impact of using SCSI controllers instead of IDE, and filesystem format (FAT vs NTFS). Does anybody know more about these?

Regards,

Silvio, CALMETRIC

www.calmetric.pt

Link to comment

I agree with everything stated so far, but would add 2 simple things

1. I use the Process Explorer <Process Explorer>From Sysinternals.com This FREE utility will allow you to see what is running in the background, and optionally disable it. There is also another FREE utility at the sysinternals site called AutoLogons which will allow you to easily browse and diable stuff that starts when Windows boots (it is easier than browsing the registry).

2. Video Acceleration This has been an issue with Labview in the past, if the video acceleration is too high it will cause glitches trying to resync what is displayed on the front panel. This problem seems to show up especially in Laptops. Click on Display>>Settings>>Advanced, then check the tabs for a acceleration or Troubleshooting Tab.

Link to comment
  • 2 weeks later...
I agree with everything stated so far, but would add 2 simple things

1. I use the Process Explorer <Process Explorer>From Sysinternals.com This FREE utility will allow you to see what is running in the background, and optionally disable it. There is also another FREE utility at the sysinternals site called AutoLogons which will allow you to easily browse and diable stuff that starts when Windows boots (it is easier than browsing the registry).

2. Video Acceleration This has been an issue with Labview in the past, if the video acceleration is too high it will cause glitches trying to resync what is displayed on the front panel. This problem seems to show up especially in Laptops. Click on Display>>Settings>>Advanced, then check the tabs for a acceleration or Troubleshooting Tab.

Yes - SYSInternals is great - lots of applications. TCPView is also very interesting when diagnosing problems with OPC or other network related issues in labview (or anything else).

Thanks for the hw video acceleration tip.

PS Explorer will also allow you to browse DLL dependency tree, so it's handy when creating distributions (.exe setup) to know which DLLs are required (there are other tools for this...)

Finally, PS Explorer will also show Context Switches delta, ie. how many times a certain process is picked up to run - how frequently - and then you'll notice how heavy firewalls and antivirus apps tend to be, doing context switching all the time.

What I would really like is to have individual entries running under svchost.exe process - so one could pinpoint which services are more damaging to the system. Does anybody have a suggestion?

Silvio

www.calmetric.pt

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.