SlideShare a Scribd company logo
1 of 39
Download to read offline
Scaling	
  FreeSWITCH	
  Performance	
  
ClueCon,	
  August	
  2015	
  
Moisés	
  Silva	
  <moy@sangoma.com>	
  
Manager,	
  So?ware	
  Engineering	
  	
  
About	
  Sangoma	
  
•  Industry	
  pioneer	
  with	
  over	
  25	
  years	
  of	
  experience	
  in	
  
communicaHons	
  hardware	
  and	
  so?ware	
  
•  Publicly	
  traded	
  company	
  since	
  2000	
  
–  TSXV:	
  STC	
  
•  One	
  of	
  the	
  most	
  financially	
  healthy	
  companies	
  in	
  our	
  industry	
  
–  Growing,	
  Profitable,	
  Cash	
  on	
  the	
  Balance	
  Sheet,	
  No	
  Debt	
  
•  Mid-­‐market	
  sized	
  firm	
  with	
  just	
  under	
  100	
  staff	
  in	
  all	
  global	
  
territories	
  
–  Offices	
  in	
  Canada	
  (Toronto),	
  US	
  (CA,	
  NJ),	
  EU	
  (UK	
  &	
  Holland),	
  APAC	
  
(India),	
  CALA	
  (Miami)	
  
•  World	
  wide	
  customer	
  base	
  
–  Selling	
  direct	
  to	
  carriers	
  and	
  OEMs	
  
–  Selling	
  to	
  the	
  enterprise	
  through	
  a	
  network	
  of	
  distribuHon	
  partners	
  
2	
  
Sangoma	
  Technologies	
  -­‐	
  ©	
  2015	
  
Broad	
  Line	
  of	
  Great	
  Products	
  
•  Voice	
  Telephony	
  Boards	
  
–  Analog/digital/hybrid,	
  WAN,	
  ADSL	
  
•  Session	
  border	
  controllers	
  
•  Microso?	
  Lync	
  
•  VoIP	
  Gateways	
  
–  NetBorder	
  SIP	
  to	
  TDM	
  
–  SS7	
  to	
  SIP	
  
•  So?ware	
  ApplicaHons	
  
–  NetBorder	
  Express,	
  Call	
  Progress	
  
Analyzer…	
  
•  Transcoding	
  (boards/appliances)	
  
•  Fiber	
  connecHvity	
  (STM1)	
  
•  Wireless	
  products	
  (GSM)	
  
3	
  
Sangoma	
  Technologies	
  -­‐	
  ©	
  2015	
  
We’re	
  Hiring	
  
•  Linux	
  developers	
  C/C++	
  or	
  Python	
  
•  Anywhere	
  in	
  the	
  world,	
  relocaHon	
  paid	
  or	
  full	
  
Hme	
  remote	
  opportuniHes	
  
•  Fun	
  and	
  relaxed	
  work	
  environment	
  
	
  
4	
  
Sangoma	
  Technologies	
  -­‐	
  ©	
  2015	
  
Agenda	
  
•  Performance	
  Basics	
  
•  FreeSWITCH	
  Core	
  Basics	
  
•  Performance	
  Tweaks	
  
•  Feature	
  Performance	
  Cost	
  
	
  
•  Final	
  Thoughts	
  
5	
  
Sangoma	
  Technologies	
  -­‐	
  ©	
  2015	
  
Performance	
  Basics	
  
•  Performance	
  tesHng	
  and	
  measurement	
  is	
  
hard	
  to	
  do	
  and	
  	
  very	
  prone	
  to	
  errors	
  
•  Performance	
  can	
  change	
  widely	
  from	
  
seemingly	
  minor	
  hardware/so?ware	
  changes	
  
•  This	
  presentaHon	
  focuses	
  on	
  Linux	
  	
  and	
  SIP	
  
call	
  bridging	
  performance	
  
6	
  
Sangoma	
  Technologies	
  -­‐	
  ©	
  2015	
  
Performance	
  Basics	
  
•  CPU-­‐Bound	
  
•  I/O	
  Bound	
  
•  Threads,	
  Resource/Lock	
  ContenHon	
  
•  You	
  cannot	
  improve	
  what	
  you	
  don’t	
  measure	
  
7	
  
Sangoma	
  Technologies	
  -­‐	
  ©	
  2015	
  
FreeSWITCH	
  Core	
  
•  FreeSWITCH	
  is	
  an	
  insanely	
  threaded	
  system	
  
(the	
  good	
  kind	
  of	
  insane)	
  
	
  
8	
  
Sangoma	
  Technologies	
  -­‐	
  ©	
  2015	
  
FreeSWITCH	
  Core	
  
•  Most	
  threads	
  are	
  I/O	
  bound	
  
•  But	
  transcoding,	
  transraHng,	
  tone	
  generaHon	
  
introduce	
  CPU-­‐bound	
  elements	
  into	
  the	
  mix	
  
•  FreeSWITCH	
  core	
  I/O	
  model	
  is	
  blocking,	
  not	
  
async	
  
9	
  
Sangoma	
  Technologies	
  -­‐	
  ©	
  2015	
  
FreeSWITCH	
  Core	
  
•  Every	
  call	
  leg	
  has	
  its	
  own	
  session	
  thread	
  walking	
  
through	
  a	
  state	
  machine,	
  roughly,	
  like	
  this:	
  
	
  
•  init	
  -­‐>	
  rouHng	
  -­‐>	
  execute	
  app	
  -­‐>	
  hangup	
  -­‐>	
  reporHng	
  -­‐
>	
  destroy	
  
10	
  
Sangoma	
  Technologies	
  -­‐	
  ©	
  2015	
  
FreeSWITCH	
  Core	
  
•  Monitoring	
  threads	
  per	
  signaling	
  stack	
  (e.g	
  sofia,	
  
freetdm)	
  
•  These	
  threads	
  are	
  long-­‐lived	
  and	
  perform	
  very	
  
specific	
  tasks	
  (e.g	
  process	
  SIP	
  signaling	
  out	
  of	
  a	
  call	
  
context,	
  iniHal	
  invite	
  etc)	
  
•  Event	
  subsystem	
  launches	
  threads	
  for	
  event	
  
dispatch	
  
11	
  
