MantisBT

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0007501ardourbugspublic2017-11-03 05:042017-11-05 20:32
Reportertimbyr 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusnewResolutionopen 
PlatformOSOS Version
Product Version6.0-pre0 
Target VersionFixed in Version 
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.
Attached Files? file icon Ardour-master-6.0-f7bca32a.trace.tar.xz [^] (1,403,520 bytes) 2017-11-03 05:05
? file icon Ardour-5.12.trace.tar.xz [^] (825,036 bytes) 2017-11-03 05:06
? file icon Ardour-master-DelayLine-f7bca32a.trace.tar.xz [^] (296,104 bytes) 2017-11-03 15:17
? file icon Ardour-master-6.0-DelayLine-d26ad5573c.trace.tar.xz [^] (378,172 bytes) 2017-11-04 04:56
? file icon Ardour-6.0-master-77a94e101-AudioEngine-process.trace.tar.xz [^] (1,904,892 bytes) 2017-11-05 20:04

- Relationships

-  Notes
(0020078)
timbyr (developer)
2017-11-03 15:24

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.
(0020079)
timbyr (developer)
2017-11-04 05:10

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.
(0020080)
timbyr (developer)
2017-11-05 20:32

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 05:04 timbyr New Issue
2017-11-03 05:05 timbyr File Added: Ardour-master-6.0-f7bca32a.trace.tar.xz
2017-11-03 05:06 timbyr File Added: Ardour-5.12.trace.tar.xz
2017-11-03 05:08 timbyr Description Updated View Revisions
2017-11-03 15:17 timbyr File Added: Ardour-master-DelayLine-f7bca32a.trace.tar.xz
2017-11-03 15:24 timbyr Note Added: 0020078
2017-11-04 04:55 timbyr File Added: Ardour-master-6.0-d26ad5573c.trace.tar.xz
2017-11-04 04:55 timbyr File Deleted: Ardour-master-6.0-d26ad5573c.trace.tar.xz
2017-11-04 04:56 timbyr File Added: Ardour-master-6.0-DelayLine-d26ad5573c.trace.tar.xz
2017-11-04 05:10 timbyr Note Added: 0020079
2017-11-04 05:11 timbyr Description Updated View Revisions
2017-11-05 20:04 timbyr File Added: Ardour-6.0-master-77a94e101-AudioEngine-process.trace.tar.xz
2017-11-05 20:32 timbyr Note Added: 0020080


Copyright © 2000 - 2017 MantisBT Team
Powered by Mantis Bugtracker