1. IMPORTANT:
    We launched a new online community and this space is now closed. This community will be available as a read-only resources until further notice.
    JOIN US HERE

K3 CPU Usage G5 vs Intel

Discussion in 'KONTAKT' started by richardein, Jan 14, 2008.

Thread Status:
Not open for further replies.
  1. richardein

    richardein NI Product Owner

    Messages:
    22
    As I try to improve my setup, I recently ran an informal Kontakt-related experiment. I'd like to get some feedback on it.

    I want to run a "sample farm," that is, I want to set up Kontakt so that it runs the same sounds every day without need for adjustment and without causing clicks or distortion.

    Therefore, the question I want to answer is: How many stock Kontakt instruments (with their convolution reverbs removed) can comfortably run at one time from one instance of Kontakt running on one computer alone?

    Based on my experience, the short answers are:

    1. Less than 9 instruments on a G5 dual 2.7 8 gigs ram

    2. Perhaps as many as 18 instruments on a Macbook Pro Dual 2.4 gig 4 gigs ram.


    Here's what I did:

    First, I opened K3 on a 2.7 gig G5 (8 gigs ram, Motu Traveler interface) and loaded up a multi with the VSL flute, oboe, clarinet, and bassoon. Later I added the harp and marimba from other parts of the stock Kontakt library. As mentioned, I eliminated the convolution reverb from all presets. The sounds played dry.

    I also loaded in some choral samples converted from an Akai disk. Kontakt's latency was set to the lowest possible. DFD was at the factory settings, and multiprocessor was off. CPU overload protection was disabled.

    On this machine, only this K3 multi and Activity monitor were running.

    On a second machine (1.8 gig G5 5 gigs ram), I created a Digital Performer sequence with rapid notes - just notes, no controller data. Via the Traveler's midi ports, I connected this mac to control the one running Kontakt.

    I assigned the rapid note sequence first to the flute only and checked both the sound quality and the Activity Monitor. As that worked well, I duplicated the midi data to a second track and assigned that to the oboe. Both instruments together also played without problems. I kept on duplicating the data and assigned it to more and more tracks.

    After 3 or 4 instruments were playing the same music, I started to notice both clicks in the sound and CPU peaks in Activity Monitor. My goal was to keep the lowest latency I could, so I tried to adjust DFD and CPU overload to get rid of them. Failing to get rid of the clicks and peaks, I eventually raised the latency. The noise and cpu peaks disappeared so I added another track to the rapid passage. As that played without problem, I kept on adding more instruments, adjusting DFD, CPU, voices, and latency to maintain smooth playback. As latency rose, I also experimented with turning on and off multi-processor support, only adding a new instrument to the mix when all current instruments were playing back with no problems.

    On my G5 dual 2.7 gig, I reached a total of 9 simultaneous instruments able to play back the rapid music without any problems most of the time. This was at the highest latency, with all other settings tweaked as carefully as could.

    I was curious what difference an Intel Mac would make, so I transferred both the Kontakt multi and my DP file to my Macbook pro dual 2.4 gig 4 gigs ram, this time running both the sequencer and Kontakt on the same machine.

    There was a significant improvement. All nine Kontakt instruments played back the rapid passage using less than half the amount of CPU as they did on the G5. I didn't continue testing as I usually use the Macbook Pro only on the road. But maybe I should also use it in the studio. My guess is that I could probably get around 18 different instruments to play simultaneously with no problems.

    Two other observations:

    While Kontakt permits you to twiddle other parameters besides latency, only the adjustment of latency made a *major* difference in terms of reliable playback. The adjusting of pre-buffers and CPU overload protection can improve playback somewhat. However, if your goal is a "set it and forget it" sample farm that just works well without too much additional attention, You need to set a conservative limit of use for your sample farm, so it will work reliably under all real-world conditions. I found that after a lot of study of "DFD Demystified" and the manual, as well as considerable experimentation, DFD adjustments can help a little but don't significantly add that much of a cushion of usable head room.

    When you're composing, the last thing you want to do is stop writing and spend a half hour setting buffers to get a second trombone to play back. You simply want a trombone track that sounds good (for a trombone) and doesn't ever click or distort. Perhaps when computers were a lot less powerful, access to these settings made sense. Now, they don't improve things enough to bother too much with.

    The other thing I noticed is that the major limiting factor for playback is not Ram, but cpu horsepower. I wasn't even coming close to the 32 bit limit on program space (less than 2 gig in reality), even when I substantially increased the memory for streaming. The limiting factor was the G5's processors. The intel machine was dramatically more efficient.

    I'd be curious to get your reactions and comments, whether this agrees with your experience, or whether you've had different results or suggestions.
     
  2. pencilina

    pencilina New Member

    Messages:
    30
    Hi Richard,

    I just dove into K3. I've been trying to properly configure a set and forget orchestral PC to trigger with Digital Performer. (A post I made details some of my battles:
    http://www.native-instruments.com/forum_us/showthread.php?t=60064
    )
    and after hours of fiddling with the DFD settings I've come to the very same conclusion as you- the only thing that really seems to help playback is adjusting the ASIO latency. Yep, giving K3 more ram doesn't really do much except maybe confuse it and make matters worse. It'll load stuff with plenty of ram headroom and then choke or give me an error. I'm considering a faster processor or maybe a different OS. I suspect the end of the story is the most the most typical one- you need the fastest computer possible. I also noticed on other threads people with 4 or more cores were having good results. It wasn't so long ago that you needed a whole farm of machines to get a decent orchestra up so if it means spending a couple hundred more to drop in another chip I might have to bite the dust. I wish I could know definitively whats up. A new thread with a multi and some midi files maybe so people could post their specs?

    best
    b
     
  3. Boo55

    Boo55 NI Product Owner

    Messages:
    46
    this is really interesting. thanks for all of the careful research you are doing.

    i am getting a larger ensemble (25 instruments) to play on my dual core 2GHz G5 with Kontakt 2 running on the same machine as DP (2 instances of Kontakt) or as standalone with Sibelius 5 (via IAC buses), though I'm not using much from the VSL library.

    Bruce
     
  4. richardein

    richardein NI Product Owner

    Messages:
    22
    Pencilina,

    It's a good idea to post a multi and a sequence. I will try to get that together. My sequence was a quick, out of tempo, sloppy file. If I have time tomm'w I will reproduce what I did in a more presentable fashion.

    Boo55,

    What instruments are you running? What is your latency setting? Did you fiddle with cpu overload, multiprocessor support or DFD?
     
  5. Boo55

    Boo55 NI Product Owner

    Messages:
    46
    hi Richard-

    Chamber orchestra, mostly DD.
    Latency 9ms.
    CPU overload disabled.
    Multi-processor support unchecked.
    Channel buffer size 348.

    Don't know how close any of this is to optimum.
    I was tearing my hair out for a few days trying to get things to run without "snap, crackle, freeze".

    Something that may have helped was when I reduced the setting for the number of maximum voices on each instrument, as their defaults were higher than I think I'll ever need.
    B.
     
  6. richardein

    richardein NI Product Owner

    Messages:
    22
    Boo5,

    Tx for the info. Will duplicate. Yes, I had reduced all the voices in the multi arbitrarily from 32 to 16. Am now resetting them as low as possible. Will post results.
     
  7. richardein

    richardein NI Product Owner

    Messages:
    22
    Okay, I've done some more testing. Between hints from a friend and your comments here, I have been able to raise the number of instruments that can play back the rapid tutti passages to 13. Since it really is a "test" that is more demanding than a most real world music, that's pretty impressive. And I am only at 11 ms latency and I think I get that lower.

    The trick is to understand exactly how the buffers work for dfd. The parameters interact in a complex matter. You also need to set up as many buffers as you need, but - this is important - only as many as you need (plus a bit of a cushion, perhaps 25% to 50% more than the number of simultaneous voices you think you'll have.)

    It's complicated, it's certainly not intuitive for someone like myself, but I've learned there is much more horsepower available in Kontakt than I originally realized.
     
  8. pencilina

    pencilina New Member

    Messages:
    30
    Richard,
    That's good news. I want to be like you and understand WTF is going on with the DFD so I don't have to spend any more dough. But now I think I'm learning. To get this straight: each buffer is one mono voice- if I want 1 stereo voice - say a Vi1 section note then that note then that takes up 2 channel buffers. If I want 300 (stereo) voices I'd set the reserved channel buffers to 600. This makes sense. So does having a larger channel buffer size take strain off the CPU and prevent all those stupid glitches? And also, does setting more channel buffers (whether the polyphony is needed or not) create more strain on the CPU?

    Thanks so much in advance
    B
     
  9. richardein

    richardein NI Product Owner

    Messages:
    22
    B (Or pencilina),

    First of all, if you haven't done so already, re-read DFD De-mystified again. I am not sure at this point I completely understand what is going on, but I can tell you what worked here and how I understand it.

    1. There are different kinds of buffers in use by DFD in Kontakt. *Channel Buffers* hold in ram a small bit of a sample which resides on the hard disk. As the sound plays, the channel buffer empties and fills up again with another bit of the sound.

    2. Channel buffers are one per voice. Two channel buffers are needed for a stereo voice. Do this: Take a sound and hold down one note. In the instrument front pannel. Note the number of voices played. That's how many channel buffers you need to play that one note. If you are going to play many notes on that instrument, play a typical passage and note the highest voice count. That is how many channel buffers you will need for to play the passage.

    3. You set the number of channel buffers (and their size) in the expert settings of the DFD tab. You can also add a few more voices (say 15% more) to give yourself a little slack. Too much slack will actually degrade, not improve performance. FWIW, I'm running 13 instruments now with - vsl winds, brass, harp, and percussion along with custom chorus sounds - with 353 channel buffers.

    4. The size of the channel buffers is the tricky part. The Channel Buffer Size slider lets you set how much ram will be assigned to EACH channel buffer. The major limit on channel buffer size (assuming you have plenty of ram in your computer, and you should have at least 4 gigs) is the speed of your hard drive.

    Somehow, your drive has to find the time to locate and load up hundreds of little bits of samples. If you make the channel buffer size too large, the hard drive may not be fast enough to load all the channel buffers and you'll get clicks/distortion. If you make it too small, the hard drive may not have time to access the next bit of the sound it will need for smooth playback. And you will get clicks/distortion.

    5. There is another kind of "buffer" used in Kontakt called *Pre-load buffers.* Rather than set these globally in the DFD tab under the global options, you find the pre-load buffer tab within each instrument by clicking on the wrench, then clicking on the Instrument Options tab, then on the DFD tab. (You can also override the individual pre-load buffer sizes on your instruments from the DFD panel in global options, but I really would not do that. It did nothing good on my mac, that's for sure, and it took forever to adjust - the mac slowed to a crawl.)

    6. Short version: Don't mess with preload buffers. I could find no reason to do so. Below is an explanation of what they are.

    7. Pre-load buffers are one per *sample.* A tiny bit of the beginning of each sample is stored in RAM BEFORE you play anything. It is used to make sure you get instantaneous sound from the sampler whenever you play any note. Got that? You load up some groovy patch with multiple volume layers, you might have 200 samples. Kontakt assigns one pre-buffer to each sample, therefore in this example, there would be 200 pre-buffers assigned. The reason there are so many pre-load buffers is that the sampler has no way of knowing in advance what notes you are going to play so it has to be prepared to play any sample in the instrument.

    8. Note: you don't set the number of pre-load buffers. That's done automotically for every sample in your instrument.

    9. Unless, you make your own samples from scratch, or heavily modify a standard sound, there doesn't seem to be much reason to change pre-load buffer sizes (and kontakt warns you not to). The reason is that Kontakt has, presumably, optimized the pre-load buffer size for each instrument for most circumstances - and chances are that while your music is surely unique, the circumstances in which you are using Kontakt aren't. (grin)

    10. OTOH, you really must carefully adjust *Channel* buffer numbers and sizes if you are planning on playing back more than a few instruments.

    If I were you, I'd start very simply. First, turn off multi-processor support and cpu overload. Set latency to 9ms or so. Load up an instrument, calculate how many voices you're going to play and set that maximum voice number (with a little bit more) in the front panel of the instrument. It should play perfectly. If not, add a few more voices until it does.

    Add a second instrument, and again set the max voices. Both instruments should play perfectly. If they don't it may not be a Kontakt specific problem.

    Add a third and a fourth, ALWAYS setting the max voices. If you run into clicks, do a rough calculation of how many voices you're running, add a fudge factor and set the number of channel buffers in the DFD panel to that amount. It may be far lower than you have set right now or much higher. That will probably clear up the problems.

    If it does not, take an educated guess as how the speed of your hard drive might be a factor here. Raise or lower the size of the channel buffers, taking into account that either direction could be effective depending on the type of music, and density, and how fast your hard drive is.

    That should clear up any clicks, etc. Keep on adding instruments, setting the voices, and adjusting the DFD settings. Eventually it may not work that well. In that case, raise the latency to 11ms or more. And that will clear it up.

    This is what worked for me. Hope this helps you.
     
  10. richardein

    richardein NI Product Owner

    Messages:
    22
    One more thing. I removed all effects from vsl, both convolution and the stereo-izing effect. You might want to keep the stereo effect in place, but the best way to set up convolution is to set one convolution up on one aux track and use the aux busses for each instruments. I think this explained somewhere in the manual or elsewhere on the forum in case this is new to you.
     
  11. pencilina

    pencilina New Member

    Messages:
    30
    THANKS MAN! Now I understand. There should be a sticky of what you just wrote for other people as it makes more sense then the DFD Demystified doc. I'm gonna experiment today. Best
    Bradford
     
  12. navboy

    navboy NI Product Owner

    Messages:
    138
    Hmm, i've struggled with this recently and ended up taking a different direction. I had recently upgraded my RAM (P4 3.2GHz, WinXPSP2 32bit, CubaseSX3 hosting Kontakt2 as VSTi) from 2 to 4 GB and was all set to go from 4 hosted K2's to 6, to break up my orchestra more and get more patches per choir.

    But when i attempted to do i started getting Not Enough Memory errors, and yet i had tons of RAM free. After messing around with it for a week and being told by NI tech support not to run so many instances (AFAIK i can't do the standalone approach because my M-Audio Delta1010 ASIO driver doesn't support multiple sessions at once, or something), which clearly wasn't a solution for me, here is what i did to allow myself to now run 7 hosted K2's (and possibly more, i haven't really needed to move to the 8th yet):

    I upped the DFD memory to 120MB (i believe it had been at 60MB, but i can't recal now, and couldn't find the default specified in the Kontakt manual), i reduces the voices from 1024 down to 896 (these settings affect all instances of K2 that get hosted).

    Then, because CubaseSX3 is Large Address Space Aware (LASA), i added the /3GB switch to my boot.ini file and hell yeah - now everything is working like a charm. CPU isn't even close to bogging down, no clicks, etc. I was also did a test with just empty hosted instances of K2 before and after my change - before i could load about 9 instances before running out of memory, and afterwards i could load about 17 before i ran out of memory.

    The only thing i still don't understand about my issue was before my change, i was getting Memory warnings and maxing out K2 instances when Cubase was only at about 1.25GB of RAM usage, which is 750MB shy of its 2 GB allotment. Why is that? Similarly, after my changes, loading empty K2's bottomed out much higher, but it was still well shy of the now 3GB limit for Cubase - wonder why it's not getting its full allotment?
     
  13. richardein

    richardein NI Product Owner

    Messages:
    22
    navboy,

    Since I'm running Macs, I don't have any insight into any of the issues you raise, except that it sounds like your solution is similar to what I outline in my second long comment here regarding dfd settings.

    I do have one set of questions. Are the instances of Kontakt 16 instruments each or larger? What are the instruments you're running and how high is the polyphony? Did you alter the max voices settings on the instruments?
     
  14. navboy

    navboy NI Product Owner

    Messages:
    138
    Ahhh ... the main breakthrough was essentially giving the host sequencer (CubaseSX3 in this case) access to 3 GB of RAM rather than just 2.

    The K2 instances each have a maximum of 16 instruments (one for each midi channel) - this is apparently a limit of the VSTi standard, which seems crazy to me that it can't accomodate 64 channels. So i've got seven instances of K2 up and running - some of them are full, a few are about three quarters full, and will be full by the time i get done. Some will probably have more instruments loaded by using an instrument bank on a couple channels.

    I'm running East-West Quantum Leap Symphonic Orchestra Platinum, the "full" mic position, with a full orchestra including a piano (which has very high polyphony). I reduced polyphony moderately on certain instruments, but left plenty of headroom - for example, if the most voices i could ever get an instrument to produce was around 16, i'd leave the voices for that instrument set at 32. So, very conservative on the voice reduction. But in general i'd say most of my instruments are set to 32 voices, a few down to 16 or 24, a few at 48 or 64, and it seems like the piano is high like 128 or something.

    I'm thinking i could probably set my DFD memory back down from 120MB at this point - it was the first change i made, and once the /3GB switch got me adding more instances, i never went back to change it. I also disabled virtual memory, which again because i broke the cardinal rule of troubleshooting and made those multiple changes at once, i don't know if the extra ones mattered or not, but the switch certainly did, because i did that last, and that's when it started working without memory warnings again.
     
  15. richardein

    richardein NI Product Owner

    Messages:
    22
    All of what you wrote jibes with my own experience. Apparently, multiprocessor support is dependent upon latency. It only works well at higher settings. What is your latency and sample rate, btw?

    Regarding, the voices, mine are set very, very low, at the recc'd of a friend. For instance, I'm writing a piece for an orchestra with 4 french horns. Therefore, I've set the maximum voices for the Fr. Hn patch at maybe 16 or 20, tops. I suspect that had you lowered your voices, you wouldn't have had to do the 3 gig switch. But since you don't have to, why bother? grin.
     
  16. navboy

    navboy NI Product Owner

    Messages:
    138

    Actually, though, that's an excellent point, because as i add more and more articulations (i'm really just now beginning to develop a serious workflow since i'm on my first full orchestration attempt, so lots of "firsts" in developing templates, approach, articulations, etc.) i'm going to reach a limit either with RAM or my hard drives, since i'm not in a position to really afford a networked setup right now. And once that happens, i'll need to be able to economize on memory as much as possible in order to increase DFD allocations to take the strain off my hard drives.
     
Thread Status:
Not open for further replies.