Hi,
The axfer in alsa-utils has test programs for internal modules and overall time to execute them takes much. The issue is filing in github repository[1]. It comes from three causes:
1. file I/O operations are done in file system for actual storage 2. Some cases operate much audio data frames (over 4MB, approx.) 3. much test iteration count (so simple...)
This patchset uses shm by memfd_create(2) for the cause 1. In addition, the number of maximum audio data frame to test is reduced as well as the number of samples per frame.
I got benchmark with berow machine environment.
* AMD Ryzen 5 2400G * memory total 30823852 KB * linux-image-5.8.0-44-generic on Ubuntu 20.04 amd64 * ext4 on SATA SSD
As a result: |container| mapper | | test | test | ================== | ======= | ======= | Current | 112 min | 5 min | +shm | 58 min | 50 sec | +maximum reduction | 38 min | - | +iter reduction | 4 min | - |
In my opinion, the issue comes from package build server in each distribution. 5 min for test execution is not so worse time.
Finally, test programs run on shm and commit c3f2344b7209 is reverted[1] since it's useless now.
(I have free time at last from reverse-engineering work to analyze protocols of RME Fireface series[1], and start to solve stacked issues.)
[1] https://github.com/alsa-project/snd-firewire-ctl-services/pull/37 [2] https://github.com/alsa-project/alsa-utils/issues/19 [3] https://github.com/alsa-project/alsa-utils/commit/c3f2344b7209
Regards
Takashi Sakamoto (14): axfer: minor code arrangement for container module in a point of nonblocking flag axfer: minor code arrangement in a point of stdio detection axfer: minor code arrangement in a point of opened file descriptor axfer: minor code arrangement to allocate containers axfer: open file descriptor outside of container module axfer: maintain lifetime of file descriptor outside of container module autotools: preparation to use memfd_create(2) axfer: test: minor code arrangement to use the same file descriptor for container-test axfer: test: use memfd_create() for container-test axfer: test: minor code arrangement to use the same file descriptor for mappter-test axfer: test: use memfd_create() for mapper-test axfer: test: reduce test case for maximum number of frame count axfer: test: reduce test case for maximum number of samples per frame Revert "axfer: test - add run-test-in-tmpdir.sh script"
axfer/container.c | 57 +++++++++++----------------- axfer/container.h | 10 ++--- axfer/subcmd-transfer.c | 64 ++++++++++++++++++++++++++------ axfer/test/container-test.c | 53 +++++++++++++++++++------- axfer/test/mapper-test.c | 55 ++++++++++++++++++++++----- axfer/test/run-test-in-tmpdir.sh | 19 ---------- configure.ac | 5 +++ 7 files changed, 167 insertions(+), 96 deletions(-) delete mode 100755 axfer/test/run-test-in-tmpdir.sh