SlideShare a Scribd company logo
1 of 30
Download to read offline
Web Server Deathmatch




             Joe Williams
               Cloudant

          @williamsjoe on Twitter
    http://www.joeandmotorboat.com/
Overview

 The Contenders

 The Systems, Test Setup, Environment and Configuration

 The Results
   Base Tests
   Experiements
   13A vs 12B-5

 Take Home



Web Server Deathmatch - Joe Williams - Erlang Factory 2009
The Contenders

 Apache (Prefork)
 Apache (Worker)
 Erlang INETS:HTTP
 Lighttpd
 MochiWeb
 Nginx
 Yaws




Web Server Deathmatch - Joe Williams - Erlang Factory 2009
The Systems

 Server
   Intel Core 2 Duo T7500 2.20GHz
   4GB RAM
   7200 RPM Hard Disk
   Ubuntu 8.10 x86_64

 httperf Client
    Intel Core 2 Duo P7350 2.0GHz
    2GB RAM
    5400 RPM Hard Disk
    OSX x86_64

 GigE link between machines




Web Server Deathmatch - Joe Williams - Erlang Factory 2009
The Test

 Used httperf to test performance of serving static files

 Request payload 10k PNG file

 Six total test runs
   Three tests then reboot of server then three more

 Httperf configuration
   Request rates, 1000 to 5000/sec
     Incremented by 1000 each test
   Based on connections and calls
      1000 requests = 100 connections x 10 calls per connection
      2000 requests = 200 connections x 10 calls per connection
        etc ..

Web Server Deathmatch - Joe Williams - Erlang Factory 2009
Environment & Configuration


 Ran many iterations of the test to find optimal configurations for
   each server

 httperf via autobench
     httperf compiled with
       -DFD_SETSIZE=10000
       -D_DARWIN_ULIMITED_SELECT

    autobench is a wrapper script for automating httperf tests


    http://www.xenoclast.org/autobench/
    http://www.hpl.hp.com/research/linux/httperf/




Web Server Deathmatch - Joe Williams - Erlang Factory 2009
Environment & Configuration

                                                             net.core.rmem_default = 524288
 ulimits                                                     net.core.rmem_max = 16777216
                                                             net.core.wmem_default = 524288
     File limits (ulimit -n) were increased on both          net.core.wmem_max = 16777216
                                                             net.core.netdev_max_backlog = 2500
     the client and server
                                                             net.ipv4.tcp_rmem = 4096 87380 16777216
                                                             net.ipv4.tcp_wmem = 4096 65536 16777216
 sysctl.conf                                                 net.ipv4.tcp_max_syn_backlog = 4096
                                                             net.ipv4.tcp_rfc1337 = 1
                                                             net.ipv4.tcp_sack = 1
                                                             net.ipv4.tcp_fack = 1
       kernel.sem = 250 32000 100 128                        net.ipv4.tcp_window_scaling = 1
       kernel.shmall = 2097152                               net.ipv4.tcp_timestamps = 1
       kernel.shmmax = 2147483648                            net.ipv4.tcp_ecn = 0
       kernel.shmmni = 4096                                  net.ipv4.route.flush = 1
                                                             net.ipv4.ip_no_pmtu_disc = 0
        fs.file-max = 65536

        vm.min_free_kbytes = 65536
        vm.swappiness = 5
        vm.vfs_cache_pressure = 50




Web Server Deathmatch - Joe Williams - Erlang Factory 2009
Environment & Configuration


 Apache 2.2.11
   Prefork and Worker
   Compiled with quot;--enable-nonportable-atomics=yesquot;

        Timeout 300
        KeepAlive On
        MaxKeepAliveRequests 100
        KeepAliveTimeout 5
        UseCanonicalName Off
        ServerTokens Full
        ServerSignature On
        HostnameLookups Off
        MaxClients     10000



Web Server Deathmatch - Joe Williams - Erlang Factory 2009
Environment & Configuration


 INETS:HTTP
   Erlang 12B-5 and 13A
   erl +K true +h 1600
      Kernel polling and heap size per process
   Max Clients set to 300
           Increasing beyond this seemed to degrade performance




Web Server Deathmatch - Joe Williams - Erlang Factory 2009
Environment & Configuration


  Lighttpd 1.4.22
         server.max-keep-alive-requests = 16
         server.max-keep-alive-idle = 5
         server.max-read-idle = 60
         server.max-write-idle = 360
         server.event-handler = quot;linux-sysepollquot;
         server.network-backend = quot;linux-sendfilequot;
         server.max-fds = 10000
         server.max-connections = 10000
         server.max-worker = 2




