python 및 머신러닝 교육, 슬로우캠퍼스


G-WAN 

      C로 구현된 고속 서버. API를 제공하고 freeware이지만 open source는 아님.  

      TrustLeap 이라는 회사에서 개발.    

epoll, futex  을 이용하여 구현함.

홈페이지: http://gwan.com/about


G-WAN is a Web server with scripts (asm, C, C++, C#, D, Go, Java, Javascript, Lua, Objective-C, Perl, PHP, Python, Ruby and Scala) and a Key-Value store 


EON 

      G-WAN기반 PaaS 플랫폼 http://www.engineon.com/

      http://www.myexpospace.com/oracle2012/SessionFiles/CON8407_PDF_8407_0002.pdf


NXWEB

     C로 구현된 가볍고 빠른 서버. 오픈 소스.  홈페이지: https://bitbucket.org/yarosla/nxweb/

     G-WAN보다 성능이 좋다고 주장하고 있음 --  벤치마크 https://bitbucket.org/yarosla/nxweb/wiki/Benchmarks

Ultra-fast and super-lightweight web server for applications written in  C.



 G-WAN vs nginx

     http://www.wikivs.com/wiki/G-WAN_vs_Nginx


Comparing G-WAN to Nginx, Lighttpd, Varnish and Apache Traffic Server (ATS)

http://gwan.com/benchmark

실험조건 :100-byte static file, 6-Core CPU by 6 server workers (processes for Nginx/Lighty, threads for G-WAN),
부하:  6 weighttp threads
결과: G-WAN  749,574 requests  (Nginx 207,558 Lighty 215,614 and Varnish 126,047).



Apache Traffic Server (Yahoo!) vs G-WAN vs Lighttpd vs Nginx vs Varnish (Facebook)




Comparing  node.js,  Apache(+php)

스펙: dual-core Intel T4200 2 GHZ machine with 4 GB RAM

부하: ab -r -n 1000000 -c 20000 <url>

Total requests: 1,000,000; concurrency level: 20,000

CPU Usage: node.js vs Apache/PHP in ApacheBench test - 1M requests, 20k concurrent requests




Comparing  node.js,  Tomcat, Scala, Jetty, ...

http://blog.evanweaver.com/2012/02/29/hello-heroku-world/

JVM parameters were -Xmx384m -Xss512k -XX:+UseCompressedOops -server -d64.

EC2 m1.large in us-east-1a, running the default 64-bit Amazon Linux AMI

httperf process could successfully generate up to 25,000 rps





Comparing  node.js,  Tomcat, RestExpress

https://github.com/RestExpress/RestExpress/wiki/Echo-Benchmark-Results





Comparing  Erlang-based Misultin, node.js,  and Tornado

http://www.ostinelli.net/a-comparison-between-misultin-mochiweb-cowboy-nodejs-and-tornadoweb/


2011년 5월 실험. Erlang기반 솔루션이 가장 뛰어나며, node.js가 tornado보다 뛰어나다.



부하: httpperf 

httperf --timeout=5 --client=0/1 --server= --port=8080 --uri=/?value=benchmarks --rate= --send-buffer=4096
        --recv-buffer=16384 --num-conns=5000 --num-calls=10

스펙:  Ubuntu 10.04 LTS with 2 CPU and 1.5GB of RAM,

Kernel/TCP parameter 세팅

# Maximum TCP Receive Window
net.core.rmem_max = 33554432
# Maximum TCP Send Window
net.core.wmem_max = 33554432
# others
net.ipv4.tcp_rmem = 4096 16384 33554432
net.ipv4.tcp_wmem = 4096 16384 33554432
net.ipv4.tcp_syncookies = 1
# this gives the kernel more memory for tcp which you need with many (100k+) open socket connections
net.ipv4.tcp_mem = 786432 1048576 26777216
net.ipv4.tcp_max_tw_buckets = 360000
net.core.netdev_max_backlog = 2500
vm.min_free_kbytes = 65536
vm.swappiness = 0
net.ipv4.ip_local_port_range = 1024 65535
net.core.somaxconn = 65535






대용량서버 솔류션  http://en.wikipedia.org/wiki/C10k_problem

  • nginx, which relies on an event-driven (asynchronous) architecture, instead of threads, to handle requests (WordPress.com uses[2] nginx to solve the C10K problem)[3]
  • Lighttpd, which relies on an asynchronous architecture to handle requests[4]
  • Cherokee, a lightweight web server[5]
  • Tornado, a non-blocking web server and web application framework[6] written in Python (used by Facebook's FriendFeed)
  • Apache AWF (retired, formerly Apache Deft), asynchronous, non-blocking web server running on the JVM
  • JBoss Netty, a NIO client server framework which enables quick and easy development of network applications such as protocol servers and clients[7]
  • Node.js, asynchronous, non-blocking web server running on Google's V8 JavaScript engine[8]
  • EventMachine, an asynchronous, non-blocking web server running on Ruby EventMachine
  • Yaws, a web server written in Erlang; profiting from Erlang's extremely lightweight processes.
  • Cowboy, an other, very lightweight, web server written in Erlang[9]
  • asyncore (in the standard Python library), a non-blocking web server library. It is based on Medusa, which is no longer maintained.
  • IIS, Microsoft's flagship web server, through the use of asynchronous requests, as demonstrated by third-party components such as WebSync
  • Jetty asynchronous Java servlet container
  • Xitrum, an async and clustered Scala web framework and HTTP(S) server based on Netty

  • Web Server 성능 부하 테스트 도구

    • ab
    • weighttp
    • funkload
    • jmeter
    • httpress - https://bitbucket.org/yarosla/httpress/
    • grinder - java기반의 load test framework. 여러 서버에서 동시에 부하를 생성할 수 있다. http://grinder.sourceforge.net/
    • nGrinder - NHN에서 ginder를 개량한 것. 라인(LINE) 성능테스트를 위해 1억 사용자를 시뮬레이션 한다고 함. http://www.nhnopensource.org/ngrinder/
    • HTTPerf

    weighttp (pronounced weighty) is a lightweight and small benchmarking tool for webservers.
    It was designed to be very fast and easy to use and only supports a tiny fraction of the HTTP protocol in order to be lean and simple.
    weighttp supports multithreading to make good use of modern CPUs with multiple cores as well as asynchronous i/o
    for concurrent requests within a single thread.
    For event handling, weighty relies on libev which fits the design perfectly, being lightweight and fast itself.
    Thanks to that, weighty supports all modern high-performance event interfaces like epoll or kqueue, that the major OSs provide.

    $ git clone git://git.lighttpd.net/weighttp


    WRITTEN BY
    manager@
    Data Analysis, Text/Knowledge Mining, Python, Cloud Computing, Platform

    ,