[asterisk-users] Scaling Asterisk: High volume benchmarks (0 to 450 calls)

Matthew J. Roth mroth at imminc.com
Thu Jun 7 15:29:17 CDT 2007


Remco Post wrote:
> I guess that if I read these stats correctly, the bottleneck for * is
> not so much cpu power, it's the cpu cache. As I see it, the cpu cache
> becomes far less efficient for larger call volumes, eg. the cache is
> unable to keep the most frequently used code and data in cache, due to
> the sheer amount of call date going through the cpu. I guess that you do
> have some gain from going from single core to dual-core but is dwarfed
> by the very limited effect on the cache.
>
> But that is just a guess. Maybe for pure voip solutions cpu's with a
> huge cache like eg Power5+ would perform much better that ia32/x64 cpu's.
Remco,

Allow me to add some extra information about the processors on each server.

Dual-Core/8 CPU Server
======================
CPU Manufacturer: Intel
      CPU Family: Xeon MP
        Codename: Tulsa
Processor Number: 7120M
       CPU Speed: 3.00 GHz
       Bus Speed: 800 MHz
       CPU Cores: 2
        L1 Cache: 32 KB
        L2 Cache: 2048 KB (1024 KB Per Core)
        L3 Cache: 4096 KB (Shared)
       More Info: http://processorfinder.intel.com/details.aspx?sSpec=SL9HC

Single-Core/4 CPU Server
========================
CPU Manufacturer: Intel
      CPU Family: Xeon MP
        Codename: Cranford
Processor Number: N/A
       CPU Speed: 3.16 GHz
       Bus Speed: 667 MHz       
       CPU Cores: 1
        L1 Cache: 16 KB
        L2 Cache: 1024 KB
        L3 Cache: 0 KB
       More Info: http://processorfinder.intel.com/details.aspx?sSpec=SL84U

As you can see, the dual-core server not only has more processing power 
it also has much more CPU cache.  While I don't doubt that CPU cache may 
eventually limit Asterisk's scalability, I don't think it's the 
bottleneck I'm hitting.  Moving up to a 2.6.17 kernel with multi-core 
scheduling support (IIRC this considers the shared cache when making 
scheduling decisions) would likely gain me a small performance benefit, 
but nothing in the range of what we were expecting when we went to 
dual-core.

One difference that really stands out between the performance of the 
single-core and dual-core servers is the ratio of system to user time at 
similar loads.  Note that a load that would bring the single-core server 
to 50% idle would bring the dual-core server to roughly 74% idle.  We 
used sar to capture these loads on both types of servers when they were 
in production (the output is shown below).  The system to user time 
ratio on the single-core server is 2.3 to 1, but it is 14.6 to 1 on the 
dual-core server.

Stephen Davies has suggested using oprofile to determine where the 
system time is being spent, but I haven't gotten a chance to do so yet.  
I'm also considering strace.  Any other possible explanations or 
suggestions for diagnosing this problem would be appreciated.

 Mon Apr  2 12:15:01 EDT 2007
 Idle (sar -P ALL 60 14) (60 seconds 14 slices)
 Linux 2.6.12-1.1376_FC3smp (4core.imminc.com)         04/02/07

 12:24:01          CPU     %user     %nice   %system   %iowait     %idle
 12:25:02          all     14.97      0.03     34.25      0.92     49.82
 12:25:02            0      8.83      0.05     33.60      1.28     56.24
 12:25:02            1     17.50      0.02     34.60      0.57     47.32
 12:25:02            2     19.94      0.02     33.52      1.31     45.22
 12:25:02            3     13.62      0.02     35.29      0.52     50.55

 Fri May 11 12:00:01 EDT 2007
 Idle (sar -P ALL 60 14) (60 seconds 14 slices)
 Linux 2.6.12-1.1376_FC3smp (8core.imminc.com)         05/11/07

 12:08:02          CPU     %user     %nice   %system   %iowait     %idle
 12:09:02          all      1.69      0.00     24.70      0.08     73.52
 12:09:02            0      2.08      0.02     30.16      0.00     67.74
 12:09:02            1      1.95      0.00     25.59      0.62     71.85
 12:09:02            2      1.73      0.00     25.12      0.00     73.15
 12:09:02            3      1.55      0.02     24.70      0.00     73.73
 12:09:02            4      1.67      0.00     23.54      0.02     74.78
 12:09:02            5      1.57      0.02     23.13      0.00     75.29
 12:09:02            6      1.45      0.02     22.90      0.00     75.64
 12:09:02            7      1.48      0.00     22.54      0.00     75.98

Thank you for your response,

Matthew Roth
InterMedia Marketing Solutions
Software Engineer and Systems Developer



More information about the asterisk-users mailing list