Web Server Deathmatch - Joe Williams - Erlang Factory 2009
Environment & Configuration


 MochiWeb
   Erlang 12B-5 and 13A
   erl +K true +h 1600

 Code Changes
         Added garbage_collect() to cleanup function in mochiweb_request.erl
         Set max=5120 to socket server record in mochiweb_socket_server.erl




Web Server Deathmatch - Joe Williams - Erlang Factory 2009
Environment & Configuration


 Nginx 0.7.43
   worker_processes 2
   worker_connections 5120
   sendfile on
   keepalive_timeout 65




Web Server Deathmatch - Joe Williams - Erlang Factory 2009
Environment & Configuration


 Yaws 1.81
   Erlang 12B-5 and 13A
   erl +S 4 +h 1600
      Four schedulers
      Kernel polling is on by default

      Turning off logging improves performance
         access_log = false

     Sendfile serves small files (<4k) in memory



Web Server Deathmatch - Joe Williams - Erlang Factory 2009
Results
  INETS maxes
    out just over
    3000 replies/s

  MochiWeb
   maxes out
   around 4300
   replies/s




Web Server Deathmatch - Joe Williams - Erlang Factory 2009
Results
 INETS seems to
   be consistent
   albeit slow

 MochiWeb is
  inconsistent at
  5000 replies/s




Web Server Deathmatch - Joe Williams - Erlang Factory 2009
Results
 Similar to the
   other metrics
   INETS and
   MochiWeb
   have issues at
   the 4000 and
   5000 level




Web Server Deathmatch - Joe Williams - Erlang Factory 2009
Results
 Nginx and
   Lighttpd use
   the least CPU

 The Erlang
   servers seem
   to use more




Web Server Deathmatch - Joe Williams - Erlang Factory 2009
Results
 Load was low
   with all servers

 Yaws was the
   highest with
   1.4




Web Server Deathmatch - Joe Williams - Erlang Factory 2009
Results
 Yaws causes a
   high level of
   interrupts and
   context
   switches




Web Server Deathmatch - Joe Williams - Erlang Factory 2009
Results
 MochiWeb and
  INETS had
  very high
  pgfree/s

 Usually the sign
   of creating
   and destroying
   processes




Web Server Deathmatch - Joe Williams - Erlang Factory 2009
Experimental Tests
 MochiWeb
  seems to have
  issues reading
  files from the
  filesystem




Web Server Deathmatch - Joe Williams - Erlang Factory 2009
Results
  MochiWeb and
   INETS
   improve with
   13A




Web Server Deathmatch - Joe Williams - Erlang Factory 2009
Results
  Consistency
    improved with
    13A for
    MochiWeb




Web Server Deathmatch - Joe Williams - Erlang Factory 2009
Results
 Response times
   dropped for
   both INETS
   and MochiWeb




Web Server Deathmatch - Joe Williams - Erlang Factory 2009
Results
 Yaws CPU
   usage
   increases with
   13A

 MochiWeb and
  INETS do well
  with 13A




Web Server Deathmatch - Joe Williams - Erlang Factory 2009
Results
 Decreased
   context
   switches and
   interrupts
   across the
   board with 13A




Web Server Deathmatch - Joe Williams - Erlang Factory 2009
Take Home
 Yaws, Nginx, Lighttpd and Apache all perform well in this test

 Erlang based servers used more CPU than I expected

 Overall 13A helps performance across the board



 Test them out in your environment and work load




Web Server Deathmatch - Joe Williams - Erlang Factory 2009
Take Home
  Apache
    Compile with non-portable atomics
    Make sure max clients is set high enough

  INETS
    Increasing max clients causes more harm than good
    Maxes out around 3500 requests a second

  Lighttpd
    Performs well with low CPU usage
    Epoll, send file, FD's and keep alives are key for performance




Web Server Deathmatch - Joe Williams - Erlang Factory 2009
Take Home
  MochiWeb
   Not built for serving file serving
   Otherwise performs very well
   Setting GC in clean up function and high connection limit help
   performance

  Nginx
    Performed best, fast by default

  Yaws
    Turning off access logs helps greatly