Sangoma	
  Technologies	
  -­‐	
  ©	
  2015	
  
FreeSWITCH	
  Core	
  
•  Conferences	
  duplicate	
  your	
  use	
  of	
  threads	
  per	
  
call	
  leg.	
  For	
  each	
  parHcipant	
  you	
  have	
  2	
  threads:	
  
	
  
•  Session	
  thread	
  (handles	
  call	
  state	
  and	
  media	
  output)	
  
•  Input	
  conference	
  thread	
  (launched	
  when	
  joining	
  the	
  
conference,	
  reads	
  media	
  from	
  the	
  session)	
  
	
  
	
  	
  
12	
  
Sangoma	
  Technologies	
  -­‐	
  ©	
  2015	
  
FreeSWITCH	
  Core	
  
•  Even	
  small	
  features	
  might	
  launch	
  threads	
  
•  e.g.	
  Semng	
  Hmer=so?	
  when	
  performing	
  a	
  playback()	
  
launches	
  an	
  extra	
  thread	
  to	
  consume	
  media	
  from	
  the	
  
session	
  
	
  	
  
13	
  
Sangoma	
  Technologies	
  -­‐	
  ©	
  2015	
  
Performance	
  Tweaks	
  
•  Logging	
  adds	
  stress	
  to	
  the	
  event	
  subsystem	
  
•  Every	
  log	
  statement	
  is	
  queued	
  as	
  an	
  event	
  
•  Every	
  log	
  statement	
  is	
  delivered	
  to	
  logger	
  
modules	
  (syslog,	
  file,	
  console)	
  
•  Set	
  core	
  logging	
  level	
  to	
  warning	
  in	
  
switch.conf.xml	
  
14	
  
Sangoma	
  Technologies	
  -­‐	
  ©	
  2015	
  
Performance	
  Tweaks	
  
•  Do	
  not	
  write	
  debug	
  logs	
  to	
  an	
  SSD	
  in	
  a	
  loaded	
  
system.	
  You’ll	
  kill	
  the	
  SSD	
  soon	
  J	
  
•  If	
  you	
  want	
  to	
  keep	
  debug	
  level,	
  you	
  can	
  put	
  
logs	
  into	
  tmpfs	
  and	
  rotate	
  o?en	
  
15	
  
Sangoma	
  Technologies	
  -­‐	
  ©	
  2015	
  
Database	
  
•  The	
  naHve	
  sqlite	
  core	
  database	
  must	
  go	
  to	
  
tmpfs	
  to	
  avoid	
  I/O	
  boplenecks	
  
•  On	
  tmpfs	
  however	
  you	
  risk	
  losing	
  SIP	
  
registraHon	
  data	
  on	
  a	
  power	
  outage	
  or	
  any	
  
sudden	
  restart	
  (e.g	
  kernel	
  panic)	
  
•  Most	
  other	
  data	
  is	
  transient	
  (e.g	
  channels,	
  sip	
  
dialogs,	
  etc)	
  
16	
  
Sangoma	
  Technologies	
  -­‐	
  ©	
  2015	
  
Database	
  
•  Eventually	
  you	
  might	
  need	
  to	
  migrate	
  to	
  pgsql,	
  
mysql	
  or	
  some	
  other	
  database	
  via	
  odbc	
  
•  Allows	
  you	
  to	
  move	
  db	
  workload	
  elsewhere	
  
•  Beper	
  performance	
  for	
  applicaHons	
  that	
  read	
  
the	
  core	
  info	
  (channels,	
  calls,	
  etc)	
  
17	
  
Sangoma	
  Technologies	
  -­‐	
  ©	
  2015	
  
Database	
  
•  Tables	
  such	
  as	
  channels,	
  calls,	
  tasks,	
  sip_dialogs,	
  	
  
do	
  not	
  need	
  to	
  persist.	
  You	
  can	
  move	
  those	
  
tables	
  to	
  memory	
  (e.g	
  MEMORY	
  engine	
  on	
  
MySQL)	
  if	
  you	
  don’t	
  need	
  fault	
  tolerance	
  
•  Remember	
  to	
  set	
  auto-­‐create-­‐schemas=false	
  
and	
  auto-­‐clear-­‐sql=false	
  if	
  you	
  create	
  the	
  db	
  
schema	
  on	
  your	
  own	
  (see	
  switch.conf.xml)	
  
18	
  
Sangoma	
  Technologies	
  -­‐	
  ©	
  2015	
  
Database	
  
•  If	
  using	
  MySQL:	
  
•  Use	
  the	
  InnoDB	
  engine	
  for	
  beper	
  concurrency	
  in	
  data	
  
that	
  requires	
  persistence	
  (e.g	
  SIP	
  registraHon)	
  
•  innodb_flush_log_at_trx_commit=0	
  
•  sync_binlog=0	
  
19	
  
Sangoma	
  Technologies	
  -­‐	
  ©	
  2015	
  
SIP	
  Stack	
  
•  Sofia	
  launches	
  the	
  following	
  threads	
  per	
  profile:	
  
•  Main	
  profile	
  thread	
  (runs	
  sofia	
  UA	
  stack	
  scheduling)	
  
•  Worker	
  thread	
  (checks	
  expired	
  registraHons)	
  
•  Stack	
  listener	
  thread	
  (accepHng	
  inbound	
  traffic)	
  
•  You	
  can	
  distribute	
  your	
  traffic	
  among	
  more	
  sofia	
  
profiles	
  for	
  improved	
  concurrency	
  
20	
  
Sangoma	
  Technologies	
  -­‐	
  ©	
  2015	
  
Memory	
  AllocaNon	
  
•  FreeSWITCH	
  uses	
  memory	
  pools	
  
•  Using	
  modules	
  that	
  depend	
  on	
  libraries	
  or	
  
modules	
  not	
  using	
  pools	
  can	
  benefit	
  from	
  using	
  
an	
  alternaHve	
  memory	
  allocator	
  
21	
  
Sangoma	
  Technologies	
  -­‐	
  ©	
  2015	
  
Memory	
  AllocaNon	
  
•  tcmalloc	
  and	
  jemalloc	
  are	
  good	
  alternaHves	
  
•  Reports	
  on	
  the	
  mailing	
  list	
  of	
  improvement	
  if	
  
