OS X Midiserver CPU usage

  • Hello!


    I have a lot of devices connected to my computer running LogicPro for making music - Motu 828 firewire, Powercore firewire, Motu MIDI Express128 (USB) and Virus TI Snow (USB). When I have them all connected to the computer then computer gets hot really easy, and the main reason seems to be that Midiserver takes the most CPU (20% - not much but still). And when I unplug the Virus it goes to about 0.7% CPU. I have also tested MIDI usage by using app called MIDIMonitor and it seems that Virus takes the most of it. Is there anything I could do for it not to take so much CPU or is it possible you could make better drivers for it?


    :huh:


    Computer is 2011 Macbook Pro running both Snow Leopard and Lion and the problem is the same in both systems.

  • In that case I think I should make it as a feature request. Because as I do use macbook pro for making music (not some crazy high benchmark desktop machine in a cupboard behind the wall) I have to just unplug Virus to make it quietly. Weird that all the other hardware that I use don't cause so much CPU usage for midiserver.


    And I also like it when it's snowy outside and it is right now where I am. Doesn't help!

  • youtube link
    The same thing doesn't seem to bother in Windows, but I'm not a windows user.


    System information:
    15-inch, Early 2011
    Processor 2,2 GHz Intel Core i7
    Memory 8 GB 1333 MHz DDR3
    Graphics AMD Radeon HD 6750M 1024 MB
    Software Mac OS X Lion 10.7.5 (11G63) - same problems were in 10.6.8


    :!:


    I wouldn't mind it at all, but it's totally absurd and the machine just screams and disturbs when Virus is plugged in.

  • I too noticed this issue today. The process mididserver even hang on 50% CPU. No VC, just midi over usb. When turned off the virus the usage of the process normalised to 0.xx with several midi devices online. Switched the virus back on, it takes some 15-20% alone. I'm on Mavericks, but still the same story...


    Zitat

    i wouldn't worry about the readings so much. the midi server process scales, the whole system is much more dynamic that it looks like. as for your mac getting hot: MBPs like to do that.


    This statement from an official is quite cynical imo, when clearly the Viruses MIDI deamon is responsible for the hog (and a potential resulting going hot of the machine)


    And this after I just regained pleasure with my snow after ditching audio over usb. Bummer. :whistling:

  • This statement from an official is quite cynical imo, when clearly the Viruses MIDI deamon is responsible for the hog (and a potential resulting going hot of the machine)


    it is not intended to be cynical. what do you mean by "going hot of the machine"? do you think a user land midi driver (which is not even a driver in a way) can consume so much CPU cycles that it brings down an operating system?
    marc

  • Hi Marc,


    Thanks for your answer.


    To be honest, I'm no expert concerning processes on the OS level.. But I know what I experienced yesterday. 98-100% CPU systemwide, 50% just for midiserver. Of course I had a million tabs open in my browser, but thats's not the point. After switching off the virus, CPU went down to 15-20% again.


    This doesn't happen always and I couldn't reproduce it yet, heck I can't even eliminate a third party software involved... But: Yes, the virus attached can lead to high CPU, causing a obvious slow down because no CPU time available and the fan going wild, since a machine doesn't like constant high CPU. This is of course IN MY EXPERIENCE.


    To answer your question, of course a "user land midi driver" can cause that, if there is a bug somewhere overloading the system!!? :)


    I know whining in a forum doesn't help. Be assured I report the issue if it happens again. But I felt the need to add my 2 cents, since the gentleman above was kind of not taken seriously.


    Cheers

  • Mysik - of course i don't know what type of CPU your mac utilizes but from what i understand this driver can, in theory, only max out one core. saying that, we have never seen our driver doing so. because the way things work, there is barely a chance it could occupy a CPU that much. in any case, if you check readings, for instance using "top -o CPU" you will see loads if things which do not reflect the real load on the CPU.


    but why don't we compare findings?


    here's logic on an mac book pro from 2011 with logic x running and the virus playing notes. this is the mac i'm typing on right now:


    PID COMMAND %CPU TIME #TH #WQ #PORT #MREG MEM RPRVT PURG CMPR VPRVT VSIZE PGRP PPID STATE UID FAULTS
    1206 Logic Pro X 25.8 03:08.38 27 2 469 2093 388M 363M 27M 0B 806M 4504M 1206 189 stuck 501 176683+
    0 kernel_task 13.2 06:59.71 101/8 0 2 573 912M 47M 0B 0B 56M 10G 0 0 running 0 18265
    92 WindowServer 12.6 05:38.87 4 0 518 3126 88M 152M 187M 0B 301M 3749M 92 1 sleeping 88 1295752
    1233 Terminal 9.4 00:09.24 9 3 192 195 19M+ 11M+ 72K 0B 70M 2541M 1233 189 sleeping 501 19373+
    1287 top 8.3 00:01.88 1/1 0 26 40 3140K 2912K 0B 0B 54M 2413M 1287 1268 running 0 25856+
    298 MIDIServer 4.8 00:29.08 6 1 133 108 2000K 2292K 0B 0B 91M 2481M 298 189 sleeping 501 2292

    this is the same with Virus Control on bypass


    PID COMMAND %CPU TIME #TH #WQ #PORT #MREG MEM RPRVT PURG CMPR VPRVT VSIZE PGRP PPID STATE UID FAULTS
    1206 Logic Pro X 15.6 03:35.91 28 3 470 2095 388M 363M 27M 0B 807M 4504M 1206 189 stuck 501 180386
    0 kernel_task 12.1 07:13.02 101/9 0 2 573 912M 47M 0B 0B 56M 10G 0 0 running 0 18265
    1287 top 8.2 00:11.84 1/1 0 27 43 3184K 2956K 0B 0B 64M 2423M 1287 1268 running 0 156700+
    92 WindowServer 6.7 05:47.44 4 0 521 3180 88M 145M 182M 0B 293M 3752M 92 1 sleeping 88 1300430
    298 MIDIServer 5.0 00:35.14 7 2 134 110 2000K 2292K 0B 0B 91M 2481M 298 189 stuck 501 2296

    best, marc

  • It just happened again after some hours with virus switched on.. Again, no VC, had Live and Max (m4l) running in between, but it hanged long after I closed them.. (concerning max at least the canvas)


    How does it matter if the metric is the actual value? If MIDIserver is on top (literally) crying for attention and my machine dead slow, and after turning off the virus everything is fine again, something obviously seems to be wrong with the service or whatever of the virus. It occasionally just hangs. Never had this with other MIDI hardware. btw TI SS 5.0.8, OSX 10.9.2


    I would need to isolate the issue from other midi hardware/software, but hey, I need it to work all together 8|


    Ironically this is supposed to be additional DSP :(


    I realize it would have been way more trustworthy to make actual screenshots.. next time.


    top -o CPU


    Hanging:


    PID COMMAND %CPU TIME #TH #WQ #PORT #MREG MEM RPRVT PURG
    490- MIDIServer 45.0 62:03.88 11/1 1 223 147 1032K 2364K 0B
    0 kernel_task 38.3 92:25.28 88/2 0 2 683 493M 19M 0B
    67 usbd 24.9 00:42.12 2/1 0 76+ 34+ 936K+ 584K+ 0B
    2599- Google Chrom 17.4 00:17.45 10 1 140 679 184M- 179M- 0B
    2613 top 13.9 00:03.43 1/1 0 22 33 1920K 1692K 0B
    344- Google Chrom 10.4 17:40.14 40 1 558 1075- 132M 102M 568K
    18 syslogd 8.6 00:17.74 9/1 8 164 53 8004K+ 7824K+ 0B
    1971- Max 6.3 18:01.65 9 1 367 708 85M 77M 0B
    206 WindowServer 5.7 24:30.86 5 1 553 3146 133M 43M- 27M
    1 launchd 3.2 02:15.53 3 0 2152 67 3912K 3728K 0B
    1590- MidiAutomapC 1.5 04:29.36 5 1 99 101 1184K 580K 0B



    Switched off Virus:


    PID COMMAND %CPU TIME #TH #WQ #PORT #MREG MEM RPRVT PURG
    2613 top 13.4 00:24.81 1/1 0 31 33 1984K 1756K 0B
    2599- Google Chrom 13.0 00:24.24 9 0 138 680- 187M+ 182M+ 0B
    344- Google Chrom 9.4 17:57.27 39 1 541 1073- 132M 101M 40K
    1205- CueMix FX 8.9 19:07.11 7 3 294 488 60M 60M 3288K
    206 WindowServer 8.5 24:44.91 4 0 571 3317 172M 39M- 23M
    1971- Max 6.9 18:10.78 8 0 358 706 85M 77M 0B
    0 kernel_task 5.3 93:20.46 87/2 0 2 625 482M+ 18M 0B
    2020 Terminal 2.1 00:05.05 8 2 196+ 260+ 12M+ 8580K+ 4096B
    1590- MidiAutomapC 1.5 04:31.72 4 0 97 99 1176K 572K 0B




    Switched on Virus again (Normal):


    PID COMMAND %CPU TIME #TH #WQ #PORT #MREG MEM RPRVT PURG
    0 kernel_task 16.7 93:29.22 88/2 0 2 662 479M 20M 0B
    490- MIDIServer 13.7 63:06.01 11 1 239 147 1200K 2468K 0B
    2613 top 13.3 00:33.78 1/1 0 29 33 1988K 1760K 0B
    1205- CueMix FX 9.1 19:14.71 7 2 314 489 60M 60M 3288K
    1971- Max 8.2 18:15.48 8 0 365 706 85M 77M 0B
    206 WindowServer 5.8 24:50.25 6 2 574 3346 188M+ 39M- 23M
    1590- MidiAutomapC 1.8 04:32.78 4 0 97 99 1180K 576K 0B
    2599- Google Chrom 1.7 00:26.78 9 0 138 706+ 199M+ 194M+ 0B
    353 SystemUIServ 0.9 03:48.75 4 1 269 828 13M 9788K 0B
    1588- AutomapServe 0.8 02:37.86 5 0 172 172 4736K 2872K 0B

  • Thanks Mysik for sharing the frustration!


    As much as I understand then Virus drivers are not developed by Access and it seems that as it doesn't cause such pain in Windows then perhaps OS X drivers are perhaps drivers made for Windows but ported to OS X?

  • I run my Virus for hours every day on Mac X 10.9.2 and 5.0.8, without any midi server issues. ( i run other alot of data thru core midi so would notice if its was struggling), midi server runs at about 3% on my machine when is use with


    one thing thats interesting, is the TIME state, yours look really high... this is either because you have been running your machine for a very long time (partly indicated as your kernel task is very high too) or midi server is constantly chewing cpu.
    do you reboot you machine regularly? you shouldn't need to but might be worth a try.


    the thing that strikes me is your usbd process is running at 25%, this is not right... my doesnt even register 1% even when I have audio running over it (using VC),
    all this process does is shift data, no complex processing, so its should hardly register... unless something is shifting very large amounts of data and constantly.
    (I assume your not using a USB hard drive, sound card etc as well as virus)


    Id say this points to an issue with your usb setup - have you tried removing all other usb devices, tried other usb ports, usb hub etc, check cables (etc)


    also Id have a look at your other midi devices, given you have automap running, id guess you have a novation device? perhaps you are getting some weird midi loop?


    Id also do a midi trace, and check whats being sent by max etc.



    "As much as I understand then Virus drivers are not developed by Access and it seems that as it doesn't cause such pain in Windows then perhaps OS X drivers are perhaps drivers made for Windows but ported to OS X?"
    they have stated they are developed by Ploytech, but I highly doubt they will be 'ported', as CoreMIDI on the mac is a very different animal to windows drivers.



    but id say review your usb setup... good luck (i sympathise, it took me a while to get my TI setup to a place I'm reasonably happy with)

  • I have tried it when only Virus is being connected and it's still the same. And reboots don't change anything either. It's been the same in 10.6.8, 10.7 and 10.9
    And if you looked at the screen recording which I linked here one page ago then you see how drastically things change when I unplug the Virus and plug it back in.

  • im not surprised, as i said usbd seems to be highly loaded...
    i assume no errors in the console?


    if you have the virus plugged in, and dont have virus control loaded, does cpu also rise?
    also are you using it as a soundcard? if so, try turning that off.. does cpu rise still?


    basically id say its not normal behaviour, so you need to systematically start eliminating possible causes...


    did you keep upgrading osx with this machine or install it fresh each time?
    ... i recently reinstalled my macbook pro after years of just upgrading it, and its much better now.


    if you have tried all usb possibilities id be tempted to reinstall osx from scratch, and then install virus first, check its working ok, then start reinstalling stuff checking virus as you go.


    i cant really think of much else - sorry

  • im not surprised, as i said usbd seems to be highly loaded...
    i assume no errors in the console?


    if you have the virus plugged in, and dont have virus control loaded, does cpu also rise?
    also are you using it as a soundcard? if so, try turning that off.. does cpu rise still?


    When virus is not connected MidiServer CPU usage is around 0.3%. When I just connect Virus to my computer MidiServer CPU consumption goes to 15~17% - this is when I just connect the USB cable, without running Virus Control or AU/VSTs
    I don't use it as a soundcard (audio interface)[/quote]



    I have had fresh installations for the machine and had the same result every time! I'm not going to try that (reinstalling OS X) anymore.

  • I have same problem. When Virus Snow connected by USB to Macbook, MIDIServer loading system up to 13-20%. Very sad. :rolleyes:
    We can try look at midi events by MidiMonitor app:
    [Blockierte Grafik: http://thumbnails111.imagebam.com/38216/2dc1de382156388.jpg]


    In MIDI specification "Active Sense" message written: "A device sends out an Active Sense message (at least once) every 300 milliseconds if there has been no other activity on the MIDI buss, to let other devices know that there is still a good MIDI connection between the devices."


    But, as you can see at the screenshot, messages Virus device send EVERY 0,5-1 MILLISECOND! Awesome!!! :thumbup:

  • Thats odd... on TI (keyboard), I get no active sense messages at all.
    (over USB, both with VC running and not running ... and I'm very familiar with Midi monitor, so I know I'm getting all midi messages,unfiltered)


    perhaps this is a TI Snow issue?