Web Server Deathmatch - Joe Williams - Erlang Factory 2009
Thanks
 Steve Vinoski and Claes Wikstrom with the Yaws project

 Bob Ippolito creator of MochiWeb




Web Server Deathmatch - Joe Williams - Erlang Factory 2009

More Related Content

What's hot

Dynamic Hadoop Clusters
Dynamic Hadoop ClustersDynamic Hadoop Clusters
Dynamic Hadoop ClustersSteve Loughran
 
DNS windows server(2008R2) & linux(SLES 11)
DNS windows server(2008R2) & linux(SLES 11)DNS windows server(2008R2) & linux(SLES 11)
DNS windows server(2008R2) & linux(SLES 11)Tola LENG
 
HipHop VM: overclocking Symfony
HipHop VM: overclocking SymfonyHipHop VM: overclocking Symfony
HipHop VM: overclocking SymfonyVadim Borodavko
 
Configure Proxy and Firewall (Iptables)
Configure Proxy and Firewall (Iptables)Configure Proxy and Firewall (Iptables)
Configure Proxy and Firewall (Iptables)Tola LENG
 
Lamp Server With Drupal Installation
Lamp Server With Drupal InstallationLamp Server With Drupal Installation
Lamp Server With Drupal Installationfranbow
 
Configure Webserver & SSL secure & redirect in SuSE Linux Enterprise
Configure Webserver & SSL secure & redirect in SuSE Linux EnterpriseConfigure Webserver & SSL secure & redirect in SuSE Linux Enterprise
Configure Webserver & SSL secure & redirect in SuSE Linux EnterpriseTola LENG
 
An Express Guide ~ Zabbix for IT Monitoring
An Express Guide ~ Zabbix for IT Monitoring An Express Guide ~ Zabbix for IT Monitoring
An Express Guide ~ Zabbix for IT Monitoring Abhishek Kumar
 
MNPHP Scalable Architecture 101 - Feb 3 2011
MNPHP Scalable Architecture 101 - Feb 3 2011MNPHP Scalable Architecture 101 - Feb 3 2011
MNPHP Scalable Architecture 101 - Feb 3 2011Mike Willbanks
 
Document Management: Opendocman and LAMP installation on Cent OS
Document Management: Opendocman and LAMP installation on Cent OSDocument Management: Opendocman and LAMP installation on Cent OS
Document Management: Opendocman and LAMP installation on Cent OSSiddharth Ram Dinesh
 
Hidden Gems in HTTP
Hidden Gems in HTTPHidden Gems in HTTP
Hidden Gems in HTTPBen Ramsey
 
Keeping DNS server up-and-running with “runit
Keeping DNS server up-and-running with “runitKeeping DNS server up-and-running with “runit
Keeping DNS server up-and-running with “runitMen and Mice
 
Converting Your Dev Environment to a Docker Stack - php[world]
Converting Your Dev Environment to a Docker Stack - php[world]Converting Your Dev Environment to a Docker Stack - php[world]
Converting Your Dev Environment to a Docker Stack - php[world]Dana Luther
 
Fluentd - road to v1 -
Fluentd - road to v1 -Fluentd - road to v1 -
Fluentd - road to v1 -N Masahiro
 
Deeper dive in Docker Overlay Networks
Deeper dive in Docker Overlay NetworksDeeper dive in Docker Overlay Networks
Deeper dive in Docker Overlay NetworksLaurent Bernaille
 
Language Enhancement in ColdFusion 8 - CFUnited 2007
Language Enhancement in ColdFusion 8 - CFUnited 2007Language Enhancement in ColdFusion 8 - CFUnited 2007
Language Enhancement in ColdFusion 8 - CFUnited 2007Rupesh Kumar
 
Site Performance - From Pinto to Ferrari
Site Performance - From Pinto to FerrariSite Performance - From Pinto to Ferrari
Site Performance - From Pinto to FerrariJoseph Scott
 
Ad, dns, dhcp, file server
Ad, dns, dhcp, file serverAd, dns, dhcp, file server
Ad, dns, dhcp, file serverTola LENG
 
Apache httpd 2.4: The Cloud Killer App
Apache httpd 2.4: The Cloud Killer AppApache httpd 2.4: The Cloud Killer App
Apache httpd 2.4: The Cloud Killer AppJim Jagielski
 
