We've launched our new site at www.openlighting.org. This wiki will remain and be updated with more technical information.
Difference between revisions of "OLA Thread Scheduling"
From wiki.openlighting.org
(→Results) |
|||
Line 34: | Line 34: | ||
<pre> | <pre> | ||
− | $ i=0; while :; do echo "$i"; i=$((i+1)); if [ $i == 256 ] ; then i=0; fi ; sleep 0. | + | $ i=0; while :; do echo "$i"; i=$((i+1)); if [ $i == 256 ] ; then i=0; fi ; sleep 0.025; done | ola_streaming_client -u 1 |
</pre> | </pre> | ||
Line 40: | Line 40: | ||
<pre> | <pre> | ||
− | tcpdump -n '(port 5568 or port 6454) and (dst host 239.255.0.1 or dst host 192.168.3.115)' -c | + | tcpdump -n '(port 5568 or port 6454) and (dst host 239.255.0.1 or dst host 192.168.3.115)' -c 10000 -s0 -w /tmp/savefile-fifo |
</pre> | </pre> | ||
Line 48: | Line 48: | ||
$ olad --scheduler-policy fifo --scheduler-priority 10 | $ olad --scheduler-policy fifo --scheduler-priority 10 | ||
</pre> | </pre> | ||
+ | |||
+ | From the tcpdump, we can find the time between sending the ArtNet packet and receiving the E1.31 packet, and then plot these on a histogram: |
Revision as of 19:24, 28 December 2014
Since 0.9.4, OLA provides options to control the thread scheduling algorithms, when supported by the host kernel.
Besides the default scheduling policy (SCHED_OTHER), OLA supports SCHED_RR and SCHED_FIFO. You can read about the differences on The Linux Journal.
Configuration
If you're on Linux you need to edit /etc/security/limits.conf and add:
<username> hard rtprio 99 <username> soft rtprio 50
Replace <username> with the user you run olad as.
Running OLA
Start olad with --scheduler-policy and --scheduler-priority. You must provide both flags.
$ olad --scheduler-policy fifo --scheduler-priority 10
The --scheduler-priority flag must be a value less than or equal to the soft rtprio limit set in /etc/security/limits.conf.
Results
The test setup was as follows:
- Intel i5-3450, running Debian Wheezy, set to send ArtNet traffic on universe 1
- Raspberry Pi, configured to receive ArtNet traffic and convert to sACN traffic on universe 1.
- Both hosts connect to a netgear 5 port switch. The Pi was connected at 100Mbps, the Debian host at 1Gbps.
On the Debian host, the traffic was generated with:
$ i=0; while :; do echo "$i"; i=$((i+1)); if [ $i == 256 ] ; then i=0; fi ; sleep 0.025; done | ola_streaming_client -u 1
And the packets captured with:
tcpdump -n '(port 5568 or port 6454) and (dst host 239.255.0.1 or dst host 192.168.3.115)' -c 10000 -s0 -w /tmp/savefile-fifo
On the Pi, the control was with no scheduling options. Then the fifo scheduler was enabled with
$ olad --scheduler-policy fifo --scheduler-priority 10
From the tcpdump, we can find the time between sending the ArtNet packet and receiving the E1.31 packet, and then plot these on a histogram: