Win32 console processes in VISTA - 10% CPU, but VERY SLOW

I have a Win32 console application that does some compilation compiled in Compaq Visual Fortran (which probably doesn't matter).

I need to run a lot of them at the same time.

In XP, they take about 90-100% of the processor together, they are very fast. In Vista, no matter how many of them I run, they take up no more than 10% of the CPU (together) and are very slow accordingly.

There are quite a few console releases going on, but there are a lot right now. I can minimize all windows, it doesn't help. The CPU basically does nothing ...

Any ideas?

Update:

No, they are different machines, but they use relatively the same equipment. 2. No threads are used, this is a VERY OLD (20 years old) DOS application compiled in win32. It is supposed to compute the iterations until they collect and destroy whatever it has. My impression - VISTA just DOES NOT GIVE MORE CPU

+1


source to share


6 answers


Have you tried redirecting the console output to a file? If your applications are lingering writing to the console (this happens sometimes, unfortunately), then output redirection should help, as it is much faster to write to a simple file than to write to the console.

You do it like this:

c:\temp> dir > output.log

      



If you don't really care about the exit, you can throw it away by redirecting it to nul

. eg:

c:\temp> dir > nul

      

+2


source


Vista introduces a famous "feature" that limits some console applications to 32MB of RAM. I don't know if this Compaq Visual Fortran compilation affects this "feature".



This article seems to have been updated back in October 2008, so the issue still exists.

+2


source


To put it this way, your XP machine can be bound to a processor for this process, while a Vista machine is bound by some other resource.

To clarify: Outputting to stdout (or otherwise) can slow down processing. (as well as context switching or file access, etc.)

+1


source


As Tim hinted, the console output (stdout) is extremely expensive.

I suggest repeating the test, redirecting the console output to a separate log file for each process. If possible, adjust the verbosity of the output in another test run.

In addition, there are other obvious possibilities: is the hardware significantly different, are there other underlying processes, is there a shared resource that is at stake?

Beyond the obvious, look for an opaque resource conflict such as a shared file.

But the main area I would look at is whether there is a significant difference in how your code is compiled for the two OS environments - I'm wondering if your Fortran code has some special punishment when running on Vista such as Compatibility Mode. See how well Vista is supported and if your compiler for Vista can be targeted. Also look out for those who report similar issues, such as bug reports, feature requests, etc.

+1


source


Your loops are obviously not simple calculations. There's a blocking system call in there somewhere. Just because it worked on XP doesn't mean that the application is bug-free.

Since you can minimize the console windows and see no improvement, I would not consider this issue. In my experience, console output only slows down a program if the console window is drawing text, not when it is minimized.

+1


source


Is this the same hardware on your Vista and XP? He can only use 10% of Vista because it doesn't require more. Are you using Thread? I think this requires more information about your project. Are you trying to use a profiler to see what's going on?

0


source







All Articles