[pulseaudio-discuss] [PATCH v2 1/2] scripts: Introduce benchmark_memory_usage.sh

Tanu Kaskinen tanuk at iki.fi
Sat Oct 31 06:39:32 PDT 2015


On Wed, 2015-09-23 at 18:30 +0200, Ahmed S. Darwish wrote:
> Add shell script to sample PulseAudio memory usage while increasing
> the number of connected 'paplay' clients over time.
> 
> Linux kernel /proc/$PID/smaps Private and Shared_Dirty fields are used
> to accurately measure the total size of used dirty pages over time.
> This shall be useful for benchmarking the PA daemon's memory while
> introducing new features like per-client SHM access and memfds.
> 
> Also add an empty benchmarks-collection directory 'benchmarks/'. All
> output from the benchmarking tools shall be saved in this place, with
> timestamps and symbolic links to the newest versions.
> 
> Signed-off-by: Ahmed S. Darwish <darwish.07 at gmail.com>
> ---
>  Makefile.am                       |   3 +
>  scripts/benchmark_memory_usage.sh | 131 ++++++++++++++++++++++++++++++++++++++
>  scripts/benchmarks/.gitignore     |  10 +++
>  scripts/benchmarks/README         |   4 ++
>  4 files changed, 148 insertions(+)
>  create mode 100755 scripts/benchmark_memory_usage.sh
>  create mode 100644 scripts/benchmarks/.gitignore
>  create mode 100644 scripts/benchmarks/README

Thanks! I now pushed both patches to master with a couple of changes
(see below). Sorry for the delay.

> - Added symlink paplay -> pacat if ./src/paplay does not exist
>   in the build tree (as is the case without make install)

This didn't work properly. Giving a vorbis file resulted in white
noise, because src/pacat is a libtool script that starts src/.libs/lt-
pacat, and the symlink name doesn't propagate to the new process. These
changes fixed that:

-[ -L "$PA_PLAY" ] || ln -sf pacat $PA_PLAY
-PA_PLAY_PROCESS_NAME="lt-pacat"
+[ -L "$PA_PLAY" ] || ln -sf .libs/lt-pacat $PA_PLAY
+PA_PLAY_PROCESS_NAME="paplay"

-- 
Tanu


More information about the pulseaudio-discuss mailing list