using	
  mod_perl	
  
•  Sangoma	
  found	
  very	
  significant	
  improvement	
  on	
  
its	
  SBC	
  (based	
  on	
  FreeSWITCH)	
  
	
  
22	
  
Sangoma	
  Technologies	
  -­‐	
  ©	
  2015	
  
Memory	
  AllocaNon	
  
•  Easy	
  to	
  try	
  on	
  your	
  own	
  workload:	
  
•  LD_PRELOAD=“libtcmalloc.so.x.x.x"	
  ./freeswitch	
  
•  Recommended	
  to	
  run	
  mysql	
  with	
  either	
  
tcmalloc	
  or	
  jemalloc	
  
23	
  
Sangoma	
  Technologies	
  -­‐	
  ©	
  2015	
  
Dialplan	
  
•  Careful	
  planning	
  of	
  your	
  dialplan	
  goes	
  a	
  long	
  
way	
  
•  Do	
  not	
  enable	
  funcHonality	
  you	
  don’t	
  need,	
  
everything	
  has	
  a	
  cost	
  
•  Just	
  loading	
  a	
  module	
  might	
  be	
  consuming	
  
precious	
  cpu	
  cycles	
  
24	
  
Sangoma	
  Technologies	
  -­‐	
  ©	
  2015	
  
Dialplan	
  
•  Common	
  performance	
  factors	
  to	
  consider	
  (mind	
  
the	
  performance	
  cost	
  of	
  those	
  features):	
  
•  Media	
  relay	
  
•  Tone	
  DetecHon	
  
•  Recording	
  
•  Transcoding	
  
25	
  
Sangoma	
  Technologies	
  -­‐	
  ©	
  2015	
  
Measurement	
  Tools	
  
•  switchy:	
  A	
  distributed	
  load-­‐generator	
  
•  hpps://github.com/sangoma/switchy	
  
•  vmstat	
  ploper	
  
•  hpps://clusterbuffer.wordpress.com/2014/09/21/
vmstat_ploper/	
  
	
  
26	
  
Sangoma	
  Technologies	
  -­‐	
  ©	
  2015	
  
Test	
  Server	
  
•  Linux	
  CentOS	
  6	
  (kernel	
  2.6.x)	
  
•  FreeSWITCH	
  v1.4	
  git	
  branch	
  
•  Intel	
  Xeon	
  64bit	
  processor	
  w/	
  8	
  cores	
  
•  Intel	
  SSD	
  
•  16GB	
  of	
  RAM	
  
	
  
27	
  
Sangoma	
  Technologies	
  -­‐	
  ©	
  2015	
  
Test	
  Lab	
  
28	
  
Sangoma	
  Technologies	
  -­‐	
  ©	
  2015	
  
Test	
  FreeSWITCH	
  Server	
  
Switchy	
  
Load	
  Generator	
  
(FreeSWITCH)	
  
Load	
  Generator	
  
(FreeSWITCH)	
  
ESL	
  ESL	
  
SIP	
  
SIP	
  
2k@50cps	
  simple	
  audio	
  bridge	
  
29	
  
Sangoma	
  Technologies	
  -­‐	
  ©	
  2015	
  
2k@50cps	
  tone	
  detecNon	
  
30	
  
Sangoma	
  Technologies	
  -­‐	
  ©	
  2015	
  
1k@50cps	
  simple	
  audio	
  bridge	
  
31	
  
Sangoma	
  Technologies	
  -­‐	
  ©	
  2015	
  
1k@50cps	
  session	
  recording	
  
32	
  
Sangoma	
  Technologies	
  -­‐	
  ©	
  2015	
  
1k@50cps	
  transcoding	
  PCMU/G722	
  
33	
  
Sangoma	
  Technologies	
  -­‐	
  ©	
  2015	
  
4k@80cps	
  bypass	
  media	
  
34	
  
Sangoma	
  Technologies	
  -­‐	
  ©	
  2015	
  
Dialplan	
  
•  Use	
  bypass	
  media	
  selecHvely	
  whenever	
  you	
  can	
  
•  Avoid	
  transcoding,	
  use	
  late-­‐negoHaHon	
  and	
  
inherit_codec=true	
  
•  If	
  you	
  must	
  do	
  transcoding,	
  you	
  can	
  offload	
  to	
  a	
  
hardware	
  transcoder	
  
35	
  
Sangoma	
  Technologies	
  -­‐	
  ©	
  2015	
  
Final	
  Thoughts	
  
•  You	
  have	
  to	
  measure	
  your	
  own	
  work	
  load	
  
•  No	
  easy	
  answers	
  with	
  performance,	
  but	
  you	
  
have	
  the	
  tools	
  to	
  find	
  what	
  works	
  for	
  you	
  
36	
  
Sangoma	
  Technologies	
  -­‐	
  ©	
  2015	
  
QUESTIONS	
  
Contact	
  Us	
  
•  Sangoma	
  Technologies	
  
100	
  Renfrew	
  Drive,	
  Suite	
  100	
  
Markham,	
  Ontario	
  L3R	
  9R6	
  
Canada	
  
•  Website	
  
hpp://www.sangoma.com/	
  
•  Telephone	
  
+1	
  905	
  474	
  1990	
  x2	
  (for	
  Sales)	
  
•  Email	
  
sales@sangoma.com	
  
Sangoma	
  Technologies	
  -­‐	
  ©	
  2015	
  
38	
  
THANK	
  YOU	
  

More Related Content

What's hot

Kamailio with Docker and Kubernetes
Kamailio with Docker and KubernetesKamailio with Docker and Kubernetes
Kamailio with Docker and KubernetesPaolo Visintin
 
SIP Attack Handling (Kamailio World 2021)
SIP Attack Handling (Kamailio World 2021)SIP Attack Handling (Kamailio World 2021)
SIP Attack Handling (Kamailio World 2021)Fred Posner
 
Kamailio, FreeSWITCH, and You
Kamailio, FreeSWITCH, and YouKamailio, FreeSWITCH, and You
Kamailio, FreeSWITCH, and YouFred Posner
 
Why is Kamailio so different? An introduction.
Why is Kamailio so different? An introduction.Why is Kamailio so different? An introduction.
Why is Kamailio so different? An introduction.Olle E Johansson
 
