Page 1 of 1

Multiple CPU cores

Posted: Wed Jan 23, 2013 11:36 am
by bodzio66
Do you plan to support for multiple CPU cores? What about the fact that I have a six core AMD CPU and virtually LS together with cooperating programs only work on two cores. In practice, it is used by only a third of the computer. Could be increased significantly and the number of voices polyphony. I do not mind that it was a commercial solution - (well, not too expensive), but I think it is very important at this stage of development of the LS Priority!

Re: Multiple CPU cores

Posted: Wed Jan 23, 2013 5:08 pm
by varpa
Do you find CPU usage of LS to be a problem? I find that LS uses very little CPU, especially compared to synths. But I typically do not load a many instruments, though I sometime use large samples (6GB Black Grand piano). In my experience, making LS multi-core does not appear to be a high priority.

Re: Multiple CPU cores

Posted: Thu Jan 24, 2013 9:12 am
by bodzio66
It's true. LS is a very cost-effective for the CPU. It's cool. But human nature is such that we still want more. Now I can afford to enjoy this polyphony of 125 votes, but 325 would be a lot better. For example, classical pipe organ, polyphonic in high resolution can not be completely done on one CPU.
LS is really good, why not be more efficient?

Re: Multiple CPU cores

Posted: Sat Jan 26, 2013 5:12 pm
by bodzio66
Again, he found a solution, at least half of the problem.
It is software that allows you to assign a process to a selected CPU core.
I found it here:
http://manpages.ubuntu.com/manpages/har ... ool.8.html
http://www.cyberciti.biz/tips/setting-p ... ocess.html
I shared my collection for a few starts LS on different ports, at the beginning of the ruler is a program that LS event to a specific CPU:
It's part of my activator:

schedtool -e -a 0x32 -e linuxsampler --lscp-port 8889 --exec-after-init 'cat /home/example_file_pianoforte.lscp | netcat localhost 8889' &
sleep 2
schedtool -e -a 0x2 -e linuxsampler --lscp-port 8890 --exec-after-init 'cat /home/example_file_bells.lscp | netcat localhost 8890' &
sleep 2
schedtool -e -a 0x4 -e linuxsampler --lscp-port 8891 --exec-after-init 'cat /home/example_file_organ.lscp | netcat localhost 8891' &

I checked - it works!
On a side note - is much needed sleep.
Badge & postage to unlock the shell.
Of course, it's just first attempt, you can more accurately distribute the CPU cores instruments - including auxiliary software. Practical coverage is greatly increased.

Re: Multiple CPU cores

Posted: Tue Jan 29, 2013 10:02 am
by bodzio66
Small correction. Schedtool simplified hex signs CPU. e.g.: 0x16 has been replaced by just the number 4 CPU core.
To simplify the detection process in which the CPU is working:
ps -eo psr,pid
I greet

Re: Multiple CPU cores

Posted: Sun Jan 12, 2014 2:22 pm
by cuse
Support for real SMP / multi core support is planned for a long time. It was not implemented yet due to other priorities.

There is a common work around for this: simply create multiple instances of the audio driver you are using. For example if you are using JACK as audio driver and have 4 CPU cores, then create 4 JACK audio devices and connect them to your sampler channels (sampler parts). Each audio device will have its own audio thread and its own disk thread. So if you connect sampler channels 0 to 5 to the first JACK audio device, then those sampler parts will run together on one CPU core. If you connect sampler channels 6 and 7 to the second JACK audio device, then those 2 sampler channels will run on another CPU core and so on. Drawback of this approach is a) that its a bit inconvenient for the user. Since the user has to consider and decide by himself how to distribute the individual sampler channels on the cores and b) this workaround does obviously not work if you are just using one single sampler channel (i.e. for a live performance with one single sound).

But that wokaround is still better, more convenient and more efficient than starting several separate instances of LinuxSampler!

Re: Multiple CPU cores

Posted: Tue Jan 14, 2014 10:30 am
by bodzio66
Thank you very much for your interest.
Great idea, so to simplify.
But I do not know how to assign a specific CPU thread to the audio channel. Can you give an example of some script?

Re: Multiple CPU cores

Posted: Wed Oct 22, 2014 9:55 pm
by zohaa3492
I do always download the latest builds since I am no programmer and have a hard time compiling the sources.

To my knowledge the WIN/AU plugins have preload times optimized for regular hard drives. With SSDs this preload could be reduced dramaticaly.

Is it possible to offer a download that is optimized for use with SSDs? This could save a lot of ram.

Re: Multiple CPU cores

Posted: Thu Oct 23, 2014 9:24 am
by bodzio66
I am working with disks SSD and is well