PyCon HK 2015 - Monitoring the performance of python web applications
PyCon HK 2015 -  Monitoring the performance of python web applicationsPyCon HK 2015 -  Monitoring the performance of python web applications
PyCon HK 2015 - Monitoring the performance of python web applicationsGraham Dumpleton
 

What's hot (20)

Dynamic Hadoop Clusters
Dynamic Hadoop ClustersDynamic Hadoop Clusters
Dynamic Hadoop Clusters
 
DNS windows server(2008R2) & linux(SLES 11)
DNS windows server(2008R2) & linux(SLES 11)DNS windows server(2008R2) & linux(SLES 11)
DNS windows server(2008R2) & linux(SLES 11)
 
HipHop VM: overclocking Symfony
HipHop VM: overclocking SymfonyHipHop VM: overclocking Symfony
HipHop VM: overclocking Symfony
 
Configure Proxy and Firewall (Iptables)
Configure Proxy and Firewall (Iptables)Configure Proxy and Firewall (Iptables)
Configure Proxy and Firewall (Iptables)
 
Lamp Server With Drupal Installation
Lamp Server With Drupal InstallationLamp Server With Drupal Installation
Lamp Server With Drupal Installation
 
Configure Webserver & SSL secure & redirect in SuSE Linux Enterprise
Configure Webserver & SSL secure & redirect in SuSE Linux EnterpriseConfigure Webserver & SSL secure & redirect in SuSE Linux Enterprise
Configure Webserver & SSL secure & redirect in SuSE Linux Enterprise
 
An Express Guide ~ Zabbix for IT Monitoring
An Express Guide ~ Zabbix for IT Monitoring An Express Guide ~ Zabbix for IT Monitoring
An Express Guide ~ Zabbix for IT Monitoring
 
MNPHP Scalable Architecture 101 - Feb 3 2011
MNPHP Scalable Architecture 101 - Feb 3 2011MNPHP Scalable Architecture 101 - Feb 3 2011
MNPHP Scalable Architecture 101 - Feb 3 2011
 
Document Management: Opendocman and LAMP installation on Cent OS
Document Management: Opendocman and LAMP installation on Cent OSDocument Management: Opendocman and LAMP installation on Cent OS
Document Management: Opendocman and LAMP installation on Cent OS
 
Hidden Gems in HTTP
Hidden Gems in HTTPHidden Gems in HTTP
Hidden Gems in HTTP
 
Keeping DNS server up-and-running with “runit
Keeping DNS server up-and-running with “runitKeeping DNS server up-and-running with “runit
Keeping DNS server up-and-running with “runit
 
Converting Your Dev Environment to a Docker Stack - php[world]
Converting Your Dev Environment to a Docker Stack - php[world]Converting Your Dev Environment to a Docker Stack - php[world]
Converting Your Dev Environment to a Docker Stack - php[world]
 
Fluentd - road to v1 -
Fluentd - road to v1 -Fluentd - road to v1 -
Fluentd - road to v1 -
 
Deeper dive in Docker Overlay Networks
Deeper dive in Docker Overlay NetworksDeeper dive in Docker Overlay Networks
Deeper dive in Docker Overlay Networks
 
From crash to testcase
From crash to testcaseFrom crash to testcase
From crash to testcase
 
Language Enhancement in ColdFusion 8 - CFUnited 2007
Language Enhancement in ColdFusion 8 - CFUnited 2007Language Enhancement in ColdFusion 8 - CFUnited 2007
Language Enhancement in ColdFusion 8 - CFUnited 2007
 
Site Performance - From Pinto to Ferrari
Site Performance - From Pinto to FerrariSite Performance - From Pinto to Ferrari
Site Performance - From Pinto to Ferrari
 
Ad, dns, dhcp, file server
Ad, dns, dhcp, file serverAd, dns, dhcp, file server
Ad, dns, dhcp, file server
 
Apache httpd 2.4: The Cloud Killer App
Apache httpd 2.4: The Cloud Killer AppApache httpd 2.4: The Cloud Killer App
Apache httpd 2.4: The Cloud Killer App
 
PyCon HK 2015 - Monitoring the performance of python web applications
PyCon HK 2015 -  Monitoring the performance of python web applicationsPyCon HK 2015 -  Monitoring the performance of python web applications
PyCon HK 2015 - Monitoring the performance of python web applications
 

Similar to Web Server Deathmatch Showdown

Full Stack Load Testing
Full Stack Load Testing Full Stack Load Testing
Full Stack Load Testing Terral R Jordan
 
