Update on Acer E3-112 performance
Here's an update to my posting of 03.03.15 in this thread on how I'm running Pianoteq on my lightweigt Acer E3-112 laptop under Xubuntu Linux (should work with all Ubuntu varieties). I've gotten Performance index up to nearly 23, and I have a nice-looking program launcher that sets everything up.
When I'm using the laptop for other tasks, especially on battery, I don't want maximum performance from the processor, but when when I start Pianoteq, I want to suspend unnecessary background tasks and change to the power management regime "performance" to get the most polyphony and audio bandwidth I can. To do this from a shell script you normally need to get administrator privileges (e.g. with gksudo), but you can circumvent this with by adding a line in the file /etc/sudoers (use sudo visudo -s) that looks like this, assuming your user name (whoami) is "pianoplayer" :
pianoplayer ALL = (root:root) NOPASSWD: /usr/bin/cpufreq-set
This allows you to use sudo for cpufreq-set without entering a password, even in a script.
I then wrote a short script that turns off networking and revs up the power management regime only when I start Pianoteq. You might also want to suspend other background services, like file indexing, that you don't need while practising. Use Task Manager or ps to see what other processes are using noticeable cpu time.
#! /bin/sh
# deactivate Gnome NetworkManager (nm-applet)
nmcli nm sleep true
#
# put all cores in "performance" regime
# requires the line
# pianoplayer ALL = (root:root) NOPASSWD: /usr/bin/cpufreq-set
# in /etc/sudoers (use sudo visudo -s)
sudo cpufreq-set -c 0 -g performance
sudo cpufreq-set -c 1 -g performance
sudo cpufreq-set -c 2 -g performance
sudo cpufreq-set -c 3 -g performance
#
# start Pianoteq with first-in, first-out, real-time priority 88
# assumes user is member of group audio and that the line
# @audio - rtprio 90
# appears in /etc/security/limits.conf
chrt -f 88 '/path/to/my/Pianoteq 5'
#
# reactivate NetworkManager
nmcli nm sleep false
# return to power saving regime
sudo cpufreq-set -c 0 -g powersave
sudo cpufreq-set -c 1 -g powersave
sudo cpufreq-set -c 2 -g powersave
sudo cpufreq-set -c 3 -g powersave
To make a nice-looking launcher icon, I extracted the Pianoteq logo using a trick I described in a different posting (09.03.5) and made a desktop laucher icon containing the paths to the icon, to the Pianoteq executable, and to the folder where I keep midi files (in Xubuntu, a right-click on the desktop background).
In my earlier posting I reported an average Performance index of nearly 21, but with the adjustments made here I get about 22.5. In the Rachmaninov prelude I see the polyphony jump as high as 83 with both sampling rates at 44.1kHz. Processor temperatures never exceed 58°C after half an hour. As before, it appears that Pianoteq requests real-time scheduling with priority 65 (as reported when started from a terminal), but the shell command ps shows that it is really running with priority 88, as requested in by chrt, with first-in, first-out scheduling policy -- which, I've read, can give a small improvement over the default round-robin, policy. In fact, it appears that -f (Fi-Fo) gains about half a Performance point over -r (round-robin).
You can look at the scheduling (and other) parameters using the shell command ps (see man ps):
$ ps -C Pianoteq -l shows priority/nice? as -29
$ ps -C Pianoteq -o policy,rtprio,vsz
POL RTPRIO VSZ
FF 88 211628
where:
POL = scheduling policy or class of the process;
class FF = a First-In, First-Out real-time process
RTPRIO = realtime priority
VSZ = virtual memory size of the process in KiB (1024-byte units).
By the way, for various reasons, I wanted to replace the Acer laptop's mechanical hard drive, but I had serious problems when I changed to a Samsung EVO 850 SSD, and a recent report in the German magazine c't suggests this may happen with laptops from other manufacturers as well. I tried Kubuntu, KXstudio and finally Xubuntu on the SSD, and I found that with all of them the shutdown sequence hangs; when you forcibly turn the power off, the file system gets corrupted in the way in does when power fails. My solution: in /etc/default/grub change the appropriate line to GRUB_CMDLINE_LINUX="". This must be done from grub's "recovery mode", *before* you start the system the first time. Make sure to use only ext4 file systems. If at startup you get file system error messages, do thorough file system recovery before anything else. Apart from that, no problems that can't be solved by normal adjustments in the Settings applets.