rtpengine - Media Relaying and Beyond
rtpengine - Media Relaying and Beyondrtpengine - Media Relaying and Beyond
rtpengine - Media Relaying and BeyondAndreas Granig
 
Getting started with SIP Express Media Server SIP app server and SBC - workshop
Getting started with SIP Express Media Server SIP app server and SBC - workshopGetting started with SIP Express Media Server SIP app server and SBC - workshop
Getting started with SIP Express Media Server SIP app server and SBC - workshopstefansayer
 
FreeSWITCH on Docker
FreeSWITCH on DockerFreeSWITCH on Docker
FreeSWITCH on Docker建澄 吳
 
An SFU/MCU integration for heterogeneous environments
An SFU/MCU integration for heterogeneous environmentsAn SFU/MCU integration for heterogeneous environments
An SFU/MCU integration for heterogeneous environmentsGiacomo Vacca
 
Kamailio, FreeSWITCH, and the Half-Blood Prince
Kamailio, FreeSWITCH, and the Half-Blood PrinceKamailio, FreeSWITCH, and the Half-Blood Prince
Kamailio, FreeSWITCH, and the Half-Blood PrinceFred Posner
 
Three Ways Kamailio Can Help Your FreeSWITCH Deployment
Three Ways Kamailio Can Help Your FreeSWITCH DeploymentThree Ways Kamailio Can Help Your FreeSWITCH Deployment
Three Ways Kamailio Can Help Your FreeSWITCH DeploymentFred Posner
 
Introduction to Kamailio (TADSummit 2020 Asia)
Introduction to Kamailio (TADSummit 2020 Asia)Introduction to Kamailio (TADSummit 2020 Asia)
Introduction to Kamailio (TADSummit 2020 Asia)Fred Posner
 
Introduction to FreeSWITCH
Introduction to FreeSWITCHIntroduction to FreeSWITCH
Introduction to FreeSWITCHChien Cheng Wu
 
Implementation Lessons using WebRTC in Asterisk
Implementation Lessons using WebRTC in AsteriskImplementation Lessons using WebRTC in Asterisk
Implementation Lessons using WebRTC in AsteriskMoises Silva
 
SIP transfer with Janus/WebRTC @ OpenSIPS 2022
SIP transfer with Janus/WebRTC @ OpenSIPS 2022SIP transfer with Janus/WebRTC @ OpenSIPS 2022
SIP transfer with Janus/WebRTC @ OpenSIPS 2022Lorenzo Miniero
 
Expanding Asterisk with Kamailio
Expanding Asterisk with KamailioExpanding Asterisk with Kamailio
Expanding Asterisk with KamailioFred Posner
 

What's hot (20)

Kamailio with Docker and Kubernetes
Kamailio with Docker and KubernetesKamailio with Docker and Kubernetes
Kamailio with Docker and Kubernetes
 
SIP Attack Handling (Kamailio World 2021)
SIP Attack Handling (Kamailio World 2021)SIP Attack Handling (Kamailio World 2021)
SIP Attack Handling (Kamailio World 2021)
 
Kamailio, FreeSWITCH, and You
Kamailio, FreeSWITCH, and YouKamailio, FreeSWITCH, and You
Kamailio, FreeSWITCH, and You
 
Why is Kamailio so different? An introduction.
Why is Kamailio so different? An introduction.Why is Kamailio so different? An introduction.
Why is Kamailio so different? An introduction.
 
rtpengine - Media Relaying and Beyond
rtpengine - Media Relaying and Beyondrtpengine - Media Relaying and Beyond
rtpengine - Media Relaying and Beyond
 
Getting started with SIP Express Media Server SIP app server and SBC - workshop
Getting started with SIP Express Media Server SIP app server and SBC - workshopGetting started with SIP Express Media Server SIP app server and SBC - workshop
Getting started with SIP Express Media Server SIP app server and SBC - workshop
 
Kamailio on Docker
Kamailio on DockerKamailio on Docker
Kamailio on Docker
 
FreeSWITCH on Docker
FreeSWITCH on DockerFreeSWITCH on Docker
FreeSWITCH on Docker
 
Kamailio - Load Balancing Load Balancers
Kamailio - Load Balancing Load BalancersKamailio - Load Balancing Load Balancers
Kamailio - Load Balancing Load Balancers
 
An SFU/MCU integration for heterogeneous environments
An SFU/MCU integration for heterogeneous environmentsAn SFU/MCU integration for heterogeneous environments
An SFU/MCU integration for heterogeneous environments
 
Kamailio, FreeSWITCH, and the Half-Blood Prince
Kamailio, FreeSWITCH, and the Half-Blood PrinceKamailio, FreeSWITCH, and the Half-Blood Prince
Kamailio, FreeSWITCH, and the Half-Blood Prince
 
Kamailio - API Based SIP Routing
Kamailio - API Based SIP RoutingKamailio - API Based SIP Routing
Kamailio - API Based SIP Routing
 
Sipwise rtpengine
Sipwise rtpengineSipwise rtpengine
Sipwise rtpengine
 
Three Ways Kamailio Can Help Your FreeSWITCH Deployment
Three Ways Kamailio Can Help Your FreeSWITCH DeploymentThree Ways Kamailio Can Help Your FreeSWITCH Deployment
Three Ways Kamailio Can Help Your FreeSWITCH Deployment
 
Introduction to Kamailio (TADSummit 2020 Asia)
Introduction to Kamailio (TADSummit 2020 Asia)Introduction to Kamailio (TADSummit 2020 Asia)
Introduction to Kamailio (TADSummit 2020 Asia)
 
Kamailio - SIP Routing in Lua
Kamailio - SIP Routing in LuaKamailio - SIP Routing in Lua
Kamailio - SIP Routing in Lua
 
Introduction to FreeSWITCH
Introduction to FreeSWITCHIntroduction to FreeSWITCH
Introduction to FreeSWITCH
 
Implementation Lessons using WebRTC in Asterisk
Implementation Lessons using WebRTC in AsteriskImplementation Lessons using WebRTC in Asterisk
Implementation Lessons using WebRTC in Asterisk
 