Extreme HTTP Performance Tuning: 1.2M API req/s on a 4 vCPU EC2 Instance
Extreme HTTP Performance Tuning: 1.2M API req/s on a 4 vCPU EC2 InstanceExtreme HTTP Performance Tuning: 1.2M API req/s on a 4 vCPU EC2 Instance
Extreme HTTP Performance Tuning: 1.2M API req/s on a 4 vCPU EC2 InstanceScyllaDB
 
Cloud Performance Benchmarking
Cloud Performance BenchmarkingCloud Performance Benchmarking
Cloud Performance BenchmarkingSantanu Dey
 
Linux Kernel vs DPDK: HTTP Performance Showdown
Linux Kernel vs DPDK: HTTP Performance ShowdownLinux Kernel vs DPDK: HTTP Performance Showdown
Linux Kernel vs DPDK: HTTP Performance ShowdownScyllaDB
 
Shak larry-jeder-perf-and-tuning-summit14-part2-final
Shak larry-jeder-perf-and-tuning-summit14-part2-finalShak larry-jeder-perf-and-tuning-summit14-part2-final
Shak larry-jeder-perf-and-tuning-summit14-part2-finalTommy Lee
 
Nginx 0.8.x + php 5.2.13 (fast cgi) setup web server
Nginx 0.8.x + php 5.2.13 (fast cgi) setup web serverNginx 0.8.x + php 5.2.13 (fast cgi) setup web server
Nginx 0.8.x + php 5.2.13 (fast cgi) setup web serverwruben
 
2009-01-28 DOI NBC Red Hat on System z Performance Considerations
2009-01-28 DOI NBC Red Hat on System z Performance Considerations2009-01-28 DOI NBC Red Hat on System z Performance Considerations
2009-01-28 DOI NBC Red Hat on System z Performance ConsiderationsShawn Wells
 
Performance Tuning Oracle Weblogic Server 12c
Performance Tuning Oracle Weblogic Server 12cPerformance Tuning Oracle Weblogic Server 12c
Performance Tuning Oracle Weblogic Server 12cAjith Narayanan
 
在Oel5上安装配置oracle gird control 10.2.0.5
在Oel5上安装配置oracle gird control 10.2.0.5在Oel5上安装配置oracle gird control 10.2.0.5
在Oel5上安装配置oracle gird control 10.2.0.5maclean liu
 
Advanced RAC troubleshooting: Network
Advanced RAC troubleshooting: NetworkAdvanced RAC troubleshooting: Network
Advanced RAC troubleshooting: NetworkRiyaj Shamsudeen
 
Orcl siebel-sun-s282213-oow2006
Orcl siebel-sun-s282213-oow2006Orcl siebel-sun-s282213-oow2006
Orcl siebel-sun-s282213-oow2006Sal Marcus
 
DeltaV Development Systems in a Virtualized Environment
DeltaV Development Systems in a Virtualized EnvironmentDeltaV Development Systems in a Virtualized Environment
DeltaV Development Systems in a Virtualized EnvironmentEmerson Exchange
 
Building an ActionScript Game Server with over 15,000 Concurrent Connections
Building an ActionScript Game Server with over 15,000 Concurrent ConnectionsBuilding an ActionScript Game Server with over 15,000 Concurrent Connections
Building an ActionScript Game Server with over 15,000 Concurrent Connections Renaun Erickson
 
PLNOG16: ZTP – Zero Touch Provisioning in use, Marek Plaza
PLNOG16: ZTP – Zero Touch Provisioning in use, Marek PlazaPLNOG16: ZTP – Zero Touch Provisioning in use, Marek Plaza
PLNOG16: ZTP – Zero Touch Provisioning in use, Marek PlazaPROIDEA
 
FPGA based 10G Performance Tester for HW OpenFlow Switch
FPGA based 10G Performance Tester for HW OpenFlow SwitchFPGA based 10G Performance Tester for HW OpenFlow Switch
FPGA based 10G Performance Tester for HW OpenFlow SwitchYutaka Yasuda
 
AWS re:Invent 2016: Making Every Packet Count (NET404)
AWS re:Invent 2016: Making Every Packet Count (NET404)AWS re:Invent 2016: Making Every Packet Count (NET404)
AWS re:Invent 2016: Making Every Packet Count (NET404)Amazon Web Services
 
