Uploaded on


  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads


Total Views
On Slideshare
From Embeds
Number of Embeds



Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

    No notes for slide


  • 1. TsungMulti-protocol distributed load-testing toolTuesday, 18 June, 13
  • 2. Features• Distributed, light-weight (i.e., 512 byte memory footprint for an erlang process)• Multi-protocol• HTTP (+ WebSockets), WebDAV, SOAP, PostgreSQL, MySQL, LDAP,XMPP/Jabber• “Simple” XML user session description, proxy-based web sessionrecording• Synchronized OS monitoring• SNMP, Munin or Erlang agents• Dynamic variables, set from configuration or response bodies (XPath,JSON)• Randomized user think-times and arrival rate• HTML reports, including server response and synchronized monitoringresultsTuesday, 18 June, 13
  • 3. Distributed Testing<clients><client host="louxor" weight="1" maxusers="800"><ip value=""></ip><ip value=""></ip></client><client host="memphis" weight="3" maxusers="600" cpu="2"/></clients><servers><server host="" port="8080" type="tcp"></server></servers>• 2 clients in cluster• Client #1 has 2 virtual IPs•Testing load distributed assymetricallyto clientsTuesday, 18 June, 13
  • 4. Synchronized OSMonitoring• Monitoring “geronimo” with munin• Monitoring “f14-2” with erlang monitoring<monitoring><monitor host="geronimo" type="munin"/><monitor host="f14-2" type="erlang"></monitor></monitoring>Tuesday, 18 June, 13
  • 5. Synchronized OSMonitoringTuesday, 18 June, 13
  • 6. Simple XML Structure• A “session”: A collection of transactions• A “transaction”: A “page load”, or a “click”• If you know HTTP and XML, you can read aTsung user session<session name="general_interest_term_anon" probability="14" type="ts_http"><transaction name="tx_general_search_load"><request><http url="/api/me" method="GET" version="1.1"></http></request><request><http url="/api/search/general/all" method="GET" version="1.1"></http></request></transaction></session>Tuesday, 18 June, 13
  • 7. HTTP Proxy Recording1. Start the tsung proxy recorder2. Configure your browser / network for anHTTP proxy3. Enact a user sessionDemoTuesday, 18 June, 13
  • 8. Running a Tsung Test• Put together your Tsung XML file• Distribute your user sessions usingprobability attributes• Specify your arrival rate, hosname, user-agentsDemoTuesday, 18 June, 13
  • 9. Analyze the results• Use the tsung_stats.pl script to generatestatic website• Or other scripts provided (e.g., python-based comparison tool)DemoTuesday, 18 June, 13
  • 10. DynamicVariables1. Specify a file server in Tsung options (CSV)<option name="file_server" id="users" value="data/users.csv" />2. Set variable values in user session<setdynvars sourcetype="file" fileid="users" delimiter="," order="random"><var name="users_id" /><var name="users_username" /><var name="users_password" /></setdynvars>3. Use variable syntax to use variable in session<http url="/api/auth/login" method="POST" version="1.1"contents="username=%%_users_username%%&amp;password=%%_users_password%%"><http_header name="Referer" value="/" /></http>Tuesday, 18 June, 13
  • 11. Additional MaterialsManualhttp://tsung.erlang-projects.org/user_manual.htmlIRCirc.freenode.net #tsungMailing Listhttps://lists.process-one.net/mailman/listinfo/tsung-usersTuesday, 18 June, 13