SIP transfer with Janus/WebRTC @ OpenSIPS 2022
SIP transfer with Janus/WebRTC @ OpenSIPS 2022SIP transfer with Janus/WebRTC @ OpenSIPS 2022
SIP transfer with Janus/WebRTC @ OpenSIPS 2022
 
Expanding Asterisk with Kamailio
Expanding Asterisk with KamailioExpanding Asterisk with Kamailio
Expanding Asterisk with Kamailio
 

Similar to Scaling FreeSWITCH Performance

2016-Automation-Summit_PA_SIMIT.pdf
2016-Automation-Summit_PA_SIMIT.pdf2016-Automation-Summit_PA_SIMIT.pdf
2016-Automation-Summit_PA_SIMIT.pdfLuisJonathanBahamaca
 
Mulesoft Meetup Milano #9 - Batch Processing and CI/CD
Mulesoft Meetup Milano #9 - Batch Processing and CI/CDMulesoft Meetup Milano #9 - Batch Processing and CI/CD
Mulesoft Meetup Milano #9 - Batch Processing and CI/CDGonzalo Marcos Ansoain
 
IMCSummit 2015 - Day 1 Developer Track - In-memory Computing for Iterative CP...
IMCSummit 2015 - Day 1 Developer Track - In-memory Computing for Iterative CP...IMCSummit 2015 - Day 1 Developer Track - In-memory Computing for Iterative CP...
IMCSummit 2015 - Day 1 Developer Track - In-memory Computing for Iterative CP...In-Memory Computing Summit
 
Siemens s7 300 programming
Siemens s7 300 programming Siemens s7 300 programming
Siemens s7 300 programming satyajit patra
 
SA114 - Virtual Notesiality! - How the Notes client and Browser Plugin can ex...
SA114 - Virtual Notesiality! - How the Notes client and Browser Plugin can ex...SA114 - Virtual Notesiality! - How the Notes client and Browser Plugin can ex...
SA114 - Virtual Notesiality! - How the Notes client and Browser Plugin can ex...Daniel Reimann
 
ClearCase Version Importer - a migration tool to Rational Team Concert SCM
ClearCase Version Importer - a migration tool to Rational Team Concert SCMClearCase Version Importer - a migration tool to Rational Team Concert SCM
ClearCase Version Importer - a migration tool to Rational Team Concert SCMIBM Rational software
 
QueueMetrics - Tips and Tricks
QueueMetrics - Tips and TricksQueueMetrics - Tips and Tricks
QueueMetrics - Tips and TricksClarotech_Events
 
Tips Tricks and Little known features in SAP ASE
Tips Tricks and Little known features in SAP ASETips Tricks and Little known features in SAP ASE
Tips Tricks and Little known features in SAP ASESAP Technology
 
Streaming meetup
Streaming meetupStreaming meetup
Streaming meetupkarthik_krk
 
DevOps / Agile Tools Seminar 2013
DevOps / Agile Tools Seminar 2013DevOps / Agile Tools Seminar 2013
DevOps / Agile Tools Seminar 2013Ethan Ram
 
2015 02 24 lmtv baselining
2015 02 24 lmtv baselining2015 02 24 lmtv baselining
2015 02 24 lmtv baseliningTony Fortunato
 
SIMATIC manager سيماتك منجر سيمنز
SIMATIC manager سيماتك منجر سيمنزSIMATIC manager سيماتك منجر سيمنز
SIMATIC manager سيماتك منجر سيمنزEssosElectronic
 
The Flink - Apache Bigtop integration
The Flink - Apache Bigtop integrationThe Flink - Apache Bigtop integration
The Flink - Apache Bigtop integrationMárton Balassi
 
Cognos Performance Tuning Tips & Tricks
Cognos Performance Tuning Tips & TricksCognos Performance Tuning Tips & Tricks
Cognos Performance Tuning Tips & TricksSenturus
 
10 Steps to Architecting a Sustainable SCADA System
10 Steps to Architecting a Sustainable SCADA System10 Steps to Architecting a Sustainable SCADA System
10 Steps to Architecting a Sustainable SCADA SystemInductive Automation
 
CON5451_Brydon-OOW2014_Brydon_CON5451 (1).pptx
CON5451_Brydon-OOW2014_Brydon_CON5451 (1).pptxCON5451_Brydon-OOW2014_Brydon_CON5451 (1).pptx
CON5451_Brydon-OOW2014_Brydon_CON5451 (1).pptxSergioBruno21
 
SIEMENS Basic Course of PLC EMERSON EDUARDO RODRIGUES
SIEMENS Basic Course of PLC EMERSON EDUARDO RODRIGUESSIEMENS Basic Course of PLC EMERSON EDUARDO RODRIGUES
SIEMENS Basic Course of PLC EMERSON EDUARDO RODRIGUESEMERSON EDUARDO RODRIGUES
 

Similar to Scaling FreeSWITCH Performance (20)

2016-Automation-Summit_PA_SIMIT.pdf
2016-Automation-Summit_PA_SIMIT.pdf2016-Automation-Summit_PA_SIMIT.pdf
2016-Automation-Summit_PA_SIMIT.pdf
 
Mulesoft Meetup Milano #9 - Batch Processing and CI/CD
Mulesoft Meetup Milano #9 - Batch Processing and CI/CDMulesoft Meetup Milano #9 - Batch Processing and CI/CD
Mulesoft Meetup Milano #9 - Batch Processing and CI/CD
 
IMCSummit 2015 - Day 1 Developer Track - In-memory Computing for Iterative CP...
IMCSummit 2015 - Day 1 Developer Track - In-memory Computing for Iterative CP...IMCSummit 2015 - Day 1 Developer Track - In-memory Computing for Iterative CP...
IMCSummit 2015 - Day 1 Developer Track - In-memory Computing for Iterative CP...
 
Siemens s7 300 programming
Siemens s7 300 programming Siemens s7 300 programming
Siemens s7 300 programming
 
SA114 - Virtual Notesiality! - How the Notes client and Browser Plugin can ex...
SA114 - Virtual Notesiality! - How the Notes client and Browser Plugin can ex...SA114 - Virtual Notesiality! - How the Notes client and Browser Plugin can ex...
SA114 - Virtual Notesiality! - How the Notes client and Browser Plugin can ex...
 