(NET404) Making Every Packet Count
(NET404) Making Every Packet Count(NET404) Making Every Packet Count
(NET404) Making Every Packet CountAmazon Web Services
 

Similar to Web Server Deathmatch Showdown (20)

Full Stack Load Testing
Full Stack Load Testing Full Stack Load Testing
Full Stack Load Testing
 
Extreme HTTP Performance Tuning: 1.2M API req/s on a 4 vCPU EC2 Instance
Extreme HTTP Performance Tuning: 1.2M API req/s on a 4 vCPU EC2 InstanceExtreme HTTP Performance Tuning: 1.2M API req/s on a 4 vCPU EC2 Instance
Extreme HTTP Performance Tuning: 1.2M API req/s on a 4 vCPU EC2 Instance
 
Cloud Performance Benchmarking
Cloud Performance BenchmarkingCloud Performance Benchmarking
Cloud Performance Benchmarking
 
Linux Kernel vs DPDK: HTTP Performance Showdown
Linux Kernel vs DPDK: HTTP Performance ShowdownLinux Kernel vs DPDK: HTTP Performance Showdown
Linux Kernel vs DPDK: HTTP Performance Showdown
 
All Change
All ChangeAll Change
All Change
 
Shak larry-jeder-perf-and-tuning-summit14-part2-final
Shak larry-jeder-perf-and-tuning-summit14-part2-finalShak larry-jeder-perf-and-tuning-summit14-part2-final
Shak larry-jeder-perf-and-tuning-summit14-part2-final
 
Database Hardware Benchmarking
Database Hardware BenchmarkingDatabase Hardware Benchmarking
Database Hardware Benchmarking
 
Nginx 0.8.x + php 5.2.13 (fast cgi) setup web server
Nginx 0.8.x + php 5.2.13 (fast cgi) setup web serverNginx 0.8.x + php 5.2.13 (fast cgi) setup web server
Nginx 0.8.x + php 5.2.13 (fast cgi) setup web server
 
2009-01-28 DOI NBC Red Hat on System z Performance Considerations
2009-01-28 DOI NBC Red Hat on System z Performance Considerations2009-01-28 DOI NBC Red Hat on System z Performance Considerations
2009-01-28 DOI NBC Red Hat on System z Performance Considerations
 
Performance Tuning Oracle Weblogic Server 12c
Performance Tuning Oracle Weblogic Server 12cPerformance Tuning Oracle Weblogic Server 12c
Performance Tuning Oracle Weblogic Server 12c
 
在Oel5上安装配置oracle gird control 10.2.0.5
在Oel5上安装配置oracle gird control 10.2.0.5在Oel5上安装配置oracle gird control 10.2.0.5
在Oel5上安装配置oracle gird control 10.2.0.5
 
Advanced RAC troubleshooting: Network
Advanced RAC troubleshooting: NetworkAdvanced RAC troubleshooting: Network
Advanced RAC troubleshooting: Network
 
Orcl siebel-sun-s282213-oow2006
Orcl siebel-sun-s282213-oow2006Orcl siebel-sun-s282213-oow2006
Orcl siebel-sun-s282213-oow2006
 
DeltaV Development Systems in a Virtualized Environment
DeltaV Development Systems in a Virtualized EnvironmentDeltaV Development Systems in a Virtualized Environment
DeltaV Development Systems in a Virtualized Environment
 
Building an ActionScript Game Server with over 15,000 Concurrent Connections
Building an ActionScript Game Server with over 15,000 Concurrent ConnectionsBuilding an ActionScript Game Server with over 15,000 Concurrent Connections
Building an ActionScript Game Server with over 15,000 Concurrent Connections
 
Nginx
NginxNginx
Nginx
 
PLNOG16: ZTP – Zero Touch Provisioning in use, Marek Plaza
PLNOG16: ZTP – Zero Touch Provisioning in use, Marek PlazaPLNOG16: ZTP – Zero Touch Provisioning in use, Marek Plaza
PLNOG16: ZTP – Zero Touch Provisioning in use, Marek Plaza
 
FPGA based 10G Performance Tester for HW OpenFlow Switch
FPGA based 10G Performance Tester for HW OpenFlow SwitchFPGA based 10G Performance Tester for HW OpenFlow Switch
FPGA based 10G Performance Tester for HW OpenFlow Switch
 
