Ubuntu/Linux lmms users: delay/lags/high CPU: read this

Write guides and how-tos about LMMS for other members.
Hi Linux (and some other Linux distroes) users of lmms,

If you - like me - use lmms on a not so top-of-the-line box and hit lags, delays, excessive CPU consumption or some sort of trouble related to system resources when playing music, I found a useful resource there: http://wiki.linuxaudio.org/wiki/system_configuration
It gives a lot of tricks for you to try to make things run smoother.

There is also an interesting diagnosis tool there: https://github.com/raboof/realtimeconfigquickscan
It is a bit abandoned but, the perl script analyses your Linux kernel settings ans suggest changes (even giving links for more information) to improve performances for music making, even without a real-time kernel. But be prepared to google to go further :lol:

I used both resources to tune up my box, a P4 2.8GHz with 2 Gb of memory running Ubuntu 12.04 LTS (no realtime kernel) and all the problems related to resources were solved without even changing the lmms settings related to performance.

If this can help at least one lmms user, I will be happy ;)
Scary stuff, I guess one could really screw his install up with some of the settings. Should come with a big red warning written over it! :D

However, mostly there are some things I'd like someone to clarify, if the information even exists.

First, latency. If one doesn't record anything (no real instruments, no MIDI keyboards etc.) does latency have ANY meaning? If you just use Piano Roll, a 100 ms latency is of no consequence. So no optimisation necessary. :D

Second, CPU power. Only thing which really makes LMMS to make huge CPU hits, is VSTs (i.e. VeSTige+Wine+VSTi). For those, I guess, not much can be done, because they use their own (more or less Wine-related) stuff?

Of course, there's a lot of reasons to optimise, but I really think only those with very specific needs need to consider.

But, if you're using real world as a part of your setup, then latency and realtime needs are very much an issue. Recording is VERY latency sensitive. Same with performing with MIDI keyboard.

Correct me, because usually my opinion is wrong. :mrgreen:
Hi simple_impulse,

There is nothing so scary in adjusting Linux parameters for a just-a-bit-more-than-average user. ;)
Nothing really desctructive in changing them (at least these ones).
The worst that can happen: it does nothing better, the best: it somewhat boosts your old box time of reaction.
I did not put these links blindly on the forum, you know. I personally tried most of the suggestions from these sites and I can certify that my box could boot normaly after each change.

To try these adjustments, I used the safe old method:
  • 1- Change ONE parameter as suggested
    2- Reboot (if required)
    3- Try lmms and see if it works better
    4a- Not better -> reverse the change
    4b- Works better -> keep the change
    5- Go to 1 with the next parameter
If one change could compromise the boot process it is clearly stated on the sites so, if you're not willing, just do not try it :lol:

Anyways since I made the adjustments my old box breath better running Linux in general not just for lmms :)

If I never try, I would never have known. It's a matter of personal choice, as always in life 8-)
Sorry, midi-pascal, I didn't mean to be negative.

I just thought there are so many young reckless beginners who might render their Linux boxes unbootable with making broad changes. I've done that myself, to point, I had to boot with distro CD and correct configs with text editor... :D

But I still maintain that if there is no need for some feature, there is no sense to optimise it. Unless your hobby is optimization. :D

But I can see that the information you present is valuable.
Zyn uses a lot of CPU... And some ladspa effects can suddenly jump up the CPU. You have been warned.
^ also: vocal formants.