ClearCase Version Importer - a migration tool to Rational Team Concert SCM
ClearCase Version Importer - a migration tool to Rational Team Concert SCMClearCase Version Importer - a migration tool to Rational Team Concert SCM
ClearCase Version Importer - a migration tool to Rational Team Concert SCM
 
STE_DailyHC_TSMV6.pptx
STE_DailyHC_TSMV6.pptxSTE_DailyHC_TSMV6.pptx
STE_DailyHC_TSMV6.pptx
 
QueueMetrics - Tips and Tricks
QueueMetrics - Tips and TricksQueueMetrics - Tips and Tricks
QueueMetrics - Tips and Tricks
 
Tips Tricks and Little known features in SAP ASE
Tips Tricks and Little known features in SAP ASETips Tricks and Little known features in SAP ASE
Tips Tricks and Little known features in SAP ASE
 
Streaming meetup
Streaming meetupStreaming meetup
Streaming meetup
 
Symantec SDN Deployment
Symantec SDN DeploymentSymantec SDN Deployment
Symantec SDN Deployment
 
DevOps / Agile Tools Seminar 2013
DevOps / Agile Tools Seminar 2013DevOps / Agile Tools Seminar 2013
DevOps / Agile Tools Seminar 2013
 
2015 02 24 lmtv baselining
2015 02 24 lmtv baselining2015 02 24 lmtv baselining
2015 02 24 lmtv baselining
 
SIMATIC manager سيماتك منجر سيمنز
SIMATIC manager سيماتك منجر سيمنزSIMATIC manager سيماتك منجر سيمنز
SIMATIC manager سيماتك منجر سيمنز
 
The Flink - Apache Bigtop integration
The Flink - Apache Bigtop integrationThe Flink - Apache Bigtop integration
The Flink - Apache Bigtop integration
 
Cognos Performance Tuning Tips & Tricks
Cognos Performance Tuning Tips & TricksCognos Performance Tuning Tips & Tricks
Cognos Performance Tuning Tips & Tricks
 
10 Steps to Architecting a Sustainable SCADA System
10 Steps to Architecting a Sustainable SCADA System10 Steps to Architecting a Sustainable SCADA System
10 Steps to Architecting a Sustainable SCADA System
 
CON5451_Brydon-OOW2014_Brydon_CON5451 (1).pptx
CON5451_Brydon-OOW2014_Brydon_CON5451 (1).pptxCON5451_Brydon-OOW2014_Brydon_CON5451 (1).pptx
CON5451_Brydon-OOW2014_Brydon_CON5451 (1).pptx
 
Basics_of_PLCs.pdf
Basics_of_PLCs.pdfBasics_of_PLCs.pdf
Basics_of_PLCs.pdf
 
SIEMENS Basic Course of PLC EMERSON EDUARDO RODRIGUES
SIEMENS Basic Course of PLC EMERSON EDUARDO RODRIGUESSIEMENS Basic Course of PLC EMERSON EDUARDO RODRIGUES
SIEMENS Basic Course of PLC EMERSON EDUARDO RODRIGUES
 

More from Moises Silva

Interfaces de Scripting para librerias en C
Interfaces de Scripting para librerias en CInterfaces de Scripting para librerias en C
Interfaces de Scripting para librerias en CMoises Silva
 
Vulnerabilidades en Aplicaciones Web PHP
Vulnerabilidades en Aplicaciones Web PHPVulnerabilidades en Aplicaciones Web PHP
Vulnerabilidades en Aplicaciones Web PHPMoises Silva
 
Manejo de Medios en FreeSWITCH
Manejo de Medios en FreeSWITCHManejo de Medios en FreeSWITCH
Manejo de Medios en FreeSWITCHMoises Silva
 
FreeSWITCH Modules for Asterisk Developers
FreeSWITCH Modules for Asterisk DevelopersFreeSWITCH Modules for Asterisk Developers
FreeSWITCH Modules for Asterisk DevelopersMoises Silva
 
FreeSWITCH: Asterisk con Esteroides
FreeSWITCH: Asterisk con EsteroidesFreeSWITCH: Asterisk con Esteroides
FreeSWITCH: Asterisk con EsteroidesMoises Silva
 
Negociacion de Codecs en Asterisk
Negociacion de Codecs en AsteriskNegociacion de Codecs en Asterisk
Negociacion de Codecs en AsteriskMoises Silva
 
Sangoma en el Ecosistema Open Source
Sangoma en el Ecosistema Open SourceSangoma en el Ecosistema Open Source
Sangoma en el Ecosistema Open SourceMoises Silva
 
FreeTDM PRI Passive Recording
FreeTDM PRI Passive RecordingFreeTDM PRI Passive Recording
FreeTDM PRI Passive RecordingMoises Silva
 
Asterisk PRI Passive Call Recording
Asterisk PRI Passive Call RecordingAsterisk PRI Passive Call Recording
Asterisk PRI Passive Call RecordingMoises Silva
 
OpenR2 in Asterisk
OpenR2 in AsteriskOpenR2 in Asterisk
OpenR2 in AsteriskMoises Silva
 

More from Moises Silva (10)

Interfaces de Scripting para librerias en C
Interfaces de Scripting para librerias en CInterfaces de Scripting para librerias en C
Interfaces de Scripting para librerias en C
 
Vulnerabilidades en Aplicaciones Web PHP
Vulnerabilidades en Aplicaciones Web PHPVulnerabilidades en Aplicaciones Web PHP
Vulnerabilidades en Aplicaciones Web PHP
 
Manejo de Medios en FreeSWITCH
Manejo de Medios en FreeSWITCHManejo de Medios en FreeSWITCH
Manejo de Medios en FreeSWITCH
 
FreeSWITCH Modules for Asterisk Developers
FreeSWITCH Modules for Asterisk DevelopersFreeSWITCH Modules for Asterisk Developers
FreeSWITCH Modules for Asterisk Developers
 
FreeSWITCH: Asterisk con Esteroides
FreeSWITCH: Asterisk con EsteroidesFreeSWITCH: Asterisk con Esteroides
FreeSWITCH: Asterisk con Esteroides
 
Negociacion de Codecs en Asterisk
Negociacion de Codecs en AsteriskNegociacion de Codecs en Asterisk
Negociacion de Codecs en Asterisk
 