AWS re:Invent 2016: Making Every Packet Count (NET404)
AWS re:Invent 2016: Making Every Packet Count (NET404)AWS re:Invent 2016: Making Every Packet Count (NET404)
AWS re:Invent 2016: Making Every Packet Count (NET404)
 
(NET404) Making Every Packet Count
(NET404) Making Every Packet Count(NET404) Making Every Packet Count
(NET404) Making Every Packet Count
 

Recently uploaded

Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
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
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsHyundai Motor Group
 
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
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetEnjoy Anytime
 
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
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Hyundai Motor Group
 

Recently uploaded (20)

Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
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
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
 
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
 
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
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2
 

Web Server Deathmatch Showdown

  • 1. Web Server Deathmatch Joe Williams Cloudant @williamsjoe on Twitter http://www.joeandmotorboat.com/
  • 2. Overview The Contenders The Systems, Test Setup, Environment and Configuration The Results Base Tests Experiements 13A vs 12B-5 Take Home Web Server Deathmatch - Joe Williams - Erlang Factory 2009
  • 3. The Contenders Apache (Prefork) Apache (Worker) Erlang INETS:HTTP Lighttpd MochiWeb Nginx Yaws Web Server Deathmatch - Joe Williams - Erlang Factory 2009
  • 4. The Systems Server Intel Core 2 Duo T7500 2.20GHz 4GB RAM 7200 RPM Hard Disk Ubuntu 8.10 x86_64 httperf Client Intel Core 2 Duo P7350 2.0GHz 2GB RAM 5400 RPM Hard Disk OSX x86_64 GigE link between machines Web Server Deathmatch - Joe Williams - Erlang Factory 2009
  • 5. The Test Used httperf to test performance of serving static files Request payload 10k PNG file Six total test runs Three tests then reboot of server then three more Httperf configuration Request rates, 1000 to 5000/sec Incremented by 1000 each test Based on connections and calls 1000 requests = 100 connections x 10 calls per connection 2000 requests = 200 connections x 10 calls per connection etc .. Web Server Deathmatch - Joe Williams - Erlang Factory 2009
  • 6. Environment & Configuration Ran many iterations of the test to find optimal configurations for each server httperf via autobench httperf compiled with -DFD_SETSIZE=10000 -D_DARWIN_ULIMITED_SELECT autobench is a wrapper script for automating httperf tests http://www.xenoclast.org/autobench/ http://www.hpl.hp.com/research/linux/httperf/ Web Server Deathmatch - Joe Williams - Erlang Factory 2009
  • 7. Environment & Configuration net.core.rmem_default = 524288 ulimits net.core.rmem_max = 16777216 net.core.wmem_default = 524288 File limits (ulimit -n) were increased on both net.core.wmem_max = 16777216 net.core.netdev_max_backlog = 2500 the client and server net.ipv4.tcp_rmem = 4096 87380 16777216 net.ipv4.tcp_wmem = 4096 65536 16777216 sysctl.conf net.ipv4.tcp_max_syn_backlog = 4096 net.ipv4.tcp_rfc1337 = 1 net.ipv4.tcp_sack = 1 net.ipv4.tcp_fack = 1 kernel.sem = 250 32000 100 128 net.ipv4.tcp_window_scaling = 1 kernel.shmall = 2097152 net.ipv4.tcp_timestamps = 1 kernel.shmmax = 2147483648 net.ipv4.tcp_ecn = 0 kernel.shmmni = 4096 net.ipv4.route.flush = 1 net.ipv4.ip_no_pmtu_disc = 0 fs.file-max = 65536 vm.min_free_kbytes = 65536 vm.swappiness = 5 vm.vfs_cache_pressure = 50 Web Server Deathmatch - Joe Williams - Erlang Factory 2009
  • 8. Environment & Configuration Apache 2.2.11 Prefork and Worker Compiled with quot;--enable-nonportable-atomics=yesquot; Timeout 300 KeepAlive On MaxKeepAliveRequests 100 KeepAliveTimeout 5 UseCanonicalName Off ServerTokens Full ServerSignature On HostnameLookups Off MaxClients 10000 Web Server Deathmatch - Joe Williams - Erlang Factory 2009
  • 9. Environment & Configuration INETS:HTTP Erlang 12B-5 and 13A erl +K true +h 1600 Kernel polling and heap size per process Max Clients set to 300 Increasing beyond this seemed to degrade performance Web Server Deathmatch - Joe Williams - Erlang Factory 2009
  • 10. Environment & Configuration Lighttpd 1.4.22 server.max-keep-alive-requests = 16 server.max-keep-alive-idle = 5 server.max-read-idle = 60 server.max-write-idle = 360 server.event-handler = quot;linux-sysepollquot; server.network-backend = quot;linux-sendfilequot; server.max-fds = 10000 server.max-connections = 10000 server.max-worker = 2 Web Server Deathmatch - Joe Williams - Erlang Factory 2009
  • 11. Environment & Configuration MochiWeb Erlang 12B-5 and 13A erl +K true +h 1600 Code Changes Added garbage_collect() to cleanup function in mochiweb_request.erl Set max=5120 to socket server record in mochiweb_socket_server.erl Web Server Deathmatch - Joe Williams - Erlang Factory 2009
  • 12. Environment & Configuration Nginx 0.7.43 worker_processes 2 worker_connections 5120 sendfile on keepalive_timeout 65 Web Server Deathmatch - Joe Williams - Erlang Factory 2009
  • 13. Environment & Configuration Yaws 1.81 Erlang 12B-5 and 13A erl +S 4 +h 1600 Four schedulers Kernel polling is on by default Turning off logging improves performance access_log = false Sendfile serves small files (<4k) in memory Web Server Deathmatch - Joe Williams - Erlang Factory 2009
  • 14. Results INETS maxes out just over 3000 replies/s MochiWeb maxes out around 4300 replies/s Web Server Deathmatch - Joe Williams - Erlang Factory 2009
  • 15. Results INETS seems to be consistent albeit slow MochiWeb is inconsistent at 5000 replies/s Web Server Deathmatch - Joe Williams - Erlang Factory 2009
  • 16. Results Similar to the other metrics INETS and MochiWeb have issues at the 4000 and 5000 level Web Server Deathmatch - Joe Williams - Erlang Factory 2009
  • 17. Results Nginx and Lighttpd use the least CPU The Erlang servers seem to use more Web Server Deathmatch - Joe Williams - Erlang Factory 2009
  • 18. Results Load was low with all servers Yaws was the highest with 1.4 Web Server Deathmatch - Joe Williams - Erlang Factory 2009
  • 19. Results Yaws causes a high level of interrupts and context switches Web Server Deathmatch - Joe Williams - Erlang Factory 2009
  • 20. Results MochiWeb and INETS had very high pgfree/s Usually the sign of creating and destroying processes Web Server Deathmatch - Joe Williams - Erlang Factory 2009
  • 21. Experimental Tests MochiWeb seems to have issues reading files from the filesystem Web Server Deathmatch - Joe Williams - Erlang Factory 2009
  • 22. Results MochiWeb and INETS improve with 13A Web Server Deathmatch - Joe Williams - Erlang Factory 2009
  • 23. Results Consistency improved with 13A for MochiWeb Web Server Deathmatch - Joe Williams - Erlang Factory 2009
  • 24. Results Response times dropped for both INETS and MochiWeb Web Server Deathmatch - Joe Williams - Erlang Factory 2009
  • 25. Results Yaws CPU usage increases with 13A MochiWeb and INETS do well with 13A Web Server Deathmatch - Joe Williams - Erlang Factory 2009
  • 26. Results Decreased context switches and interrupts across the board with 13A Web Server Deathmatch - Joe Williams - Erlang Factory 2009
  • 27. Take Home Yaws, Nginx, Lighttpd and Apache all perform well in this test Erlang based servers used more CPU than I expected Overall 13A helps performance across the board Test them out in your environment and work load Web Server Deathmatch - Joe Williams - Erlang Factory 2009
  • 28. Take Home Apache Compile with non-portable atomics Make sure max clients is set high enough INETS Increasing max clients causes more harm than good Maxes out around 3500 requests a second Lighttpd Performs well with low CPU usage Epoll, send file, FD's and keep alives are key for performance Web Server Deathmatch - Joe Williams - Erlang Factory 2009
  • 29. Take Home MochiWeb Not built for serving file serving Otherwise performs very well Setting GC in clean up function and high connection limit help performance Nginx Performed best, fast by default Yaws Turning off access logs helps greatly Web Server Deathmatch - Joe Williams - Erlang Factory 2009
  • 30. Thanks Steve Vinoski and Claes Wikstrom with the Yaws project Bob Ippolito creator of MochiWeb Web Server Deathmatch - Joe Williams - Erlang Factory 2009