SlideShare ist ein Scribd-Unternehmen logo
1 von 55
Downloaden Sie, um offline zu lesen
© 2012 FuseSource Corp.All rights reserved.1	
  
Apache	
  Ac(veMQ	
  Performance	
  Tuning	
  
Chris(an	
  Posta
Senior	
  Consultant	
  and	
  Architect	
  
Blog:	
  h6p://chris9anposta.com/blog/	
  
Twi6er:	
  @chris9anposta	
  
GitHub:	
  h6ps://github.com/chris9an-­‐posta	
  
© 2012 FuseSource Corp.All rights reserved.2	
  
ceposta	
  	
  
§ Chris9an	
  Posta	
  
§  Blog:	
  h6p://chris9anposta.com/blog/	
  
§  Email:	
  ceposta@apache.org	
  
§  Twi6er:	
  @chris9anposta	
  
§  GitHub:	
  h6ps://github.com/chris9an-­‐posta	
  
§  Goolge+:	
  h6ps://plus.google.com/103810850748178017238	
  
	
  
	
  
§ Senior	
  Consultant	
  and	
  Architect	
  at	
  Red	
  Hat	
  (formerly	
  
FuseSource)	
  
§ Commi6er	
  on:	
  Ac9veMQ,	
  Apollo	
  
§ Author	
  of	
  Essen%al	
  Camel	
  Components	
  DZone	
  Refcard	
  
© 2012 FuseSource Corp.All rights reserved.3	
  
What	
  Am	
  I	
  Talking	
  About?	
  
§  What	
  is	
  Ac9veMQ?	
  
§  Performance/Benchmarking	
  Tools	
  
§  Tuning	
  
© 2012 FuseSource Corp.All rights reserved.4	
  
Apache	
  Ac(veMQ	
  
§  OpenSource	
  Messaging	
  Server	
  
•  Queues,	
  Topics,	
  persistent	
  messaging,	
  high	
  
availability,	
  etc	
  
§  Apache	
  v2.0	
  License	
  
§  Ac9ve	
  community,	
  Mature,	
  Stable	
  
§  Used	
  at	
  top	
  companies	
  
•  Insurance,	
  banking,	
  retail,	
  ecommerce,	
  health	
  
care,	
  avia9on,	
  shipping,	
  et.	
  al!	
  
§  5.8.0	
  latest	
  release	
  
© 2012 FuseSource Corp.All rights reserved.5	
  
Apache	
  Ac(veMQ	
  
§  High	
  performance	
  
§  High	
  Availability	
  
§  Light-­‐weight	
  
§  Mul9-­‐protocol	
  
§  JMS	
  compliant	
  
§  Supported	
  in	
  Produc9on	
  
© 2012 FuseSource Corp.All rights reserved.6	
  
Accessible!	
  
§  Java	
  
§  C/C++	
  h6p://ac9vemq.apache.org/cms/	
  
§  .NET	
  h6p://ac9vemq.apache.org/nms/	
  
§  PHP	
  
§  Python	
  
§  Ruby	
  
§  PHP	
  
§  JavaScript	
  	
  
§  Telnet!	
  
§  Any	
  that	
  can	
  make	
  a	
  TCP	
  connec9on	
  and	
  send	
  Text!	
  
	
  
© 2012 FuseSource Corp.All rights reserved.7	
  
Transports	
  
§  TCP	
  
§  UDP	
  
§  SSL	
  
§  NIO	
  
§  HTTP/s	
  
§  VM	
  
§  WS	
  (Web	
  Sockets)	
  
§  WSS	
  (Secure	
  Web	
  Sockets)	
  
© 2012 FuseSource Corp.All rights reserved.8	
  
Wire	
  Protocols	
  
§  Openwire	
  
h6p://ac9vemq.apache.org/openwire.html	
  
§  Simple	
  Text	
  Oriented	
  Messaging	
  Protocol	
  
(STOMP)	
  
h6p://stomp.github.io	
  
§  AMQP	
  1.0	
  
h6p://www.amqp.org/resources/specifica9ons	
  
§  MQTT	
  
h6p://mq6.org	
  
§  HTTP/REST	
  
© 2012 FuseSource Corp.All rights reserved.9	
  
Ac(veMQ	
  Features	
  
§  Master/Slave	
  fault	
  tolerance	
  and	
  High	
  Availability	
  
§  Broker	
  “networking”	
  or	
  clustering	
  
§  Pluggable	
  persistence	
  (KahaDB,	
  LevelDB,	
  JDBC)	
  
§  Broker	
  interoperability	
  (RabbitMQ,	
  HornetQ,	
  etc)	
  
§  Virtual	
  Topics	
  
§  Mirrored	
  Queues	
  
§  JMX	
  Monitoring	
  
© 2012 FuseSource Corp.All rights reserved.10	
  
When	
  to	
  use	
  Messaging?	
  
§  Asynchronous	
  communica9on/integra9on	
  
§  Durability	
  
§  Loose	
  coupling	
  
§  Heterogenous	
  integra9on	
  
§  Real-­‐9me	
  data	
  
© 2012 FuseSource Corp.All rights reserved.11	
  
Configura(on	
  
Ac9veMQ	
  is	
  Highly	
  Configurable!!	
  
© 2012 FuseSource Corp.All rights reserved.12	
  
Performance/Benchmarking	
  
Tools	
  
© 2012 FuseSource Corp.All rights reserved.13	
  
So	
  What	
  Are	
  We	
  Covering?	
  
§  Tools	
  
§  How	
  to	
  approach	
  performance	
  tuning	
  
§  Areas	
  to	
  tweak!	
  
© 2012 FuseSource Corp.All rights reserved.14	
  
What	
  are	
  Your	
  Objec(ves!?	
  
§  Please,	
  please,	
  please..	
  Know	
  
what	
  you’re	
  trying	
  to	
  
accomplish!	
  
§  Know	
  your	
  use	
  cases!	
  
§  Know	
  your	
  hardware/OS	
  
§  Understand	
  all	
  of	
  the	
  broker	
  
config	
  changes	
  you	
  make!	
  
§  VALIDATE	
  YOUR	
  CHANGES!	
  
© 2012 FuseSource Corp.All rights reserved.15	
  
Broker	
  Benchmarking	
  Tools	
  
§  Ac9veMQ	
  Performance	
  Module	
  
§  jms-­‐benchmark	
  
§  JMSTester	
  
§  Apache	
  Jmeter	
  
§  Grinder	
  
§  …?	
  
© 2012 FuseSource Corp.All rights reserved.16	
  
Ac(veMQ	
  Performance	
  Module	
  
§  Part	
  of	
  the	
  Ac9veMQ	
  Build	
  
h6p://ac9vemq.apache.org/ac9vemq-­‐performance-­‐module-­‐users-­‐manual.html	
  
§  Maven	
  plugin	
  
§  Quick	
  and	
  easy	
  to	
  get	
  started	
  
§  Flexible	
  
§  Records	
  throughput,	
  basic	
  sta9s9cs,	
  and	
  CPU	
  
metrics	
  
© 2012 FuseSource Corp.All rights reserved.17	
  
jms-­‐benchmark	
  
§  Opensource	
  at	
  github,	
  from	
  Hiram	
  Chirino
h6p://github.com/chirino/jms-­‐benchmark	
  
§  Comprehensive	
  benchmarks	
  
§  Configurable	
  
§  All-­‐on-­‐one	
  
§  Mul9ple	
  brokers	
  
§  Pre6y	
  graphs!	
  
© 2012 FuseSource Corp.All rights reserved.18	
  
JmsTester	
  
§  From	
  FuseSource	
  	
  
h6p://jmstester.fusesource.org	
  
§  My	
  branch:	
  
h6ps://github.com/chris9an-­‐posta/jms-­‐tester	
  
§  Allows	
  more	
  complicated	
  load	
  tes9ng	
  
§  Distributed	
  
§  Records	
  messaging	
  throughput	
  and	
  CPU,	
  Memory,	
  
Network	
  IO,	
  Disk	
  IO,	
  et	
  al.	
  	
  
§  Thorough	
  documenta9on	
  	
  
§  My	
  blog	
  post:	
  	
  
h6p://www.chris9anposta.com/blog/?p=268	
  
© 2012 FuseSource Corp.All rights reserved.19	
  
JMeter 	
  	
  
§  Swiss	
  army	
  knife	
  of	
  load	
  tes9ng	
  
§  From	
  Apache	
  
h6p://jmeter.apache.org	
  
§  JMS,	
  HTTP,	
  TCP,	
  SOAP,	
  JDBC,	
  	
  and	
  many	
  others	
  
§  Many	
  aggregators	
  and	
  repor9ng	
  features	
  
§  Mature	
  product,	
  well	
  known	
  
© 2012 FuseSource Corp.All rights reserved.20	
  
OS	
  Tools	
  
§  Lest	
  we	
  forget…	
  rely	
  heavily	
  on	
  the	
  tools	
  your	
  Opera9ng	
  
System	
  exposes!	
  
§  Linux	
  
•  top	
  
•  iostat	
  
•  netstat	
  
•  vmstat	
  
§  Windows	
  
•  Built	
  in	
  process,	
  resource	
  monitors	
  
© 2012 FuseSource Corp.All rights reserved.21	
  
Ac(veMQ	
  Performance	
  Module	
  
§  Maven	
  plugin	
  
§  Can	
  use	
  exis9ng	
  project:
h6ps://svn.apache.org/repos/asf/ac9vemq/sandbox/ac9vemq-­‐persest	
  
§  Spin	
  up	
  producers,	
  consumers	
  
§  Control	
  number	
  of	
  threads,	
  test	
  dura9ons,	
  etc	
  
§  Stats	
  and	
  Repor9ng	
  
•  Throughput,	
  min/max,	
  broken	
  down	
  per	
  client	
  
	
  
	
  
	
  plugin	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  groupIdorg.apache.ac9vemq.tooling/groupId	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  ar9factIdac9vemq-­‐perf-­‐maven-­‐plugin/ar9factId	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  version${ac9vemq-­‐version}/version	
  
	
  /plugin	
  
© 2012 FuseSource Corp.All rights reserved.22	
  
Using	
  Performance	
  Module	
  
§  Example:	
  
§  Out	
  of	
  the	
  box	
  examples:	
  
§  Other	
  out	
  of	
  the	
  box	
  profiles:	
  
•  Producer	
  
–  AMQ-­‐Prod-­‐1-­‐1-­‐queue-­‐nonpersistent.proper9es	
  
–  AMQ-­‐Prod-­‐10-­‐1-­‐queue-­‐nonpersistent.proper9es	
  
–  AMQ-­‐Prod-­‐10-­‐10-­‐topic-­‐persistent.proper9es	
  
•  Consumer	
  
–  AMQ-­‐Cons-­‐1-­‐1-­‐queue.proper9es	
  
–  AMQ-­‐Cons-­‐10-­‐1-­‐topic-­‐durable.proper9es	
  
–  AMQ-­‐Cons-­‐10-­‐10-­‐queue.proper9es	
  
user@computer mvn activemq-perf:producer –Dfactory.brokerURL=tcp://localhost:61616	
user@computer mvn activemq-perf:producer 

–DsysTest.propsConfigFile=AMQ-prod-1-1-queue-persistent.properties
© 2012 FuseSource Corp.All rights reserved.23	
  
What	
  Broker	
  to	
  Use?	
  
§  Load	
  up	
  an	
  external	
  broker	
  
•  Exis9ng	
  broker	
  
•  No	
  maven	
  access	
  
•  Different	
  machine	
  (good	
  idea!)	
  
§  Load	
  one	
  from	
  the	
  perf	
  module	
  
•  Tests	
  and	
  broker	
  config	
  all	
  in	
  one	
  
•  Simple	
  maven	
  command	
  
user@computer mvn activemq-perf:broker –Durl=tcp://localhost:61616
© 2012 FuseSource Corp.All rights reserved.24	
  
Defaults	
  
§  Overall	
  
•  tp,cpu	
  reports	
  
•  5	
  min	
  
•  30s	
  warm	
  up	
  30s	
  cool	
  down	
  
•  1s	
  sample	
  rate	
  
§  Producer	
  
•  Non-­‐persistent	
  
•  Auto	
  ack	
  
•  1K	
  message	
  size	
  
§  Consumer	
  
•  Non	
  durable	
  subscrip9on	
  
•  Auto	
  ack	
  
•  No	
  tx	
  
© 2012 FuseSource Corp.All rights reserved.25	
   Copyright	
  ©	
  2011	
  	
  Progress	
  Sosware	
  Corpora9on	
  and/or	
  its	
  subsidiaries	
  or	
  affiliates.	
  All	
  rights	
  reserved.	
  	
   A	
  Progress	
  Sosware	
  Company	
  FuseSource	
  Confiden9al	
  25	
  
Quick	
  Demo!	
  
© 2012 FuseSource Corp.All rights reserved.26	
  
Results	
  explana(on	
  
© 2012 FuseSource Corp.All rights reserved.27	
  
While	
  Running…	
  
§  Use	
  JConsole!	
  
§  A	
  more	
  powerful	
  toolkit?	
  YourKit?	
  
§  Rely	
  on	
  OS	
  monitoring,	
  top,	
  iostat,	
  etc	
  
© 2012 FuseSource Corp.All rights reserved.28	
   Copyright	
  ©	
  2011	
  	
  Progress	
  Sosware	
  Corpora9on	
  and/or	
  its	
  subsidiaries	
  or	
  affiliates.	
  All	
  rights	
  reserved.	
  	
   A	
  Progress	
  Sosware	
  Company	
  FuseSource	
  Confiden9al	
  28	
  
Tuning	
  Ac(veMQ	
  
© 2012 FuseSource Corp.All rights reserved.29	
  
Approach	
  
§  Know	
  your	
  requirements	
  
§  Use	
  real	
  hardware,	
  real	
  scenarios,	
  real	
  se}ngs	
  
§  Know	
  what	
  config	
  changes	
  do!	
  
§  Tune	
  
§  Run	
  tests	
  
§  Capture	
  results	
  
§  Repeat	
  
§  Change	
  only	
  one	
  se}ng	
  at	
  a	
  9me!	
  
© 2012 FuseSource Corp.All rights reserved.30	
  
Where	
  are	
  the	
  BoPlenecks?	
  
§  Overall	
  system	
  
§  Network	
  latencies	
  
§  Disk	
  IO!	
  
§  Threading	
  overheads	
  
§  JVM	
  op9miza9ons	
  
© 2012 FuseSource Corp.All rights reserved.31	
  
Network	
  
§  Mbits/Gbits	
  per	
  second	
  throughput	
  
§  Topology	
  
• Hops	
  
• Switches	
  
• Routes	
  
• Gateways	
  
§  Firewalls	
  
§  Internal/External	
  clients	
  
© 2012 FuseSource Corp.All rights reserved.32	
  
Disk	
  
§  Read/Write	
  speeds	
  
§  Mechanical	
  vs	
  SSD	
  
§  Shared	
  disks,	
  SAN,	
  NAS,	
  NFS,	
  etc	
  
§  Ac9veMQ	
  DiskBenchmark:	
  
Benchmarking:	
  /Users/cposta/temp/test.dat	
  
Writes:	
  	
  
	
  	
  159232	
  writes	
  of	
  size	
  4096	
  wri6en	
  in	
  10.244	
  seconds.	
  
	
  	
  15543.928	
  writes/second.	
  
	
  	
  60.718468	
  megs/second.	
  
	
  
Sync	
  Writes:	
  	
  
	
  	
  33213	
  writes	
  of	
  size	
  4096	
  wri6en	
  in	
  10.001	
  seconds.	
  
	
  	
  3320.968	
  writes/second.	
  
	
  	
  12.972531	
  megs/second.	
  
	
  
Reads:	
  	
  
	
  	
  5160332	
  reads	
  of	
  size	
  4096	
  read	
  in	
  10.001	
  seconds.	
  
	
  	
  515981.6	
  writes/second.	
  
	
  	
  2015.5531	
  megs/second.	
  
user@computer java -classpath lib/activemq-kahadb-store-5.8.0.jar 	
org.apache.activemq.store.kahadb.disk.util.DiskBenchmark 	
/Users/cposta/temp/test.dat
© 2012 FuseSource Corp.All rights reserved.33	
  
Tune	
  What	
  Needs	
  Tuning!	
  	
  
The following aren’t things you must or need do… 	

they are things to consider and can be worth tuning.	

	

Your	
  specific	
  use	
  cases	
  will	
  illuminate	
  what	
  needs	
  tuning	
  
© 2012 FuseSource Corp.All rights reserved.34	
  
Transport	
  Tuning	
  
§  TCP	
  Tuning	
  
•  Timeouts	
  (Handshake,	
  Teardowns)	
  
•  Conges9on	
  avoidance,	
  sliding	
  windows	
  
•  Send/Receive	
  Buffers!!	
  
•  Default	
  64K,	
  but	
  increase	
  to	
  Bandwidth	
  Delay	
  Product	
  
–  Buffer	
  =	
  Bandwidth	
  *	
  RTT	
  	
  
h6p://www.speedguide.net/bdp.php	
  
–  See	
  h6p://en.wikipedia.org/wiki/TCP_tuning	
  
§  Configure	
  the	
  socket:	
  
§  transport.*	
  
§  socket.*	
  
transportConnector	
  name=openwire	
  	
  
	
  	
  	
  	
  	
  uri=tcp://0.0.0.0:61616?maximumConnec9ons=1000	
  
	
  	
  	
  	
  	
  	
  wireformat.maxFrameSize=104857600transport.socketBufferSize=131072	
  /	
  
© 2012 FuseSource Corp.All rights reserved.35	
  
Transport	
  Tuning…	
  
§  Buffering	
  between	
  Socket	
  and	
  Protocol	
  Codec	
  
§  IOBufferSize	
  
•  Default	
  8k	
  	
  
transportConnector	
  name=openwire	
  	
  
	
  	
  	
  	
  	
  uri=tcp://0.0.0.0:61616?maximumConnec9ons=1000	
  
	
  	
  	
  	
  	
  	
  wireformat.maxFrameSize=104857600transport.ioBufferSize=65536	
  /	
  
© 2012 FuseSource Corp.All rights reserved.36	
  
Wire	
  Format	
  Tuning	
  
§  OpenWire	
  (default	
  protocol)	
  
•  wireFormat.tcpNoDelayEnabled	
  –	
  whether	
  or	
  not	
  to	
  use	
  Nagle’s	
  
batching	
  algorithm	
  (default:	
  true	
  ..that	
  means	
  no	
  Nagle)	
  
•  wireFormat.cacheSize	
  –	
  how	
  many	
  command	
  object	
  constants	
  to	
  
cache	
  (default:	
  1024)	
  
•  wireFormat.cacheEnabled	
  –	
  turn	
  cache	
  on/off	
  (default:	
  true)	
  
•  wireFormat.9ghtEncoding	
  –	
  reduce	
  network	
  load	
  (default:	
  true)	
  
•  wireFormat.maxFrameSize	
  –	
  message	
  sizes	
  (default:	
  
Long.MAX_LONG)	
  
•  wireFormat.maxInac9vityDura9on	
  –	
  monitors	
  period	
  of	
  inac9vity	
  
(default:	
  30000ms,	
  set	
  to	
  0	
  to	
  disable))	
  
transportConnector	
  name=openwire	
  	
  
	
  	
  	
  	
  	
  uri=tcp://0.0.0.0:61616?wireFormat.tcpNoDelayEnabled=false	
  /	
  
© 2012 FuseSource Corp.All rights reserved.37	
  
Tuning	
  Clients	
  
§  Compression	
  
•  ?jms.useCompression=true	
  
	
  
•  jms.*	
  configures	
  underlying	
  connec9on	
  factory	
  
•  Uses	
  java.u9l.zip.Deflater	
  
§  Encoding	
  
•  JMS	
  Message	
  types	
  
– Object	
  
– Bytes	
  
– Text	
  
– Stream	
  
– Map	
  
transportConnector	
  name=openwire”	
  uri=tcp://0.0.0.0:61616?jms.useCompression=true	
  /	
  
© 2012 FuseSource Corp.All rights reserved.38	
  
Tuning	
  Producers	
  
§  Producer	
  Flow	
  Control	
  
•  Persistent	
  vs	
  non	
  persistent	
  messaging	
  
•  Broker	
  vs	
  Client	
  
•  Broker	
  memory,	
  client	
  producer	
  window	
  
•  Default	
  sync	
  send	
  for	
  persistent,	
  async	
  send	
  for	
  non-­‐persistent	
  
and	
  transac9ons	
  (except	
  for	
  commit/rollback	
  opera9on)	
  
•  En9re	
  connec9on	
  flow	
  control,	
  individual	
  des9na9on	
  flow	
  control,	
  
TCP	
  flow	
  control	
  	
  
•  Disable	
  flow	
  control	
  
§  jms.alwaysSyncSend	
  
§  jms.useAsyncSend	
  
§  Send	
  fail	
  if	
  no	
  space	
  
policyEntry	
  queue=“queueWildcard”	
  producerFlowControl=“false”	
  /	
  
© 2012 FuseSource Corp.All rights reserved.39	
  
Failover	
  
§  Use	
  failover	
  transport	
  for	
  automa9c	
  reconnects	
  
§  backup	
  
§  priorityBackup	
  
§  trackMessages	
  (default	
  false)	
  
§  backOffMul9plier	
  
§  maxReconnectA6empts	
  
§  randomize	
  
§  Can	
  automa9cally	
  get	
  updates	
  from	
  broker	
  when	
  cluster	
  
situa9on	
  changes	
  
failover:(tcp://primary:61616,tcp://secondary:61616)?randomize=false	
  
© 2012 FuseSource Corp.All rights reserved.40	
  
Other	
  Producer	
  Parameters 	
  	
  
§  jms.watchTopicAdvisories=false	
  
§  jms.copyMessageOnSend	
  
§  Batch	
  using	
  transac9ons	
  
© 2012 FuseSource Corp.All rights reserved.41	
  
Tuning	
  Consumers	
  
§  Prefetch	
  
•  Queue	
  –	
  1000	
  
•  Queue	
  Browser	
  –	
  500	
  
•  Topic	
  –	
  32K	
  
•  Durable	
  Topic	
  –	
  100	
  
§  Broker	
  side	
  memory	
  
§  Client	
  side	
  memory	
  
§  Consumer	
  starva9on	
  
© 2012 FuseSource Corp.All rights reserved.42	
  
Prefetch	
  SeXngs	
  
§  Broker	
  
§  Consumer	
  
§  Des9na9on	
  
	
  broker	
  ...	
  	
  
	
  	
  	
  des9na9onPolicy	
  
	
  	
  	
  	
  	
  policyMap	
  
	
  	
  	
  	
  	
  	
  	
  policyEntries	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  policyEntry	
  queue=queue.	
  queuePrefetch=”1”/	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  policyEntry	
  topic=topic.	
  topicPrefetch=”1000”/	
  
	
  	
  	
  	
  	
  	
  	
  /policyEntries	
  
	
  	
  	
  	
  	
  /policyMap	
  
	
  	
  	
  /des9na9onPolicy	
  
	
  /broker	
  
jms.prefetchPolicy.queuePrefetch=100	
  
new	
  Ac9veMQQueue(TEST.QUEUE?consumer.prefetchSize=10)	
  
© 2012 FuseSource Corp.All rights reserved.43	
  
Consumer	
  ACK	
  Modes	
  
§  Session.AUTO_ACKNOWLEDGE	
  
§  Session.CLIENT_ACKNOWLEDGE	
  
§  Session.DUPS_OKAY_ACKNOWLEDGE	
  
§  Session.SESSION_TRANSACTED	
  
§  Ac9veMQSession.INDIVIDUAL_ACKNOWLEDGE	
  
§  jms.op9mizedAcknowledge	
  with	
  AUTO_ACK	
  
§  Note	
  the	
  differences	
  with	
  DUPS_OKAY_ACKNOWLEDGE	
  
when	
  using	
  topics	
  or	
  queues.	
  	
  
© 2012 FuseSource Corp.All rights reserved.44	
  
Other	
  Consumer	
  Parameters	
  
§  jms.alwaysSessionAsync	
  reduce	
  context	
  switching	
  
§  MessageListener	
  faster	
  
§  Spring	
  DMLC:	
  Cache	
  consumers	
  and	
  connec9ons!	
  
© 2012 FuseSource Corp.All rights reserved.45	
  
Tuning	
  Broker	
  Core	
  
§  Keep	
  an	
  eye	
  on	
  number	
  of	
  threads	
  
•  UseDedicatedTaskRunner	
  –	
  use	
  a	
  dedicated	
  dispatch	
  thread	
  for	
  
queues	
  
•  op9mizedDispatch	
  –	
  don’t	
  take	
  the	
  penalty	
  of	
  context	
  switch,	
  just	
  
let	
  the	
  transport	
  thread	
  do	
  the	
  dispatch	
  
•  asyncDispatch	
  –	
  don’t	
  take	
  the	
  penalty	
  of	
  context	
  switch,	
  let	
  the	
  
dispatching	
  thread	
  send	
  to	
  the	
  consumer’s	
  transport	
  
•  NIO	
  connector	
  nio://localhost:61616	
  
© 2012 FuseSource Corp.All rights reserved.46	
  
Broker	
  Resource	
  SeXngs	
  
§  MemoryUsage	
  se}ngs	
  for	
  messages	
  
§  Caching	
  for	
  persistent	
  vs	
  non-­‐persistent	
  
§  Policy	
  se}ngs,	
  memory	
  limits	
  for	
  des9na9ons,	
  cursor	
  high	
  
water	
  mark,	
  etc	
  
§  Temp	
  usage	
  for	
  offlining	
  non-­‐persistent	
  messages	
  
§  Use	
  the	
  right	
  combina9on	
  of	
  memory,	
  producer	
  flow	
  
control,	
  and	
  message	
  cursors	
  
© 2012 FuseSource Corp.All rights reserved.47	
  
Configura(on	
  of	
  Resources	
  
!–	
  defaults	
  -­‐-­‐	
  
systemUsage	
  
	
  	
  systemUsage	
  
	
  	
  	
  	
  memoryUsage	
  
	
  	
  	
  	
  	
  	
  memoryUsage	
  limit=64	
  mb	
  /	
  
	
  	
  	
  	
  /memoryUsage	
  
	
  	
  	
  	
  storeUsage	
  
	
  	
  	
  	
  	
  	
  storeUsage	
  limit=100	
  gb	
  /	
  
	
  	
  	
  	
  /storeUsage	
  
	
  	
  	
  	
  tempUsage	
  
	
  	
  	
  	
  	
  	
  tempUsage	
  limit=10	
  gb	
  /	
  
	
  	
  	
  	
  /tempUsage	
  
	
  	
  /systemUsage	
  
/systemUsage	
  
policyEntry	
  queue=“queueWildcard”	
  memoryLimit=“10M”	
  /	
  
© 2012 FuseSource Corp.All rights reserved.48	
  
KahaDB	
  
§  Current	
  messaging	
  database	
  
§  Fast,	
  op9mized	
  for	
  messaging	
  
§  Journal	
  +	
  Index	
  +	
  write	
  ahead	
  log	
  
§  Fast	
  recovery	
  
§  Fewer	
  file	
  descriptors	
  
© 2012 FuseSource Corp.All rights reserved.49	
  
Tuning	
  KahaDB	
  
§  What	
  levels	
  of	
  reliability	
  must	
  you	
  have?	
  
§  Durability	
  vs	
  throughput	
  
§  fsync	
  vs	
  fflush	
  
§  Areas	
  of	
  tuning	
  
•  Concurrent	
  store	
  and	
  dispatch	
  
•  Index	
  paging,	
  caching,	
  page	
  size,	
  sync,	
  checkpoin9ng	
  
•  Journal	
  sync,	
  file	
  length,	
  checkpoin9ng	
  
© 2012 FuseSource Corp.All rights reserved.50	
  
KahaDB	
  Journal	
  SeXngs	
  
§  enableJournalDiskSyncs	
  (default:	
  true)	
  
§  cleanupInterval	
  (default:	
  30000ms)	
  
§  checkForCorruptJournalFiles	
  (default:	
  false)	
  
§  journalSize	
  (default:	
  32MB)	
  
broker	
  brokerName=broker	
  ...	
  	
  
	
  	
  	
  	
  persistenceAdapter	
  
	
  	
  	
  	
  	
  	
  kahaDB	
  directory=ac9vemq-­‐data	
  journalMaxFileLength=32mb”	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  cleanupInterval=“150000”	
  checkForCorruptJournalFiles=“true”/	
  
	
  	
  	
  	
  /persistenceAdapter	
  
	
  	
  	
  	
  ...	
  
	
  	
  /broker	
  
© 2012 FuseSource Corp.All rights reserved.51	
  
KahaDB	
  Index	
  SeXngs	
  
§  How	
  osen	
  the	
  index	
  writes	
  updates	
  
•  checkpointInterval	
  (default:	
  5000),	
  indexWriteBatchSize	
  (default:	
  
1000)	
  
•  Can	
  amor9ze	
  cost	
  across	
  small	
  writes?	
  Or	
  batch	
  them	
  up	
  for	
  
larger	
  writes	
  
§  Size	
  of	
  the	
  index	
  in	
  memory	
  
•  indexCacheSize	
  (default:	
  10000)	
  
§  Sync	
  to	
  disk	
  
•  enableIndexDiskSyncs	
  (default:	
  true)	
  
broker	
  brokerName=broker	
  ...	
  	
  
	
  	
  	
  	
  persistenceAdapter	
  
	
  	
  	
  	
  	
  	
  kahaDB	
  directory=ac9vemq-­‐data	
  journalMaxFileLength=32mb”	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  indexCacheSize=“40000”	
  enableIndexDiskSyncs=“false”/	
  
	
  	
  	
  	
  /persistenceAdapter	
  
	
  	
  	
  	
  ...	
  
	
  	
  /broker	
  
© 2012 FuseSource Corp.All rights reserved.52	
  
Tradeoffs	
  
§  Point	
  to	
  point,	
  publish	
  subscribe	
  
§  Levels	
  of	
  durability	
  
§  Duplicate	
  messages	
  
§  Security	
  
§  Throughput	
  
§  Priority	
  
© 2012 FuseSource Corp.All rights reserved.53	
  
Summary	
  
§  Ac9veMQ	
  is	
  a	
  highly	
  tunable,	
  configurable	
  piece	
  of	
  server	
  
sosware	
  
§  Know	
  your	
  use	
  cases	
  and	
  requirements	
  
§  Use	
  tools	
  to	
  not	
  only	
  load	
  the	
  broker,	
  but	
  monitor	
  the	
  
bo6lenecks	
  
§  Tune	
  for	
  producers/consumers,	
  broker	
  core,	
  network,	
  and	
  
disk	
  IO	
  
§  Ask	
  the	
  computer!	
  
© 2012 FuseSource Corp.All rights reserved.54	
   Copyright	
  ©	
  2011	
  	
  Progress	
  Sosware	
  Corpora9on	
  and/or	
  its	
  subsidiaries	
  or	
  affiliates.	
  All	
  rights	
  reserved.	
  	
   A	
  Progress	
  Sosware	
  Company	
  FuseSource	
  Confiden9al	
  54	
  
Ques(ons?	
  
© 2012 FuseSource Corp.All rights reserved.55	
  
Useful	
  Links	
  
§  Apache	
  Ac9veMQ	
  
h6p://ac9vemq.apache.org/	
  
§  JMS	
  Benchmarks	
  
h6p://github.com/chirino/jms-­‐benchmark	
  
§  Ac9veMQ	
  Performance	
  module	
  tools:
h6p://svn.apache.org/repos/asf/ac9vemq/sandbox/
ac9vemq-­‐persest	
  
	
  
§  Lots	
  of	
  blogging	
  about	
  Ac9veMQ	
  J	
  
h6p://chris9anposta.com/blog	
  
	
  
	
  

Weitere ähnliche Inhalte

Was ist angesagt?

Ozone: scaling HDFS to trillions of objects
Ozone: scaling HDFS to trillions of objectsOzone: scaling HDFS to trillions of objects
Ozone: scaling HDFS to trillions of objectsDataWorks Summit
 
Real-time Adaptation of Financial Market Events with Kafka | Cliff Cheng and ...
Real-time Adaptation of Financial Market Events with Kafka | Cliff Cheng and ...Real-time Adaptation of Financial Market Events with Kafka | Cliff Cheng and ...
Real-time Adaptation of Financial Market Events with Kafka | Cliff Cheng and ...HostedbyConfluent
 
Webinar: 99 Ways to Enrich Streaming Data with Apache Flink - Konstantin Knauf
Webinar: 99 Ways to Enrich Streaming Data with Apache Flink - Konstantin KnaufWebinar: 99 Ways to Enrich Streaming Data with Apache Flink - Konstantin Knauf
Webinar: 99 Ways to Enrich Streaming Data with Apache Flink - Konstantin KnaufVerverica
 
MAA Best Practices for Oracle Database 19c
MAA Best Practices for Oracle Database 19cMAA Best Practices for Oracle Database 19c
MAA Best Practices for Oracle Database 19cMarkus Michalewicz
 
Apache Tez – Present and Future
Apache Tez – Present and FutureApache Tez – Present and Future
Apache Tez – Present and FutureDataWorks Summit
 
Hive 3 - a new horizon
Hive 3 - a new horizonHive 3 - a new horizon
Hive 3 - a new horizonThejas Nair
 
Oracle RAC on Extended Distance Clusters - Customer Examples
Oracle RAC on Extended Distance Clusters - Customer ExamplesOracle RAC on Extended Distance Clusters - Customer Examples
Oracle RAC on Extended Distance Clusters - Customer ExamplesMarkus Michalewicz
 
Schema registry
Schema registrySchema registry
Schema registryWhiteklay
 
Kafka at Peak Performance
Kafka at Peak PerformanceKafka at Peak Performance
Kafka at Peak PerformanceTodd Palino
 
Your tuning arsenal: AWR, ADDM, ASH, Metrics and Advisors
Your tuning arsenal: AWR, ADDM, ASH, Metrics and AdvisorsYour tuning arsenal: AWR, ADDM, ASH, Metrics and Advisors
Your tuning arsenal: AWR, ADDM, ASH, Metrics and AdvisorsJohn Kanagaraj
 
美团数据平台之Kafka应用实践和优化
美团数据平台之Kafka应用实践和优化美团数据平台之Kafka应用实践和优化
美团数据平台之Kafka应用实践和优化confluent
 
Multi-Cluster and Failover for Apache Kafka - Kafka Summit SF 17
Multi-Cluster and Failover for Apache Kafka - Kafka Summit SF 17Multi-Cluster and Failover for Apache Kafka - Kafka Summit SF 17
Multi-Cluster and Failover for Apache Kafka - Kafka Summit SF 17Gwen (Chen) Shapira
 
Kafka Tutorial - basics of the Kafka streaming platform
Kafka Tutorial - basics of the Kafka streaming platformKafka Tutorial - basics of the Kafka streaming platform
Kafka Tutorial - basics of the Kafka streaming platformJean-Paul Azar
 
Running Kafka as a Native Binary Using GraalVM with Ozan Günalp
Running Kafka as a Native Binary Using GraalVM with Ozan GünalpRunning Kafka as a Native Binary Using GraalVM with Ozan Günalp
Running Kafka as a Native Binary Using GraalVM with Ozan GünalpHostedbyConfluent
 
What we've learned from running a PostgreSQL managed service on Kubernetes
What we've learned from running a PostgreSQL managed service on KubernetesWhat we've learned from running a PostgreSQL managed service on Kubernetes
What we've learned from running a PostgreSQL managed service on KubernetesDoKC
 
Anil nair rac_internals_sangam_2016
Anil nair rac_internals_sangam_2016Anil nair rac_internals_sangam_2016
Anil nair rac_internals_sangam_2016Anil Nair
 
Cloudera training: secure your Cloudera cluster
Cloudera training: secure your Cloudera clusterCloudera training: secure your Cloudera cluster
Cloudera training: secure your Cloudera clusterCloudera, Inc.
 
The Top 5 Reasons to Deploy Your Applications on Oracle RAC
The Top 5 Reasons to Deploy Your Applications on Oracle RACThe Top 5 Reasons to Deploy Your Applications on Oracle RAC
The Top 5 Reasons to Deploy Your Applications on Oracle RACMarkus Michalewicz
 
Squirreling Away $640 Billion: How Stripe Leverages Flink for Change Data Cap...
Squirreling Away $640 Billion: How Stripe Leverages Flink for Change Data Cap...Squirreling Away $640 Billion: How Stripe Leverages Flink for Change Data Cap...
Squirreling Away $640 Billion: How Stripe Leverages Flink for Change Data Cap...Flink Forward
 

Was ist angesagt? (20)

Ozone: scaling HDFS to trillions of objects
Ozone: scaling HDFS to trillions of objectsOzone: scaling HDFS to trillions of objects
Ozone: scaling HDFS to trillions of objects
 
Real-time Adaptation of Financial Market Events with Kafka | Cliff Cheng and ...
Real-time Adaptation of Financial Market Events with Kafka | Cliff Cheng and ...Real-time Adaptation of Financial Market Events with Kafka | Cliff Cheng and ...
Real-time Adaptation of Financial Market Events with Kafka | Cliff Cheng and ...
 
Webinar: 99 Ways to Enrich Streaming Data with Apache Flink - Konstantin Knauf
Webinar: 99 Ways to Enrich Streaming Data with Apache Flink - Konstantin KnaufWebinar: 99 Ways to Enrich Streaming Data with Apache Flink - Konstantin Knauf
Webinar: 99 Ways to Enrich Streaming Data with Apache Flink - Konstantin Knauf
 
MAA Best Practices for Oracle Database 19c
MAA Best Practices for Oracle Database 19cMAA Best Practices for Oracle Database 19c
MAA Best Practices for Oracle Database 19c
 
Apache Tez – Present and Future
Apache Tez – Present and FutureApache Tez – Present and Future
Apache Tez – Present and Future
 
Hive 3 - a new horizon
Hive 3 - a new horizonHive 3 - a new horizon
Hive 3 - a new horizon
 
Oracle RAC on Extended Distance Clusters - Customer Examples
Oracle RAC on Extended Distance Clusters - Customer ExamplesOracle RAC on Extended Distance Clusters - Customer Examples
Oracle RAC on Extended Distance Clusters - Customer Examples
 
Schema registry
Schema registrySchema registry
Schema registry
 
Kafka at Peak Performance
Kafka at Peak PerformanceKafka at Peak Performance
Kafka at Peak Performance
 
Your tuning arsenal: AWR, ADDM, ASH, Metrics and Advisors
Your tuning arsenal: AWR, ADDM, ASH, Metrics and AdvisorsYour tuning arsenal: AWR, ADDM, ASH, Metrics and Advisors
Your tuning arsenal: AWR, ADDM, ASH, Metrics and Advisors
 
美团数据平台之Kafka应用实践和优化
美团数据平台之Kafka应用实践和优化美团数据平台之Kafka应用实践和优化
美团数据平台之Kafka应用实践和优化
 
Wso2 api manager 특징 slide share
Wso2 api manager 특징   slide shareWso2 api manager 특징   slide share
Wso2 api manager 특징 slide share
 
Multi-Cluster and Failover for Apache Kafka - Kafka Summit SF 17
Multi-Cluster and Failover for Apache Kafka - Kafka Summit SF 17Multi-Cluster and Failover for Apache Kafka - Kafka Summit SF 17
Multi-Cluster and Failover for Apache Kafka - Kafka Summit SF 17
 
Kafka Tutorial - basics of the Kafka streaming platform
Kafka Tutorial - basics of the Kafka streaming platformKafka Tutorial - basics of the Kafka streaming platform
Kafka Tutorial - basics of the Kafka streaming platform
 
Running Kafka as a Native Binary Using GraalVM with Ozan Günalp
Running Kafka as a Native Binary Using GraalVM with Ozan GünalpRunning Kafka as a Native Binary Using GraalVM with Ozan Günalp
Running Kafka as a Native Binary Using GraalVM with Ozan Günalp
 
What we've learned from running a PostgreSQL managed service on Kubernetes
What we've learned from running a PostgreSQL managed service on KubernetesWhat we've learned from running a PostgreSQL managed service on Kubernetes
What we've learned from running a PostgreSQL managed service on Kubernetes
 
Anil nair rac_internals_sangam_2016
Anil nair rac_internals_sangam_2016Anil nair rac_internals_sangam_2016
Anil nair rac_internals_sangam_2016
 
Cloudera training: secure your Cloudera cluster
Cloudera training: secure your Cloudera clusterCloudera training: secure your Cloudera cluster
Cloudera training: secure your Cloudera cluster
 
The Top 5 Reasons to Deploy Your Applications on Oracle RAC
The Top 5 Reasons to Deploy Your Applications on Oracle RACThe Top 5 Reasons to Deploy Your Applications on Oracle RAC
The Top 5 Reasons to Deploy Your Applications on Oracle RAC
 
Squirreling Away $640 Billion: How Stripe Leverages Flink for Change Data Cap...
Squirreling Away $640 Billion: How Stripe Leverages Flink for Change Data Cap...Squirreling Away $640 Billion: How Stripe Leverages Flink for Change Data Cap...
Squirreling Away $640 Billion: How Stripe Leverages Flink for Change Data Cap...
 

Ähnlich wie ActiveMQ Performance Tuning

Experiences of SOACS
Experiences of SOACSExperiences of SOACS
Experiences of SOACSSimon Haslam
 
Using Databases and Containers From Development to Deployment
Using Databases and Containers  From Development to DeploymentUsing Databases and Containers  From Development to Deployment
Using Databases and Containers From Development to DeploymentAerospike, Inc.
 
Nebulaworks Docker Overview 09-22-2015
Nebulaworks Docker Overview 09-22-2015Nebulaworks Docker Overview 09-22-2015
Nebulaworks Docker Overview 09-22-2015Chris Ciborowski
 
MuleSoft Runtime Fabric (RTF): Foundations : MuleSoft Virtual Muleys Meetups
MuleSoft Runtime Fabric (RTF): Foundations  : MuleSoft Virtual Muleys MeetupsMuleSoft Runtime Fabric (RTF): Foundations  : MuleSoft Virtual Muleys Meetups
MuleSoft Runtime Fabric (RTF): Foundations : MuleSoft Virtual Muleys MeetupsAngel Alberici
 
OpenStack and NetApp - Chen Reuven - OpenStack Day Israel 2017
OpenStack and NetApp - Chen Reuven - OpenStack Day Israel 2017OpenStack and NetApp - Chen Reuven - OpenStack Day Israel 2017
OpenStack and NetApp - Chen Reuven - OpenStack Day Israel 2017Cloud Native Day Tel Aviv
 
OpenStack + Cloud Foundry for the OpenStack Boston Meetup
OpenStack + Cloud Foundry for the OpenStack Boston MeetupOpenStack + Cloud Foundry for the OpenStack Boston Meetup
OpenStack + Cloud Foundry for the OpenStack Boston Meetupragss
 
Scaling AEM (CQ5) Gem Session
Scaling AEM (CQ5) Gem SessionScaling AEM (CQ5) Gem Session
Scaling AEM (CQ5) Gem SessionMichael Marth
 
3 Ways to Connect to the Oracle Cloud
3 Ways to Connect to the Oracle Cloud3 Ways to Connect to the Oracle Cloud
3 Ways to Connect to the Oracle CloudSimon Haslam
 
Meetup 23 - 01 - The things I wish I would have known before doing OpenStack ...
Meetup 23 - 01 - The things I wish I would have known before doing OpenStack ...Meetup 23 - 01 - The things I wish I would have known before doing OpenStack ...
Meetup 23 - 01 - The things I wish I would have known before doing OpenStack ...Vietnam Open Infrastructure User Group
 
EMC World 2016 - code.09 Introduction to the Docker Platform
EMC World 2016 - code.09 Introduction to the Docker PlatformEMC World 2016 - code.09 Introduction to the Docker Platform
EMC World 2016 - code.09 Introduction to the Docker Platform{code}
 
Hadoop Operations for Production Systems (Strata NYC)
Hadoop Operations for Production Systems (Strata NYC)Hadoop Operations for Production Systems (Strata NYC)
Hadoop Operations for Production Systems (Strata NYC)Kathleen Ting
 
GlassFish in Production Environments
GlassFish in Production EnvironmentsGlassFish in Production Environments
GlassFish in Production EnvironmentsBruno Borges
 
Distributed application usecase on docker
Distributed application usecase on dockerDistributed application usecase on docker
Distributed application usecase on dockerHiroshi Miura
 
EMC World 2016 - code.15 Better Together: Scale-Out Databases on Scale-Out St...
EMC World 2016 - code.15 Better Together: Scale-Out Databases on Scale-Out St...EMC World 2016 - code.15 Better Together: Scale-Out Databases on Scale-Out St...
EMC World 2016 - code.15 Better Together: Scale-Out Databases on Scale-Out St...{code}
 
FIWARE Tech Summit - Docker Swarm Secrets for Creating Great FIWARE Platforms
FIWARE Tech Summit - Docker Swarm Secrets for Creating Great FIWARE PlatformsFIWARE Tech Summit - Docker Swarm Secrets for Creating Great FIWARE Platforms
FIWARE Tech Summit - Docker Swarm Secrets for Creating Great FIWARE PlatformsFIWARE
 
Fine-Tuning of Agile Development
Fine-Tuning of Agile DevelopmentFine-Tuning of Agile Development
Fine-Tuning of Agile DevelopmentThoughtworks
 
Brian Bulkowski : what startups can learn from real-time bidding
Brian Bulkowski : what startups can learn from real-time biddingBrian Bulkowski : what startups can learn from real-time bidding
Brian Bulkowski : what startups can learn from real-time biddingAerospike
 

Ähnlich wie ActiveMQ Performance Tuning (20)

Experiences of SOACS
Experiences of SOACSExperiences of SOACS
Experiences of SOACS
 
Using Databases and Containers From Development to Deployment
Using Databases and Containers  From Development to DeploymentUsing Databases and Containers  From Development to Deployment
Using Databases and Containers From Development to Deployment
 
Nebulaworks Docker Overview 09-22-2015
Nebulaworks Docker Overview 09-22-2015Nebulaworks Docker Overview 09-22-2015
Nebulaworks Docker Overview 09-22-2015
 
Flume and HBase
Flume and HBase Flume and HBase
Flume and HBase
 
SD Times - Docker v2
SD Times - Docker v2SD Times - Docker v2
SD Times - Docker v2
 
MuleSoft Runtime Fabric (RTF): Foundations : MuleSoft Virtual Muleys Meetups
MuleSoft Runtime Fabric (RTF): Foundations  : MuleSoft Virtual Muleys MeetupsMuleSoft Runtime Fabric (RTF): Foundations  : MuleSoft Virtual Muleys Meetups
MuleSoft Runtime Fabric (RTF): Foundations : MuleSoft Virtual Muleys Meetups
 
OpenStack and NetApp - Chen Reuven - OpenStack Day Israel 2017
OpenStack and NetApp - Chen Reuven - OpenStack Day Israel 2017OpenStack and NetApp - Chen Reuven - OpenStack Day Israel 2017
OpenStack and NetApp - Chen Reuven - OpenStack Day Israel 2017
 
OpenStack + Cloud Foundry for the OpenStack Boston Meetup
OpenStack + Cloud Foundry for the OpenStack Boston MeetupOpenStack + Cloud Foundry for the OpenStack Boston Meetup
OpenStack + Cloud Foundry for the OpenStack Boston Meetup
 
Scaling AEM (CQ5) Gem Session
Scaling AEM (CQ5) Gem SessionScaling AEM (CQ5) Gem Session
Scaling AEM (CQ5) Gem Session
 
3 Ways to Connect to the Oracle Cloud
3 Ways to Connect to the Oracle Cloud3 Ways to Connect to the Oracle Cloud
3 Ways to Connect to the Oracle Cloud
 
Meetup 23 - 01 - The things I wish I would have known before doing OpenStack ...
Meetup 23 - 01 - The things I wish I would have known before doing OpenStack ...Meetup 23 - 01 - The things I wish I would have known before doing OpenStack ...
Meetup 23 - 01 - The things I wish I would have known before doing OpenStack ...
 
Scaling CQ5
Scaling CQ5Scaling CQ5
Scaling CQ5
 
EMC World 2016 - code.09 Introduction to the Docker Platform
EMC World 2016 - code.09 Introduction to the Docker PlatformEMC World 2016 - code.09 Introduction to the Docker Platform
EMC World 2016 - code.09 Introduction to the Docker Platform
 
Hadoop Operations for Production Systems (Strata NYC)
Hadoop Operations for Production Systems (Strata NYC)Hadoop Operations for Production Systems (Strata NYC)
Hadoop Operations for Production Systems (Strata NYC)
 
GlassFish in Production Environments
GlassFish in Production EnvironmentsGlassFish in Production Environments
GlassFish in Production Environments
 
Distributed application usecase on docker
Distributed application usecase on dockerDistributed application usecase on docker
Distributed application usecase on docker
 
EMC World 2016 - code.15 Better Together: Scale-Out Databases on Scale-Out St...
EMC World 2016 - code.15 Better Together: Scale-Out Databases on Scale-Out St...EMC World 2016 - code.15 Better Together: Scale-Out Databases on Scale-Out St...
EMC World 2016 - code.15 Better Together: Scale-Out Databases on Scale-Out St...
 
FIWARE Tech Summit - Docker Swarm Secrets for Creating Great FIWARE Platforms
FIWARE Tech Summit - Docker Swarm Secrets for Creating Great FIWARE PlatformsFIWARE Tech Summit - Docker Swarm Secrets for Creating Great FIWARE Platforms
FIWARE Tech Summit - Docker Swarm Secrets for Creating Great FIWARE Platforms
 
Fine-Tuning of Agile Development
Fine-Tuning of Agile DevelopmentFine-Tuning of Agile Development
Fine-Tuning of Agile Development
 
Brian Bulkowski : what startups can learn from real-time bidding
Brian Bulkowski : what startups can learn from real-time biddingBrian Bulkowski : what startups can learn from real-time bidding
Brian Bulkowski : what startups can learn from real-time bidding
 

Mehr von Christian Posta

Comparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and IstioComparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and IstioChristian Posta
 
Understanding Wireguard, TLS and Workload Identity
Understanding Wireguard, TLS and Workload IdentityUnderstanding Wireguard, TLS and Workload Identity
Understanding Wireguard, TLS and Workload IdentityChristian Posta
 
Compliance and Zero Trust Ambient Mesh
Compliance and Zero Trust Ambient MeshCompliance and Zero Trust Ambient Mesh
Compliance and Zero Trust Ambient MeshChristian Posta
 
Cilium + Istio with Gloo Mesh
Cilium + Istio with Gloo MeshCilium + Istio with Gloo Mesh
Cilium + Istio with Gloo MeshChristian Posta
 
Multi-cluster service mesh with GlooMesh
Multi-cluster service mesh with GlooMeshMulti-cluster service mesh with GlooMesh
Multi-cluster service mesh with GlooMeshChristian Posta
 
Multicluster Kubernetes and Service Mesh Patterns
Multicluster Kubernetes and Service Mesh PatternsMulticluster Kubernetes and Service Mesh Patterns
Multicluster Kubernetes and Service Mesh PatternsChristian Posta
 
Cloud-Native Application Debugging with Envoy and Service Mesh
Cloud-Native Application Debugging with Envoy and Service MeshCloud-Native Application Debugging with Envoy and Service Mesh
Cloud-Native Application Debugging with Envoy and Service MeshChristian Posta
 
Kubernetes Ingress to Service Mesh (and beyond!)
Kubernetes Ingress to Service Mesh (and beyond!)Kubernetes Ingress to Service Mesh (and beyond!)
Kubernetes Ingress to Service Mesh (and beyond!)Christian Posta
 
The Truth About the Service Mesh Data Plane
The Truth About the Service Mesh Data PlaneThe Truth About the Service Mesh Data Plane
The Truth About the Service Mesh Data PlaneChristian Posta
 
Deep Dive: Building external auth plugins for Gloo Enterprise
Deep Dive: Building external auth plugins for Gloo EnterpriseDeep Dive: Building external auth plugins for Gloo Enterprise
Deep Dive: Building external auth plugins for Gloo EnterpriseChristian Posta
 
Role of edge gateways in relation to service mesh adoption
Role of edge gateways in relation to service mesh adoptionRole of edge gateways in relation to service mesh adoption
Role of edge gateways in relation to service mesh adoptionChristian Posta
 
Navigating the service mesh landscape with Istio, Consul Connect, and Linkerd
Navigating the service mesh landscape with Istio, Consul Connect, and LinkerdNavigating the service mesh landscape with Istio, Consul Connect, and Linkerd
Navigating the service mesh landscape with Istio, Consul Connect, and LinkerdChristian Posta
 
Chaos Debugging for Microservices
Chaos Debugging for MicroservicesChaos Debugging for Microservices
Chaos Debugging for MicroservicesChristian Posta
 
Leveraging Envoy Proxy and GraphQL to Lower the Risk of Monolith to Microserv...
Leveraging Envoy Proxy and GraphQL to Lower the Risk of Monolith to Microserv...Leveraging Envoy Proxy and GraphQL to Lower the Risk of Monolith to Microserv...
Leveraging Envoy Proxy and GraphQL to Lower the Risk of Monolith to Microserv...Christian Posta
 
Service-mesh options with Linkerd, Consul, Istio and AWS AppMesh
Service-mesh options with Linkerd, Consul, Istio and AWS AppMeshService-mesh options with Linkerd, Consul, Istio and AWS AppMesh
Service-mesh options with Linkerd, Consul, Istio and AWS AppMeshChristian Posta
 
Intro Istio and what's new Istio 1.1
Intro Istio and what's new Istio 1.1Intro Istio and what's new Istio 1.1
Intro Istio and what's new Istio 1.1Christian Posta
 
API Gateways are going through an identity crisis
API Gateways are going through an identity crisisAPI Gateways are going through an identity crisis
API Gateways are going through an identity crisisChristian Posta
 
KubeCon NA 2018: Evolution of Integration and Microservices with Service Mesh...
KubeCon NA 2018: Evolution of Integration and Microservices with Service Mesh...KubeCon NA 2018: Evolution of Integration and Microservices with Service Mesh...
KubeCon NA 2018: Evolution of Integration and Microservices with Service Mesh...Christian Posta
 
PHX DevOps Days: Service Mesh Landscape
PHX DevOps Days: Service Mesh LandscapePHX DevOps Days: Service Mesh Landscape
PHX DevOps Days: Service Mesh LandscapeChristian Posta
 

Mehr von Christian Posta (20)

Comparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and IstioComparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and Istio
 
Understanding Wireguard, TLS and Workload Identity
Understanding Wireguard, TLS and Workload IdentityUnderstanding Wireguard, TLS and Workload Identity
Understanding Wireguard, TLS and Workload Identity
 
Compliance and Zero Trust Ambient Mesh
Compliance and Zero Trust Ambient MeshCompliance and Zero Trust Ambient Mesh
Compliance and Zero Trust Ambient Mesh
 
Cilium + Istio with Gloo Mesh
Cilium + Istio with Gloo MeshCilium + Istio with Gloo Mesh
Cilium + Istio with Gloo Mesh
 
Multi-cluster service mesh with GlooMesh
Multi-cluster service mesh with GlooMeshMulti-cluster service mesh with GlooMesh
Multi-cluster service mesh with GlooMesh
 
Multicluster Kubernetes and Service Mesh Patterns
Multicluster Kubernetes and Service Mesh PatternsMulticluster Kubernetes and Service Mesh Patterns
Multicluster Kubernetes and Service Mesh Patterns
 
Cloud-Native Application Debugging with Envoy and Service Mesh
Cloud-Native Application Debugging with Envoy and Service MeshCloud-Native Application Debugging with Envoy and Service Mesh
Cloud-Native Application Debugging with Envoy and Service Mesh
 
Kubernetes Ingress to Service Mesh (and beyond!)
Kubernetes Ingress to Service Mesh (and beyond!)Kubernetes Ingress to Service Mesh (and beyond!)
Kubernetes Ingress to Service Mesh (and beyond!)
 
The Truth About the Service Mesh Data Plane
The Truth About the Service Mesh Data PlaneThe Truth About the Service Mesh Data Plane
The Truth About the Service Mesh Data Plane
 
Deep Dive: Building external auth plugins for Gloo Enterprise
Deep Dive: Building external auth plugins for Gloo EnterpriseDeep Dive: Building external auth plugins for Gloo Enterprise
Deep Dive: Building external auth plugins for Gloo Enterprise
 
Role of edge gateways in relation to service mesh adoption
Role of edge gateways in relation to service mesh adoptionRole of edge gateways in relation to service mesh adoption
Role of edge gateways in relation to service mesh adoption
 
Navigating the service mesh landscape with Istio, Consul Connect, and Linkerd
Navigating the service mesh landscape with Istio, Consul Connect, and LinkerdNavigating the service mesh landscape with Istio, Consul Connect, and Linkerd
Navigating the service mesh landscape with Istio, Consul Connect, and Linkerd
 
Chaos Debugging for Microservices
Chaos Debugging for MicroservicesChaos Debugging for Microservices
Chaos Debugging for Microservices
 
Leveraging Envoy Proxy and GraphQL to Lower the Risk of Monolith to Microserv...
Leveraging Envoy Proxy and GraphQL to Lower the Risk of Monolith to Microserv...Leveraging Envoy Proxy and GraphQL to Lower the Risk of Monolith to Microserv...
Leveraging Envoy Proxy and GraphQL to Lower the Risk of Monolith to Microserv...
 
Service-mesh options with Linkerd, Consul, Istio and AWS AppMesh
Service-mesh options with Linkerd, Consul, Istio and AWS AppMeshService-mesh options with Linkerd, Consul, Istio and AWS AppMesh
Service-mesh options with Linkerd, Consul, Istio and AWS AppMesh
 
Intro Istio and what's new Istio 1.1
Intro Istio and what's new Istio 1.1Intro Istio and what's new Istio 1.1
Intro Istio and what's new Istio 1.1
 
API Gateways are going through an identity crisis
API Gateways are going through an identity crisisAPI Gateways are going through an identity crisis
API Gateways are going through an identity crisis
 
KubeCon NA 2018: Evolution of Integration and Microservices with Service Mesh...
KubeCon NA 2018: Evolution of Integration and Microservices with Service Mesh...KubeCon NA 2018: Evolution of Integration and Microservices with Service Mesh...
KubeCon NA 2018: Evolution of Integration and Microservices with Service Mesh...
 
PHX DevOps Days: Service Mesh Landscape
PHX DevOps Days: Service Mesh LandscapePHX DevOps Days: Service Mesh Landscape
PHX DevOps Days: Service Mesh Landscape
 
Intro to Knative
Intro to KnativeIntro to Knative
Intro to Knative
 

Kürzlich hochgeladen

08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 

Kürzlich hochgeladen (20)

08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 

ActiveMQ Performance Tuning

  • 1. © 2012 FuseSource Corp.All rights reserved.1   Apache  Ac(veMQ  Performance  Tuning   Chris(an  Posta Senior  Consultant  and  Architect   Blog:  h6p://chris9anposta.com/blog/   Twi6er:  @chris9anposta   GitHub:  h6ps://github.com/chris9an-­‐posta  
  • 2. © 2012 FuseSource Corp.All rights reserved.2   ceposta     § Chris9an  Posta   §  Blog:  h6p://chris9anposta.com/blog/   §  Email:  ceposta@apache.org   §  Twi6er:  @chris9anposta   §  GitHub:  h6ps://github.com/chris9an-­‐posta   §  Goolge+:  h6ps://plus.google.com/103810850748178017238       § Senior  Consultant  and  Architect  at  Red  Hat  (formerly   FuseSource)   § Commi6er  on:  Ac9veMQ,  Apollo   § Author  of  Essen%al  Camel  Components  DZone  Refcard  
  • 3. © 2012 FuseSource Corp.All rights reserved.3   What  Am  I  Talking  About?   §  What  is  Ac9veMQ?   §  Performance/Benchmarking  Tools   §  Tuning  
  • 4. © 2012 FuseSource Corp.All rights reserved.4   Apache  Ac(veMQ   §  OpenSource  Messaging  Server   •  Queues,  Topics,  persistent  messaging,  high   availability,  etc   §  Apache  v2.0  License   §  Ac9ve  community,  Mature,  Stable   §  Used  at  top  companies   •  Insurance,  banking,  retail,  ecommerce,  health   care,  avia9on,  shipping,  et.  al!   §  5.8.0  latest  release  
  • 5. © 2012 FuseSource Corp.All rights reserved.5   Apache  Ac(veMQ   §  High  performance   §  High  Availability   §  Light-­‐weight   §  Mul9-­‐protocol   §  JMS  compliant   §  Supported  in  Produc9on  
  • 6. © 2012 FuseSource Corp.All rights reserved.6   Accessible!   §  Java   §  C/C++  h6p://ac9vemq.apache.org/cms/   §  .NET  h6p://ac9vemq.apache.org/nms/   §  PHP   §  Python   §  Ruby   §  PHP   §  JavaScript     §  Telnet!   §  Any  that  can  make  a  TCP  connec9on  and  send  Text!    
  • 7. © 2012 FuseSource Corp.All rights reserved.7   Transports   §  TCP   §  UDP   §  SSL   §  NIO   §  HTTP/s   §  VM   §  WS  (Web  Sockets)   §  WSS  (Secure  Web  Sockets)  
  • 8. © 2012 FuseSource Corp.All rights reserved.8   Wire  Protocols   §  Openwire   h6p://ac9vemq.apache.org/openwire.html   §  Simple  Text  Oriented  Messaging  Protocol   (STOMP)   h6p://stomp.github.io   §  AMQP  1.0   h6p://www.amqp.org/resources/specifica9ons   §  MQTT   h6p://mq6.org   §  HTTP/REST  
  • 9. © 2012 FuseSource Corp.All rights reserved.9   Ac(veMQ  Features   §  Master/Slave  fault  tolerance  and  High  Availability   §  Broker  “networking”  or  clustering   §  Pluggable  persistence  (KahaDB,  LevelDB,  JDBC)   §  Broker  interoperability  (RabbitMQ,  HornetQ,  etc)   §  Virtual  Topics   §  Mirrored  Queues   §  JMX  Monitoring  
  • 10. © 2012 FuseSource Corp.All rights reserved.10   When  to  use  Messaging?   §  Asynchronous  communica9on/integra9on   §  Durability   §  Loose  coupling   §  Heterogenous  integra9on   §  Real-­‐9me  data  
  • 11. © 2012 FuseSource Corp.All rights reserved.11   Configura(on   Ac9veMQ  is  Highly  Configurable!!  
  • 12. © 2012 FuseSource Corp.All rights reserved.12   Performance/Benchmarking   Tools  
  • 13. © 2012 FuseSource Corp.All rights reserved.13   So  What  Are  We  Covering?   §  Tools   §  How  to  approach  performance  tuning   §  Areas  to  tweak!  
  • 14. © 2012 FuseSource Corp.All rights reserved.14   What  are  Your  Objec(ves!?   §  Please,  please,  please..  Know   what  you’re  trying  to   accomplish!   §  Know  your  use  cases!   §  Know  your  hardware/OS   §  Understand  all  of  the  broker   config  changes  you  make!   §  VALIDATE  YOUR  CHANGES!  
  • 15. © 2012 FuseSource Corp.All rights reserved.15   Broker  Benchmarking  Tools   §  Ac9veMQ  Performance  Module   §  jms-­‐benchmark   §  JMSTester   §  Apache  Jmeter   §  Grinder   §  …?  
  • 16. © 2012 FuseSource Corp.All rights reserved.16   Ac(veMQ  Performance  Module   §  Part  of  the  Ac9veMQ  Build   h6p://ac9vemq.apache.org/ac9vemq-­‐performance-­‐module-­‐users-­‐manual.html   §  Maven  plugin   §  Quick  and  easy  to  get  started   §  Flexible   §  Records  throughput,  basic  sta9s9cs,  and  CPU   metrics  
  • 17. © 2012 FuseSource Corp.All rights reserved.17   jms-­‐benchmark   §  Opensource  at  github,  from  Hiram  Chirino h6p://github.com/chirino/jms-­‐benchmark   §  Comprehensive  benchmarks   §  Configurable   §  All-­‐on-­‐one   §  Mul9ple  brokers   §  Pre6y  graphs!  
  • 18. © 2012 FuseSource Corp.All rights reserved.18   JmsTester   §  From  FuseSource     h6p://jmstester.fusesource.org   §  My  branch:   h6ps://github.com/chris9an-­‐posta/jms-­‐tester   §  Allows  more  complicated  load  tes9ng   §  Distributed   §  Records  messaging  throughput  and  CPU,  Memory,   Network  IO,  Disk  IO,  et  al.     §  Thorough  documenta9on     §  My  blog  post:     h6p://www.chris9anposta.com/blog/?p=268  
  • 19. © 2012 FuseSource Corp.All rights reserved.19   JMeter     §  Swiss  army  knife  of  load  tes9ng   §  From  Apache   h6p://jmeter.apache.org   §  JMS,  HTTP,  TCP,  SOAP,  JDBC,    and  many  others   §  Many  aggregators  and  repor9ng  features   §  Mature  product,  well  known  
  • 20. © 2012 FuseSource Corp.All rights reserved.20   OS  Tools   §  Lest  we  forget…  rely  heavily  on  the  tools  your  Opera9ng   System  exposes!   §  Linux   •  top   •  iostat   •  netstat   •  vmstat   §  Windows   •  Built  in  process,  resource  monitors  
  • 21. © 2012 FuseSource Corp.All rights reserved.21   Ac(veMQ  Performance  Module   §  Maven  plugin   §  Can  use  exis9ng  project: h6ps://svn.apache.org/repos/asf/ac9vemq/sandbox/ac9vemq-­‐persest   §  Spin  up  producers,  consumers   §  Control  number  of  threads,  test  dura9ons,  etc   §  Stats  and  Repor9ng   •  Throughput,  min/max,  broken  down  per  client        plugin                    groupIdorg.apache.ac9vemq.tooling/groupId                    ar9factIdac9vemq-­‐perf-­‐maven-­‐plugin/ar9factId                    version${ac9vemq-­‐version}/version    /plugin  
  • 22. © 2012 FuseSource Corp.All rights reserved.22   Using  Performance  Module   §  Example:   §  Out  of  the  box  examples:   §  Other  out  of  the  box  profiles:   •  Producer   –  AMQ-­‐Prod-­‐1-­‐1-­‐queue-­‐nonpersistent.proper9es   –  AMQ-­‐Prod-­‐10-­‐1-­‐queue-­‐nonpersistent.proper9es   –  AMQ-­‐Prod-­‐10-­‐10-­‐topic-­‐persistent.proper9es   •  Consumer   –  AMQ-­‐Cons-­‐1-­‐1-­‐queue.proper9es   –  AMQ-­‐Cons-­‐10-­‐1-­‐topic-­‐durable.proper9es   –  AMQ-­‐Cons-­‐10-­‐10-­‐queue.proper9es   user@computer mvn activemq-perf:producer –Dfactory.brokerURL=tcp://localhost:61616 user@computer mvn activemq-perf:producer 
 –DsysTest.propsConfigFile=AMQ-prod-1-1-queue-persistent.properties
  • 23. © 2012 FuseSource Corp.All rights reserved.23   What  Broker  to  Use?   §  Load  up  an  external  broker   •  Exis9ng  broker   •  No  maven  access   •  Different  machine  (good  idea!)   §  Load  one  from  the  perf  module   •  Tests  and  broker  config  all  in  one   •  Simple  maven  command   user@computer mvn activemq-perf:broker –Durl=tcp://localhost:61616
  • 24. © 2012 FuseSource Corp.All rights reserved.24   Defaults   §  Overall   •  tp,cpu  reports   •  5  min   •  30s  warm  up  30s  cool  down   •  1s  sample  rate   §  Producer   •  Non-­‐persistent   •  Auto  ack   •  1K  message  size   §  Consumer   •  Non  durable  subscrip9on   •  Auto  ack   •  No  tx  
  • 25. © 2012 FuseSource Corp.All rights reserved.25   Copyright  ©  2011    Progress  Sosware  Corpora9on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.     A  Progress  Sosware  Company  FuseSource  Confiden9al  25   Quick  Demo!  
  • 26. © 2012 FuseSource Corp.All rights reserved.26   Results  explana(on  
  • 27. © 2012 FuseSource Corp.All rights reserved.27   While  Running…   §  Use  JConsole!   §  A  more  powerful  toolkit?  YourKit?   §  Rely  on  OS  monitoring,  top,  iostat,  etc  
  • 28. © 2012 FuseSource Corp.All rights reserved.28   Copyright  ©  2011    Progress  Sosware  Corpora9on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.     A  Progress  Sosware  Company  FuseSource  Confiden9al  28   Tuning  Ac(veMQ  
  • 29. © 2012 FuseSource Corp.All rights reserved.29   Approach   §  Know  your  requirements   §  Use  real  hardware,  real  scenarios,  real  se}ngs   §  Know  what  config  changes  do!   §  Tune   §  Run  tests   §  Capture  results   §  Repeat   §  Change  only  one  se}ng  at  a  9me!  
  • 30. © 2012 FuseSource Corp.All rights reserved.30   Where  are  the  BoPlenecks?   §  Overall  system   §  Network  latencies   §  Disk  IO!   §  Threading  overheads   §  JVM  op9miza9ons  
  • 31. © 2012 FuseSource Corp.All rights reserved.31   Network   §  Mbits/Gbits  per  second  throughput   §  Topology   • Hops   • Switches   • Routes   • Gateways   §  Firewalls   §  Internal/External  clients  
  • 32. © 2012 FuseSource Corp.All rights reserved.32   Disk   §  Read/Write  speeds   §  Mechanical  vs  SSD   §  Shared  disks,  SAN,  NAS,  NFS,  etc   §  Ac9veMQ  DiskBenchmark:   Benchmarking:  /Users/cposta/temp/test.dat   Writes:        159232  writes  of  size  4096  wri6en  in  10.244  seconds.      15543.928  writes/second.      60.718468  megs/second.     Sync  Writes:        33213  writes  of  size  4096  wri6en  in  10.001  seconds.      3320.968  writes/second.      12.972531  megs/second.     Reads:        5160332  reads  of  size  4096  read  in  10.001  seconds.      515981.6  writes/second.      2015.5531  megs/second.   user@computer java -classpath lib/activemq-kahadb-store-5.8.0.jar org.apache.activemq.store.kahadb.disk.util.DiskBenchmark /Users/cposta/temp/test.dat
  • 33. © 2012 FuseSource Corp.All rights reserved.33   Tune  What  Needs  Tuning!     The following aren’t things you must or need do… they are things to consider and can be worth tuning. Your  specific  use  cases  will  illuminate  what  needs  tuning  
  • 34. © 2012 FuseSource Corp.All rights reserved.34   Transport  Tuning   §  TCP  Tuning   •  Timeouts  (Handshake,  Teardowns)   •  Conges9on  avoidance,  sliding  windows   •  Send/Receive  Buffers!!   •  Default  64K,  but  increase  to  Bandwidth  Delay  Product   –  Buffer  =  Bandwidth  *  RTT     h6p://www.speedguide.net/bdp.php   –  See  h6p://en.wikipedia.org/wiki/TCP_tuning   §  Configure  the  socket:   §  transport.*   §  socket.*   transportConnector  name=openwire              uri=tcp://0.0.0.0:61616?maximumConnec9ons=1000              wireformat.maxFrameSize=104857600transport.socketBufferSize=131072  /  
  • 35. © 2012 FuseSource Corp.All rights reserved.35   Transport  Tuning…   §  Buffering  between  Socket  and  Protocol  Codec   §  IOBufferSize   •  Default  8k     transportConnector  name=openwire              uri=tcp://0.0.0.0:61616?maximumConnec9ons=1000              wireformat.maxFrameSize=104857600transport.ioBufferSize=65536  /  
  • 36. © 2012 FuseSource Corp.All rights reserved.36   Wire  Format  Tuning   §  OpenWire  (default  protocol)   •  wireFormat.tcpNoDelayEnabled  –  whether  or  not  to  use  Nagle’s   batching  algorithm  (default:  true  ..that  means  no  Nagle)   •  wireFormat.cacheSize  –  how  many  command  object  constants  to   cache  (default:  1024)   •  wireFormat.cacheEnabled  –  turn  cache  on/off  (default:  true)   •  wireFormat.9ghtEncoding  –  reduce  network  load  (default:  true)   •  wireFormat.maxFrameSize  –  message  sizes  (default:   Long.MAX_LONG)   •  wireFormat.maxInac9vityDura9on  –  monitors  period  of  inac9vity   (default:  30000ms,  set  to  0  to  disable))   transportConnector  name=openwire              uri=tcp://0.0.0.0:61616?wireFormat.tcpNoDelayEnabled=false  /  
  • 37. © 2012 FuseSource Corp.All rights reserved.37   Tuning  Clients   §  Compression   •  ?jms.useCompression=true     •  jms.*  configures  underlying  connec9on  factory   •  Uses  java.u9l.zip.Deflater   §  Encoding   •  JMS  Message  types   – Object   – Bytes   – Text   – Stream   – Map   transportConnector  name=openwire”  uri=tcp://0.0.0.0:61616?jms.useCompression=true  /  
  • 38. © 2012 FuseSource Corp.All rights reserved.38   Tuning  Producers   §  Producer  Flow  Control   •  Persistent  vs  non  persistent  messaging   •  Broker  vs  Client   •  Broker  memory,  client  producer  window   •  Default  sync  send  for  persistent,  async  send  for  non-­‐persistent   and  transac9ons  (except  for  commit/rollback  opera9on)   •  En9re  connec9on  flow  control,  individual  des9na9on  flow  control,   TCP  flow  control     •  Disable  flow  control   §  jms.alwaysSyncSend   §  jms.useAsyncSend   §  Send  fail  if  no  space   policyEntry  queue=“queueWildcard”  producerFlowControl=“false”  /  
  • 39. © 2012 FuseSource Corp.All rights reserved.39   Failover   §  Use  failover  transport  for  automa9c  reconnects   §  backup   §  priorityBackup   §  trackMessages  (default  false)   §  backOffMul9plier   §  maxReconnectA6empts   §  randomize   §  Can  automa9cally  get  updates  from  broker  when  cluster   situa9on  changes   failover:(tcp://primary:61616,tcp://secondary:61616)?randomize=false  
  • 40. © 2012 FuseSource Corp.All rights reserved.40   Other  Producer  Parameters     §  jms.watchTopicAdvisories=false   §  jms.copyMessageOnSend   §  Batch  using  transac9ons  
  • 41. © 2012 FuseSource Corp.All rights reserved.41   Tuning  Consumers   §  Prefetch   •  Queue  –  1000   •  Queue  Browser  –  500   •  Topic  –  32K   •  Durable  Topic  –  100   §  Broker  side  memory   §  Client  side  memory   §  Consumer  starva9on  
  • 42. © 2012 FuseSource Corp.All rights reserved.42   Prefetch  SeXngs   §  Broker   §  Consumer   §  Des9na9on    broker  ...          des9na9onPolicy            policyMap                policyEntries                    policyEntry  queue=queue.  queuePrefetch=”1”/                    policyEntry  topic=topic.  topicPrefetch=”1000”/                /policyEntries            /policyMap        /des9na9onPolicy    /broker   jms.prefetchPolicy.queuePrefetch=100   new  Ac9veMQQueue(TEST.QUEUE?consumer.prefetchSize=10)  
  • 43. © 2012 FuseSource Corp.All rights reserved.43   Consumer  ACK  Modes   §  Session.AUTO_ACKNOWLEDGE   §  Session.CLIENT_ACKNOWLEDGE   §  Session.DUPS_OKAY_ACKNOWLEDGE   §  Session.SESSION_TRANSACTED   §  Ac9veMQSession.INDIVIDUAL_ACKNOWLEDGE   §  jms.op9mizedAcknowledge  with  AUTO_ACK   §  Note  the  differences  with  DUPS_OKAY_ACKNOWLEDGE   when  using  topics  or  queues.    
  • 44. © 2012 FuseSource Corp.All rights reserved.44   Other  Consumer  Parameters   §  jms.alwaysSessionAsync  reduce  context  switching   §  MessageListener  faster   §  Spring  DMLC:  Cache  consumers  and  connec9ons!  
  • 45. © 2012 FuseSource Corp.All rights reserved.45   Tuning  Broker  Core   §  Keep  an  eye  on  number  of  threads   •  UseDedicatedTaskRunner  –  use  a  dedicated  dispatch  thread  for   queues   •  op9mizedDispatch  –  don’t  take  the  penalty  of  context  switch,  just   let  the  transport  thread  do  the  dispatch   •  asyncDispatch  –  don’t  take  the  penalty  of  context  switch,  let  the   dispatching  thread  send  to  the  consumer’s  transport   •  NIO  connector  nio://localhost:61616  
  • 46. © 2012 FuseSource Corp.All rights reserved.46   Broker  Resource  SeXngs   §  MemoryUsage  se}ngs  for  messages   §  Caching  for  persistent  vs  non-­‐persistent   §  Policy  se}ngs,  memory  limits  for  des9na9ons,  cursor  high   water  mark,  etc   §  Temp  usage  for  offlining  non-­‐persistent  messages   §  Use  the  right  combina9on  of  memory,  producer  flow   control,  and  message  cursors  
  • 47. © 2012 FuseSource Corp.All rights reserved.47   Configura(on  of  Resources   !–  defaults  -­‐-­‐   systemUsage      systemUsage          memoryUsage              memoryUsage  limit=64  mb  /          /memoryUsage          storeUsage              storeUsage  limit=100  gb  /          /storeUsage          tempUsage              tempUsage  limit=10  gb  /          /tempUsage      /systemUsage   /systemUsage   policyEntry  queue=“queueWildcard”  memoryLimit=“10M”  /  
  • 48. © 2012 FuseSource Corp.All rights reserved.48   KahaDB   §  Current  messaging  database   §  Fast,  op9mized  for  messaging   §  Journal  +  Index  +  write  ahead  log   §  Fast  recovery   §  Fewer  file  descriptors  
  • 49. © 2012 FuseSource Corp.All rights reserved.49   Tuning  KahaDB   §  What  levels  of  reliability  must  you  have?   §  Durability  vs  throughput   §  fsync  vs  fflush   §  Areas  of  tuning   •  Concurrent  store  and  dispatch   •  Index  paging,  caching,  page  size,  sync,  checkpoin9ng   •  Journal  sync,  file  length,  checkpoin9ng  
  • 50. © 2012 FuseSource Corp.All rights reserved.50   KahaDB  Journal  SeXngs   §  enableJournalDiskSyncs  (default:  true)   §  cleanupInterval  (default:  30000ms)   §  checkForCorruptJournalFiles  (default:  false)   §  journalSize  (default:  32MB)   broker  brokerName=broker  ...            persistenceAdapter              kahaDB  directory=ac9vemq-­‐data  journalMaxFileLength=32mb”                                                    cleanupInterval=“150000”  checkForCorruptJournalFiles=“true”/          /persistenceAdapter          ...      /broker  
  • 51. © 2012 FuseSource Corp.All rights reserved.51   KahaDB  Index  SeXngs   §  How  osen  the  index  writes  updates   •  checkpointInterval  (default:  5000),  indexWriteBatchSize  (default:   1000)   •  Can  amor9ze  cost  across  small  writes?  Or  batch  them  up  for   larger  writes   §  Size  of  the  index  in  memory   •  indexCacheSize  (default:  10000)   §  Sync  to  disk   •  enableIndexDiskSyncs  (default:  true)   broker  brokerName=broker  ...            persistenceAdapter              kahaDB  directory=ac9vemq-­‐data  journalMaxFileLength=32mb”                                                    indexCacheSize=“40000”  enableIndexDiskSyncs=“false”/          /persistenceAdapter          ...      /broker  
  • 52. © 2012 FuseSource Corp.All rights reserved.52   Tradeoffs   §  Point  to  point,  publish  subscribe   §  Levels  of  durability   §  Duplicate  messages   §  Security   §  Throughput   §  Priority  
  • 53. © 2012 FuseSource Corp.All rights reserved.53   Summary   §  Ac9veMQ  is  a  highly  tunable,  configurable  piece  of  server   sosware   §  Know  your  use  cases  and  requirements   §  Use  tools  to  not  only  load  the  broker,  but  monitor  the   bo6lenecks   §  Tune  for  producers/consumers,  broker  core,  network,  and   disk  IO   §  Ask  the  computer!  
  • 54. © 2012 FuseSource Corp.All rights reserved.54   Copyright  ©  2011    Progress  Sosware  Corpora9on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.     A  Progress  Sosware  Company  FuseSource  Confiden9al  54   Ques(ons?  
  • 55. © 2012 FuseSource Corp.All rights reserved.55   Useful  Links   §  Apache  Ac9veMQ   h6p://ac9vemq.apache.org/   §  JMS  Benchmarks   h6p://github.com/chirino/jms-­‐benchmark   §  Ac9veMQ  Performance  module  tools: h6p://svn.apache.org/repos/asf/ac9vemq/sandbox/ ac9vemq-­‐persest     §  Lots  of  blogging  about  Ac9veMQ  J   h6p://chris9anposta.com/blog