Sangoma en el Ecosistema Open Source
Sangoma en el Ecosistema Open SourceSangoma en el Ecosistema Open Source
Sangoma en el Ecosistema Open Source
 
FreeTDM PRI Passive Recording
FreeTDM PRI Passive RecordingFreeTDM PRI Passive Recording
FreeTDM PRI Passive Recording
 
Asterisk PRI Passive Call Recording
Asterisk PRI Passive Call RecordingAsterisk PRI Passive Call Recording
Asterisk PRI Passive Call Recording
 
OpenR2 in Asterisk
OpenR2 in AsteriskOpenR2 in Asterisk
OpenR2 in Asterisk
 

Recently uploaded

Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 

Recently uploaded (20)

Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 

Scaling FreeSWITCH Performance

  • 1. Scaling  FreeSWITCH  Performance   ClueCon,  August  2015   Moisés  Silva  <moy@sangoma.com>   Manager,  So?ware  Engineering    
  • 2. About  Sangoma   •  Industry  pioneer  with  over  25  years  of  experience  in   communicaHons  hardware  and  so?ware   •  Publicly  traded  company  since  2000   –  TSXV:  STC   •  One  of  the  most  financially  healthy  companies  in  our  industry   –  Growing,  Profitable,  Cash  on  the  Balance  Sheet,  No  Debt   •  Mid-­‐market  sized  firm  with  just  under  100  staff  in  all  global   territories   –  Offices  in  Canada  (Toronto),  US  (CA,  NJ),  EU  (UK  &  Holland),  APAC   (India),  CALA  (Miami)   •  World  wide  customer  base   –  Selling  direct  to  carriers  and  OEMs   –  Selling  to  the  enterprise  through  a  network  of  distribuHon  partners   2   Sangoma  Technologies  -­‐  ©  2015  
  • 3. Broad  Line  of  Great  Products   •  Voice  Telephony  Boards   –  Analog/digital/hybrid,  WAN,  ADSL   •  Session  border  controllers   •  Microso?  Lync   •  VoIP  Gateways   –  NetBorder  SIP  to  TDM   –  SS7  to  SIP   •  So?ware  ApplicaHons   –  NetBorder  Express,  Call  Progress   Analyzer…   •  Transcoding  (boards/appliances)   •  Fiber  connecHvity  (STM1)   •  Wireless  products  (GSM)   3   Sangoma  Technologies  -­‐  ©  2015  
  • 4. We’re  Hiring   •  Linux  developers  C/C++  or  Python   •  Anywhere  in  the  world,  relocaHon  paid  or  full   Hme  remote  opportuniHes   •  Fun  and  relaxed  work  environment     4   Sangoma  Technologies  -­‐  ©  2015  
  • 5. Agenda   •  Performance  Basics   •  FreeSWITCH  Core  Basics   •  Performance  Tweaks   •  Feature  Performance  Cost     •  Final  Thoughts   5   Sangoma  Technologies  -­‐  ©  2015  
  • 6. Performance  Basics   •  Performance  tesHng  and  measurement  is   hard  to  do  and    very  prone  to  errors   •  Performance  can  change  widely  from   seemingly  minor  hardware/so?ware  changes   •  This  presentaHon  focuses  on  Linux    and  SIP   call  bridging  performance   6   Sangoma  Technologies  -­‐  ©  2015  
  • 7. Performance  Basics   •  CPU-­‐Bound   •  I/O  Bound   •  Threads,  Resource/Lock  ContenHon   •  You  cannot  improve  what  you  don’t  measure   7   Sangoma  Technologies  -­‐  ©  2015  
  • 8. FreeSWITCH  Core   •  FreeSWITCH  is  an  insanely  threaded  system   (the  good  kind  of  insane)     8   Sangoma  Technologies  -­‐  ©  2015  
  • 9. FreeSWITCH  Core   •  Most  threads  are  I/O  bound   •  But  transcoding,  transraHng,  tone  generaHon   introduce  CPU-­‐bound  elements  into  the  mix   •  FreeSWITCH  core  I/O  model  is  blocking,  not   async   9   Sangoma  Technologies  -­‐  ©  2015  
  • 10. FreeSWITCH  Core   •  Every  call  leg  has  its  own  session  thread  walking   through  a  state  machine,  roughly,  like  this:     •  init  -­‐>  rouHng  -­‐>  execute  app  -­‐>  hangup  -­‐>  reporHng  -­‐ >  destroy   10   Sangoma  Technologies  -­‐  ©  2015  
  • 11. FreeSWITCH  Core   •  Monitoring  threads  per  signaling  stack  (e.g  sofia,   freetdm)   •  These  threads  are  long-­‐lived  and  perform  very   specific  tasks  (e.g  process  SIP  signaling  out  of  a  call   context,  iniHal  invite  etc)   •  Event  subsystem  launches  threads  for  event   dispatch   11   Sangoma  Technologies  -­‐  ©  2015  
  • 12. FreeSWITCH  Core   •  Conferences  duplicate  your  use  of  threads  per   call  leg.  For  each  parHcipant  you  have  2  threads:     •  Session  thread  (handles  call  state  and  media  output)   •  Input  conference  thread  (launched  when  joining  the   conference,  reads  media  from  the  session)         12   Sangoma  Technologies  -­‐  ©  2015  
  • 13. FreeSWITCH  Core   •  Even  small  features  might  launch  threads   •  e.g.  Semng  Hmer=so?  when  performing  a  playback()   launches  an  extra  thread  to  consume  media  from  the   session       13   Sangoma  Technologies  -­‐  ©  2015  
  • 14. Performance  Tweaks   •  Logging  adds  stress  to  the  event  subsystem   •  Every  log  statement  is  queued  as  an  event   •  Every  log  statement  is  delivered  to  logger   modules  (syslog,  file,  console)   •  Set  core  logging  level  to  warning  in   switch.conf.xml   14   Sangoma  Technologies  -­‐  ©  2015  
  • 15. Performance  Tweaks   •  Do  not  write  debug  logs  to  an  SSD  in  a  loaded   system.  You’ll  kill  the  SSD  soon  J   •  If  you  want  to  keep  debug  level,  you  can  put   logs  into  tmpfs  and  rotate  o?en   15   Sangoma  Technologies  -­‐  ©  2015  
  • 16. Database   •  The  naHve  sqlite  core  database  must  go  to   tmpfs  to  avoid  I/O  boplenecks   •  On  tmpfs  however  you  risk  losing  SIP   registraHon  data  on  a  power  outage  or  any   sudden  restart  (e.g  kernel  panic)   •  Most  other  data  is  transient  (e.g  channels,  sip   dialogs,  etc)   16   Sangoma  Technologies  -­‐  ©  2015  
  • 17. Database   •  Eventually  you  might  need  to  migrate  to  pgsql,   mysql  or  some  other  database  via  odbc   •  Allows  you  to  move  db  workload  elsewhere   •  Beper  performance  for  applicaHons  that  read   the  core  info  (channels,  calls,  etc)   17   Sangoma  Technologies  -­‐  ©  2015  
  • 18. Database   •  Tables  such  as  channels,  calls,  tasks,  sip_dialogs,     do  not  need  to  persist.  You  can  move  those   tables  to  memory  (e.g  MEMORY  engine  on   MySQL)  if  you  don’t  need  fault  tolerance   •  Remember  to  set  auto-­‐create-­‐schemas=false   and  auto-­‐clear-­‐sql=false  if  you  create  the  db   schema  on  your  own  (see  switch.conf.xml)   18   Sangoma  Technologies  -­‐  ©  2015  
  • 19. Database   •  If  using  MySQL:   •  Use  the  InnoDB  engine  for  beper  concurrency  in  data   that  requires  persistence  (e.g  SIP  registraHon)   •  innodb_flush_log_at_trx_commit=0   •  sync_binlog=0   19   Sangoma  Technologies  -­‐  ©  2015  
  • 20. SIP  Stack   •  Sofia  launches  the  following  threads  per  profile:   •  Main  profile  thread  (runs  sofia  UA  stack  scheduling)   •  Worker  thread  (checks  expired  registraHons)   •  Stack  listener  thread  (accepHng  inbound  traffic)   •  You  can  distribute  your  traffic  among  more  sofia   profiles  for  improved  concurrency   20   Sangoma  Technologies  -­‐  ©  2015  
  • 21. Memory  AllocaNon   •  FreeSWITCH  uses  memory  pools   •  Using  modules  that  depend  on  libraries  or   modules  not  using  pools  can  benefit  from  using   an  alternaHve  memory  allocator   21   Sangoma  Technologies  -­‐  ©  2015  
  • 22. Memory  AllocaNon   •  tcmalloc  and  jemalloc  are  good  alternaHves   •  Reports  on  the  mailing  list  of  improvement  if   using  mod_perl   •  Sangoma  found  very  significant  improvement  on   its  SBC  (based  on  FreeSWITCH)     22   Sangoma  Technologies  -­‐  ©  2015  
  • 23. Memory  AllocaNon   •  Easy  to  try  on  your  own  workload:   •  LD_PRELOAD=“libtcmalloc.so.x.x.x"  ./freeswitch   •  Recommended  to  run  mysql  with  either   tcmalloc  or  jemalloc   23   Sangoma  Technologies  -­‐  ©  2015  
  • 24. Dialplan   •  Careful  planning  of  your  dialplan  goes  a  long   way   •  Do  not  enable  funcHonality  you  don’t  need,   everything  has  a  cost   •  Just  loading  a  module  might  be  consuming   precious  cpu  cycles   24   Sangoma  Technologies  -­‐  ©  2015  
  • 25. Dialplan   •  Common  performance  factors  to  consider  (mind   the  performance  cost  of  those  features):   •  Media  relay   •  Tone  DetecHon   •  Recording   •  Transcoding   25   Sangoma  Technologies  -­‐  ©  2015  
  • 26. Measurement  Tools   •  switchy:  A  distributed  load-­‐generator   •  hpps://github.com/sangoma/switchy   •  vmstat  ploper   •  hpps://clusterbuffer.wordpress.com/2014/09/21/ vmstat_ploper/     26   Sangoma  Technologies  -­‐  ©  2015  
  • 27. Test  Server   •  Linux  CentOS  6  (kernel  2.6.x)   •  FreeSWITCH  v1.4  git  branch   •  Intel  Xeon  64bit  processor  w/  8  cores   •  Intel  SSD   •  16GB  of  RAM     27   Sangoma  Technologies  -­‐  ©  2015  
  • 28. Test  Lab   28   Sangoma  Technologies  -­‐  ©  2015   Test  FreeSWITCH  Server   Switchy   Load  Generator   (FreeSWITCH)   Load  Generator   (FreeSWITCH)   ESL  ESL   SIP   SIP  
  • 29. 2k@50cps  simple  audio  bridge   29   Sangoma  Technologies  -­‐  ©  2015  
  • 30. 2k@50cps  tone  detecNon   30   Sangoma  Technologies  -­‐  ©  2015  
  • 31. 1k@50cps  simple  audio  bridge   31   Sangoma  Technologies  -­‐  ©  2015  
  • 32. 1k@50cps  session  recording   32   Sangoma  Technologies  -­‐  ©  2015  
  • 33. 1k@50cps  transcoding  PCMU/G722   33   Sangoma  Technologies  -­‐  ©  2015  
  • 34. 4k@80cps  bypass  media   34   Sangoma  Technologies  -­‐  ©  2015  
  • 35. Dialplan   •  Use  bypass  media  selecHvely  whenever  you  can   •  Avoid  transcoding,  use  late-­‐negoHaHon  and   inherit_codec=true   •  If  you  must  do  transcoding,  you  can  offload  to  a   hardware  transcoder   35   Sangoma  Technologies  -­‐  ©  2015  
  • 36. Final  Thoughts   •  You  have  to  measure  your  own  work  load   •  No  easy  answers  with  performance,  but  you   have  the  tools  to  find  what  works  for  you   36   Sangoma  Technologies  -­‐  ©  2015  
  • 38. Contact  Us   •  Sangoma  Technologies   100  Renfrew  Drive,  Suite  100   Markham,  Ontario  L3R  9R6   Canada   •  Website   hpp://www.sangoma.com/   •  Telephone   +1  905  474  1990  x2  (for  Sales)   •  Email   sales@sangoma.com   Sangoma  Technologies  -­‐  ©  2015   38