I saw that some of you guys seem to be using the sox multi-threaded
switch.

Let me contribute some benchmarking I did on my i5 NUC:

w/o multithreading:


Code:
--------------------
    
  
  Performance counter stats for '/tmp/sox -t flac /tmp/test.flac -t wavpcm -b 
24 /tmp/tmp.wav rate -v -b 90.4 -p 45 -a 352800':
  
  6.501,16 msec task-clock                #    1,000 CPUs utilized          
  58      context-switches          #    8,922 M/sec                  
  0      cpu-migrations            #    0,000 K/sec                  
  710      page-faults               #  109,214 M/sec                  
  17.471.508.084      cycles                    # 2687510,857 GHz               
  
  49.865.587.231      instructions              #    2,85  insn per cycle       
  
  3.663.382.219      branches                  # 563510570,528 M/sec            
 
  11.861.538      branch-misses             #    0,32% of all branches        
  
  6,502358582 seconds time elapsed
  
  6,098182000 seconds user
  0,402946000 seconds sys
  
  
--------------------



with multithreading:


Code:
--------------------
    
  Performance counter stats for '/tmp/sox --multi-threaded -t flac 
/tmp/test.flac -t wavpcm -b 24 /tmp/tmp.wav rate -v -b 90.4 -p 45 -a 352800':
  
  27.121,26 msec task-clock                #    3,955 CPUs utilized          
  823      context-switches          #   30,345 M/sec                  
  13      cpu-migrations            #    0,479 M/sec                  
  764      page-faults               #   28,170 M/sec                  
  67.649.699.828      cycles                    # 2494365,983 GHz               
  
  65.604.260.310      instructions              #    0,97  insn per cycle       
  
  8.144.344.634      branches                  # 300296620,110 M/sec            
 
  13.589.463      branch-misses             #    0,17% of all branches        
  
  6,857757586 seconds time elapsed
  
  26,580257000 seconds user
  0,542025000 seconds sys
  
  
--------------------


multithreading is not only a little - around 4% - slower (if we ignore
the accumulated processing time >400% ). It uses 4 CPUs and ten
thousands of extra cycles to achieve that. ;)

At least based on these results based on my real live resampling
testcase  I'd stay away from sox multithreading!

Enjoy.



:::'  my audioblog  - latest series: RaspBerry PI - \"The Audio Engine\"
' (http://soundcheck-audio.blogspot.com):::
------------------------------------------------------------------------
soundcheck's Profile: http://forums.slimdevices.com/member.php?userid=34383
View this thread: http://forums.slimdevices.com/showthread.php?t=105309

_______________________________________________
Squeezecenter mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/squeezecenter

Reply via email to