Hi, My first post here in quite awhile. Thanks in advance. I posted this to Wine-Users but got no responses. For a number of reasons this problem is pretty important to we Linux Audio users.
The following is a set of very simple instructions to show Wine using 100% CPU usage. I am using Wine-0.9 from Gentoo portage. Another user is using an fc2 RPM file. We both see identical results.
Duplicating these results and seeing 100% CPU usage using the following instructions takes no more than 10 minutes.
<DOWNLOAD AND INSTALL INSTRUCTIONS>
mkdir SAVITEST cd SAVITEST
wget http://www.hermannseib.com/programs/savihost.zip unzip savihost.zip
wget http://www.rgcaudio.com/downloads/freeware/triangle110.exe wine ./triangle110.exe (Install into /home/XXX/SAVITEST)
wget http://www.greenoak.com/crystal/dl/Crystal.zip unzip Crystal.zip
cp savihost.exe Vstplugins/Triangle\ I.exe cp savihost.exe Crystal.exe
<END OF INSTALL>
At this point we are setup and ready to run Wine to test things out. Here's what my test directory looks like:
mark@lightning ~/SAVITEST $ ls -la total 17400 drwxr-xr-x 3 mark users 4096 Nov 9 11:22 . drwxr-xr-x 63 mark users 4096 Nov 9 11:17 .. -rw-rw-rw- 1 mark users 11120640 Mar 5 2005 Crystal.dll -rw-r--r-- 1 mark users 319488 Nov 9 11:22 Crystal.exe -rw-r--r-- 1 mark users 3702635 Mar 5 2005 Crystal.zip drwxr-xr-x 2 mark users 4096 Nov 9 11:22 Vstplugins -rw-r--r-- 1 mark users 8252 Aug 10 22:25 license.txt -rw-r--r-- 1 mark users 319488 Oct 11 12:54 savihost.exe -rw-r--r-- 1 mark users 136046 Oct 12 10:30 savihost.zip -rw-r--r-- 1 mark users 2153712 May 25 2003 triangle110.exe mark@lightning ~/SAVITEST $ ls -al Vstplugins/ total 4100 drwxr-xr-x 2 mark users 4096 Nov 9 11:22 . drwxr-xr-x 3 mark users 4096 Nov 9 11:22 .. -rw-r--r-- 1 mark users 3780608 Jul 2 2001 Triangle I.dll -rw-r--r-- 1 mark users 319488 Nov 9 11:22 Triangle I.exe -rw-r--r-- 1 mark users 753 Nov 9 11:18 unins000.dat -rwxr-xr-x 1 mark users 71917 Nov 9 11:18 unins000.exe mark@lightning ~/SAVITEST $
<DOING THE TEST> To run the test open two terminals, start top to monitor CPU usage in one terminal, and then run Wine on the two copies of Savihost in the other terminal. No messages from Wine are produced. Here's what we see on our systems:
mark@lightning ~/SAVITEST $ wine ./Crystal.exe mark@lightning ~/SAVITEST $ wine ./Vstplugins/Triangle\ I.exe mark@lightning ~/SAVITEST $
When running Savihost the VST dll is run also. You will see the instrument and a keyboard. Play the keyboard with your mouse to hear the instrument. Under the Savihost 'effect' menu you can change the sound programming of the synth if you want to. Watch CPU usage in top. When running Crystal.dll in Savihost.exe the system uses 100% CPU, while the Triangle I synth uses very little CPU.
Note that we are running the exact same application here - savihost.exe. It's just renamed to the VST instrument name to tell it what VSTi instrument to run.On our systems, both 32-bit and 64-bit, we see about 15% usr, 85% sys when running Crystal, while we see only 5% usr, 5% sys when running Triangle.
WHY?
We have tried this with many VSTs. It seems that possibly 50% of them are 100% CPU consumers. This is not isolated to just Crystal.dll.
Thanks in advance to anyone willing to help us look at this and hopefully improve Wine.
Cheers, Mark
Note that we are running the exact same application here - savihost.exe. It's just renamed to the VST instrument name to tell it what VSTi instrument to run.On our systems, both 32-bit and 64-bit, we see about 15% usr, 85% sys when running Crystal, while we see only 5% usr, 5% sys when running Triangle.
WHY?
I haven't tried to reproduce it myself, but I have 2 questions
* Appart of eating up all CPU time, does the application work? Does it what it's supposed to do?
* How does the application perform in Windows? Maybe it's an application bug, and the same thing happens in Windows.
On 11/10/05, Stefan Dösinger stefandoesinger@gmx.at wrote:
Note that we are running the exact same application here - savihost.exe. It's just renamed to the VST instrument name to tell it what VSTi instrument to run.On our systems, both 32-bit and 64-bit, we see about 15% usr, 85% sys when running Crystal, while we see only 5% usr, 5% sys when running Triangle.
WHY?
I haven't tried to reproduce it myself, but I have 2 questions
- Appart of eating up all CPU time, does the application work? Does it what
it's supposed to do?
Yes, within reason all the VSTs that we have tried, if they work at all, do what they are supposed to do. There are still a large number of VSTs that don't work under Wine but things are MUCH better with Wine-0.9 AND using Savihost. Until recently there were other strategies for running VSTs in Linux. Using Savihost is fairly new for Linux. (The last month or so)
Note that while it works it is using CPU and stopping other apps from getting as much as they would like to get.
- How does the application perform in Windows? Maybe it's an application bug,
and the same thing happens in Windows.
Good question. I haven't tested this specific one (Crystal) in Windows. I'll try to do that. I will say that I _think_ there are MANY Windows VSTs that when run with Savihost and Wine are using 100% CPU. I do not _think_ that all of these (if any) have this problem under Windows, but I will look at it today.
Thanks for responding.
Cheers, Mark
On 11/10/05, Mark Knecht markknecht@gmail.com wrote:
On 11/10/05, Stefan Dösinger stefandoesinger@gmx.at wrote:
Note that we are running the exact same application here - savihost.exe. It's just renamed to the VST instrument name to tell it what VSTi instrument to run.On our systems, both 32-bit and 64-bit, we see about 15% usr, 85% sys when running Crystal, while we see only 5% usr, 5% sys when running Triangle.
WHY?
I haven't tried to reproduce it myself, but I have 2 questions
- Appart of eating up all CPU time, does the application work? Does it what
it's supposed to do?
Yes, within reason all the VSTs that we have tried, if they work at all, do what they are supposed to do. There are still a large number of VSTs that don't work under Wine but things are MUCH better with Wine-0.9 AND using Savihost. Until recently there were other strategies for running VSTs in Linux. Using Savihost is fairly new for Linux. (The last month or so)
Note that while it works it is using CPU and stopping other apps from getting as much as they would like to get.
- How does the application perform in Windows? Maybe it's an application bug,
and the same thing happens in Windows.
Good question. I haven't tested this specific one (Crystal) in Windows. I'll try to do that. I will say that I _think_ there are MANY Windows VSTs that when run with Savihost and Wine are using 100% CPU. I do not _think_ that all of these (if any) have this problem under Windows, but I will look at it today.
Hi Stefan, OK, I'm writing you from my Win XP box. (I haven't used this machine in weeks!) I tested both Crystal and Triangle I. They both work as expected. Neither use much CPU power according to task manager.
The problem does seem to be a Wine issue.
NOTE - I do not think this is somethign new. I've seen programs running under Wine in the past using 100% CPU, but they were big complicated programs and not available freely so it would have been hard to work on. I think with the information I've given in the first post this should be something more people should be able to look at more easily.
Cheers, Mark
The photodex plug in is another app that runs at 100% and because of that the audio is choppy.
Just go to this url with firefox for windows and install the plugin. http://www.photodex.com/sharing/spotlight/demoshows_rharris.html Paul R.
Hello,
NOTE - I do not think this is somethign new. I've seen programs running under Wine in the past using 100% CPU, but they were big complicated programs and not available freely so it would have been hard to work on. I think with the information I've given in the first post this should be something more people should be able to look at more easily.
This is odd, I downloaded the programs, but I can't reproduce the behaviour. Triangle seems to work just fine - I can play sounds(or, better, I could, if I had more idea of music ;-) ). Hardly any CPU usage. With crystal running, I get 1% user, 0.3% system cpu usage, but I can't hear any sounds. Are there any settings I have to change to make the program play something?
So the usual questions arise: *What kernel do you have(I have 2.6.14.1) *What X version(X.Org 6.8) *Graphics card + driver(Radeon mobility M9, fglrx) *Sound card + driver(some realtek audio, snd-intel8x0)
The high system cpu usage looks suspicios, there might be a driver issue. I've seen this behavior with the radeon driver from X.org and Battlefield 1942.
The fact that the same .exe file produced different behavior is easy to explain: The program seems to be just a loader for a dll file with the same name. So if you exchange the crystal.dll and the triangle I.dll, it's likely that you get changed behavior. So you can even save disk space if you just create symlinks to savihost.exe ;-)
I suspect my no-sound issue to be connected with the problems you describe. You could try to use different sound drivers(oss, alsa, arts, esd). Arts and esd might be interesting here, because there's no direct hardware access, so there should be no high system cpu usage.
Stefan
On 11/10/05, Stefan Dösinger stefandoesinger@gmx.at wrote:
Hello,
NOTE - I do not think this is somethign new. I've seen programs running under Wine in the past using 100% CPU, but they were big complicated programs and not available freely so it would have been hard to work on. I think with the information I've given in the first post this should be something more people should be able to look at more easily.
This is odd, I downloaded the programs, but I can't reproduce the behaviour. Triangle seems to work just fine - I can play sounds(or, better, I could, if I had more idea of music ;-) ). Hardly any CPU usage. With crystal running, I get 1% user, 0.3% system cpu usage, but I can't hear any sounds. Are there any settings I have to change to make the program play something?
No difference here. Both play fine for me on Linux and Windows with no fooling around.
So the usual questions arise: *What kernel do you have(I have 2.6.14.1)
2.6.14-rt6
*What X version(X.Org 6.8)
xorg-x11-6.8.2-r6
*Graphics card + driver(Radeon mobility M9, fglrx)
Radeon X300 (PCIE), radeon driver from the kernel
*Sound card + driver(some realtek audio, snd-intel8x0)
NForce4 CK804 + snd-intel8x0 RME HDSP 9652 + snd-hdsp
The high system cpu usage looks suspicios, there might be a driver issue. I've seen this behavior with the radeon driver from X.org and Battlefield 1942.
Indeed, I am using that driver. I have not discovered how to build the fglrx driver using 2.6.14-rt6. Additionally there is no DRI support (as I understand it) for PCI Express cards until 2.6.15. I have 2.6.14.1 unbuilt right now as I normally need realtime capabilities, but I'll build it and test it for this problem.
The fact that the same .exe file produced different behavior is easy to explain: The program seems to be just a loader for a dll file with the same name. So if you exchange the crystal.dll and the triangle I.dll, it's likely that you get changed behavior. So you can even save disk space if you just create symlinks to savihost.exe ;-)
Probably true. I'll try it as I will eventually end up with 100 of these little VSTs and Savihost is often bigger then the VST it's hosting.
I suspect my no-sound issue to be connected with the problems you describe. You could try to use different sound drivers(oss, alsa, arts, esd). Arts and esd might be interesting here, because there's no direct hardware access, so there should be no high system cpu usage.
Good ideas. I'll give it a try.
In a related vein, we in the Linux audio community are dieing for someone here to pick up maintenance of the Jack driver as most all of our apps are Jack based. Currently the Jack driver seems broken as there was a Jack API change circa 100.0. Is there anyone here looking after that driver?
I'll try other sound options and come back later.
Thanks!
- Mark
On 11/10/05, Mark Knecht markknecht@gmail.com wrote:
On 11/10/05, Stefan Dösinger stefandoesinger@gmx.at wrote:
Hello,
NOTE - I do not think this is somethign new. I've seen programs running under Wine in the past using 100% CPU, but they were big complicated programs and not available freely so it would have been hard to work on. I think with the information I've given in the first post this should be something more people should be able to look at more easily.
This is odd, I downloaded the programs, but I can't reproduce the behaviour. Triangle seems to work just fine - I can play sounds(or, better, I could, if I had more idea of music ;-) ). Hardly any CPU usage. With crystal running, I get 1% user, 0.3% system cpu usage, but I can't hear any sounds. Are there any settings I have to change to make the program play something?
No difference here. Both play fine for me on Linux and Windows with no fooling around.
So the usual questions arise: *What kernel do you have(I have 2.6.14.1)
2.6.14-rt6
*What X version(X.Org 6.8)
xorg-x11-6.8.2-r6
*Graphics card + driver(Radeon mobility M9, fglrx)
Radeon X300 (PCIE), radeon driver from the kernel
*Sound card + driver(some realtek audio, snd-intel8x0)
NForce4 CK804 + snd-intel8x0 RME HDSP 9652 + snd-hdsp
The high system cpu usage looks suspicios, there might be a driver issue. I've seen this behavior with the radeon driver from X.org and Battlefield 1942.
Indeed, I am using that driver. I have not discovered how to build the fglrx driver using 2.6.14-rt6. Additionally there is no DRI support (as I understand it) for PCI Express cards until 2.6.15. I have 2.6.14.1 unbuilt right now as I normally need realtime capabilities, but I'll build it and test it for this problem.
The fact that the same .exe file produced different behavior is easy to explain: The program seems to be just a loader for a dll file with the same name. So if you exchange the crystal.dll and the triangle I.dll, it's likely that you get changed behavior. So you can even save disk space if you just create symlinks to savihost.exe ;-)
Probably true. I'll try it as I will eventually end up with 100 of these little VSTs and Savihost is often bigger then the VST it's hosting.
I suspect my no-sound issue to be connected with the problems you describe. You could try to use different sound drivers(oss, alsa, arts, esd). Arts and esd might be interesting here, because there's no direct hardware access, so there should be no high system cpu usage.
Good ideas. I'll give it a try.
In a related vein, we in the Linux audio community are dieing for someone here to pick up maintenance of the Jack driver as most all of our apps are Jack based. Currently the Jack driver seems broken as there was a Jack API change circa 100.0. Is there anyone here looking after that driver?
I'll try other sound options and come back later.
Thanks!
- Mark
Hi Stefan, I switched to a vanilla 2.6.14.1 kernel and tried both radeon and fglrx. Identical results:
Wine-0.9 + 2.6.14.1 + radeon driver runing Crystal:
Cpu(s): 16.3% us, 83.7% sy, 0.0% ni, 0.0% id, 0.0% wa, 0.0% hi, 0.0% si
Wine-0.9 + 2.6.14.1 + fglrx driver running Crystal
Cpu(s): 16.3% us, 83.7% sy, 0.0% ni, 0.0% id, 0.0% wa, 0.0% hi, 0.0% si
One thing I noticed about Crystal is that the default sound actually requires that you press a key hold it for a bit before the sound gets started. Maybe that's why you didn't hear anything?
LATE BREAKING NEWS: It appears that when I switch to the Alsa driver the CPU usage does down to normal. Were you using Alsa or OSS?
Cheers, Mark