View Issue Details

IDProjectCategoryView StatusLast Update
0007501ardourbugspublic2017-11-06 04:32
Reportertimbyr Assigned To 
Status newResolutionopen 
Product Version6.0-pre0 
Summary0007501: Increased DSP load with master/6.0-preX compared to 5.12
DescriptionI realize that work on the master branch is a work in progress but I have noticed an increase in the DSP values with the same session using optimized builds of 5.12 and master(f7bca32a).

A simple session with 27 audio tracks I see a DSP value of about 8% in 5.12 and 18% in master with optimized builds using a buffer size of 512 samples.

While the increase may be necessary to enable new functionality or a result of unfinished changes etc others will notice the increase, so this issue is intended to track any relevant changes.

Two changes I'm aware of in master that are having an effect:

- Resampling is now occurring in AudioPort::cycle_start/end using a separate thread pool to the process threads.

- There is now a DelayLine in each Route that increases processing and is (as yet) not optimized [ Now optimized - see below ]

I'm attaching a pair of traces(for use with chrome/ium://tracing) that shows the difference that the resampling makes to the timing of AudioEngine::process_callback
TagsNo tags attached.



2017-11-03 12:05



2017-11-03 12:06


Ardour-5.12.trace.tar.xz (825,036 bytes)


2017-11-03 22:17



2017-11-03 22:24

developer   ~0020078

I've uploaded a trace that traces the portion of Route::roll spent in DelayLine::run

These traces intended to be used for comparison between traces and not as representations of accurate measurement(as there is tracing overhead etc).

i.e If the implementation of DelayLine::run changes(optimized) I'll re-run the same trace and compare.


2017-11-04 11:56



2017-11-04 12:10

developer   ~0020079

There was some optimization of Delayline::run in d26ad5573c and after running as similar trace as possible using the same session I can confirm a marked improvement.

The avg per call time of DelayLine::run was reduced from roughly 0.032ms to 0.004ms and the avg time of Session::process was reduced from 0.715ms to 0.558ms.

It doesn't seem to reduce the DSP values that much, but it is a positive step. Nice work.


2017-11-06 04:04



2017-11-06 04:32

developer   ~0020080

There has been some optimization of PortManager::cycle_start/end so I reran a trace of AudioEngine::process with master@77a94e101

To summarize the timings from the attached files with the same session, a buffer size of 256 samples and transport speed == 1 (normal playback)

5.12 : AVG DSP value 8%

AudioEngine::process_callback : 0.505 ms
PortManager::cycle_start : 0.045 ms
Session::process : 0.408 ms
PortManager::cycle_end : 0.025 ms

master@77bca32a : AVG DSP value 22%

AudioEngine::process_callback : 0.992 ms
PortManager::cycle_start : 0.261 ms
Session::process : 0.471 ms
PortManager::cycle_end : 0.235 ms

master@77a94e101 : AVG DSP value 12%

AudioEngine::process_callback : 0.780 ms
PortManager::cycle_start : 0.121 ms
Session::process : 0.531 ms
PortManager::cycle_end : 0.092 ms

Issue History

Date Modified Username Field Change
2017-11-03 12:04 timbyr New Issue
2017-11-03 12:05 timbyr File Added: Ardour-master-6.0-f7bca32a.trace.tar.xz
2017-11-03 12:06 timbyr File Added: Ardour-5.12.trace.tar.xz
2017-11-03 12:08 timbyr Description Updated
2017-11-03 22:17 timbyr File Added: Ardour-master-DelayLine-f7bca32a.trace.tar.xz
2017-11-03 22:24 timbyr Note Added: 0020078
2017-11-04 11:55 timbyr File Added: Ardour-master-6.0-d26ad5573c.trace.tar.xz
2017-11-04 11:55 timbyr File Deleted: Ardour-master-6.0-d26ad5573c.trace.tar.xz
2017-11-04 11:56 timbyr File Added: Ardour-master-6.0-DelayLine-d26ad5573c.trace.tar.xz
2017-11-04 12:10 timbyr Note Added: 0020079
2017-11-04 12:11 timbyr Description Updated
2017-11-06 04:04 timbyr File Added: Ardour-6.0-master-77a94e101-AudioEngine-process.trace.tar.xz
2017-11-06 04:32 timbyr Note Added: 0020080