SlideShare a Scribd company logo
You need different
kinds of performance
You need different
kinds of performance
Production
You need different
 kinds of performance
Production


Development
Production
core 1
core 2
core 3
core 4
  …
         time


core


         time
core 1
core 2
core 3
core 4
  …
         time


core


         time
core 1
core 2
core 3          8
core 4
  …
         time


core            5


         time
Great max RPM == high performance?
100 ppl x 60 km/h
Economical and efficient
User cares about performance of HIS request only




                   1 x 300 km/h
…especially in ruby

                                               Time, s
               C GNU gcc                           1.07
               Java 6 -server                      1.55
               Haskell GHC                         2.16
               Scala                               2.22
               Lisp SBCL                           2.67
               C# Mono                             2.95
               OCaml                               3.35
               Clojure                             5.32
               Erlang HiPE                        13.17
               Python 3                           28.07
               Ruby 1.9                          65.14


by http://shootout.alioth.debian.org Computer Language Benchmarks Game  
Garbage collection (GC)



core 1
core 2
core 3
core 4
  …
                                       time
   Actual productive work
Ideally, GC should occur between requests
                  (during idle time)


core 1
core 2
core 3
core 4
  …
                                       time
 what USER cares about
Tweaking GC results in…



            30%–50% better throughput
                     AND
                 response times




http://www.rubyenterpriseedition.com/
documentation.html#_garbage_collector_performance_tuning
http://rpm.newrelic.com
Roundtrip to Moscow 50ms
… Europe +100ms
… US +100ms
In development
In development


You reinitialize Rails stack frequently




You use a single CPU core most of the time
In development


You reinitialize Rails stack frequently
(unless using Spork etc)


You use a single CPU core most of the time
In development


You reinitialize Rails stack frequently
(unless using Spork etc)


You use a single CPU core most of the time
(unless using parallel_specs, hydra etc)
Rails’ own test suite
Rails’ own test suite

~% git clone git://github.com/rails/rails.git
Cloning into rails...

~% cd rails

~/rails[master]% git checkout v3.0.7
Note: checking out 'v3.0.7'.
…
HEAD is now at 2c32601... bumping version for release

~/tmp/rails[tag: v3.0.7]% bundle install
Fetching source index for http://rubygems.org/
…
Your bundle is complete! Use `bundle show [gemname]` to see where a
bundled gem is installed.

~/tmp/rails[tag: v3.0.7]% time bundle exec rake test | tee out.txt 2>&1
MySQL 5.5
        PostgreSQL 9
      SQLite 3.6.16+
         memcached
mysql2 gem 0.2.x (not 0.3.x)
             …
~/rails[tag: v3.0.7]% cat out.txt| grep 'errors'
2294 tests, 9629 assertions, 0 failures, 0 errors
419 tests, 1171 assertions, 0 failures, 0 errors
2981 tests, 12075 assertions, 0 failures, 0 errors
72 tests, 142 assertions, 0 failures, 0 errors
200 tests, 515 assertions, 0 failures, 0 errors
273 tests, 773 assertions, 0 failures, 0 errors
2483 tests, 7646 assertions, 0 failures, 0 errors
2471 tests, 7634 assertions, 0 failures, 0 errors
2443 tests, 7555 assertions, 0 failures, 0 errors
2522 tests, 7865 assertions, 0 failures, 0 errors
28 tests, 33 assertions, 0 failures, 0 errors
6 tests, 15 assertions, 0 failures, 0 errors
7 tests, 14 assertions, 0 failures, 0 errors
1 tests, 0 assertions, 0 failures, 0 errors
1 tests, 1 assertions, 0 failures, 0 errors
10 tests, 12 assertions, 0 failures, 0 errors
6 tests, 7 assertions, 0 failures, 0 errors
13 tests, 18 assertions, 0 failures, 0 errors
5 tests, 9 assertions, 0 failures, 0 errors
1 tests, 2 assertions, 0 failures, 0 errors
3 tests, 6 assertions, 0 failures, 0 errors
21 tests, 22 assertions, 0 failures, 0 errors
4 tests, 28 assertions, 0 failures, 0 errors
5 tests, 7 assertions, 0 failures, 0 errors
4 tests, 4 assertions, 0 failures, 0 errors
13 tests, 18 assertions, 0 failures, 0 errors
5 tests, 5 assertions, 0 failures, 0 errors
3 tests, 3 assertions, 0 failures, 0 errors
1 tests, 1 assertions, 0 failures, 0 errors
4 tests, 4 assertions, 0 failures, 0 errors
37 tests, 69 assertions, 0 failures, 0 errors
35 tests, 305 assertions, 0 failures, 0 errors
                         …
                    (continues)
~/rails[tag: v3.0.7]% cat out2.txt | ruby -ne 'next unless
$_ =~ /^((d+) (tests|assertions|failures|errors)(?:, )?)
{4}$/; $_.split(", ").each { |pair| count, name =
*pair.split(" "); @totals ||= {}; @totals[name] ||= 0;
@totals[name] += count.to_i }; print "r"+@totals.map { |
key, val| "#{key} #{val}"}.join(", "); STDOUT.flush; END
{puts}'
failures 0, tests 16658, errors 0, assertions 56316
## ruby -ne '...'

next unless $_ =~ /^((d+) (tests|assertions|failures|errors)(?:, )?){4}$/
$_.split(", ").each do |pair|
  count, name = *pair.split(" ")
  @totals ||= {}
  @totals[name] ||= 0
  @totals[name] += count.to_i
end
print "r"+@totals.map { |key, val| "#{key} #{val}"}.join(", "); STDOUT.flush;
END {puts}
CC (attribution) photos

bus http://www.flickr.com/photos/futurepastnow/2972823328
ferrari http://www.flickr.com/photos/dontthinkfeel/200793214/
obie http://www.flickr.com/photos/seanosh/2544491971
earth NASA
rope walking http://www.flickr.com/photos/envizion/470658414

More Related Content

What's hot

LCA14: LCA14-412: GPGPU on ARM SoC session
LCA14: LCA14-412: GPGPU on ARM SoC sessionLCA14: LCA14-412: GPGPU on ARM SoC session
LCA14: LCA14-412: GPGPU on ARM SoC session
Linaro
 
Event loop
Event loopEvent loop
Event loop
codepitbull
 
XebiCon'16 : Server-Side Swift. Par Simone Civetta, Développeur iOS chez Xebia
XebiCon'16 : Server-Side Swift. Par Simone Civetta, Développeur iOS chez XebiaXebiCon'16 : Server-Side Swift. Par Simone Civetta, Développeur iOS chez Xebia
XebiCon'16 : Server-Side Swift. Par Simone Civetta, Développeur iOS chez Xebia
Publicis Sapient Engineering
 
Profiling and optimizing go programs
Profiling and optimizing go programsProfiling and optimizing go programs
Profiling and optimizing go programs
Badoo Development
 
Porting and Optimization of Numerical Libraries for ARM SVE
Porting and Optimization of Numerical Libraries for ARM SVEPorting and Optimization of Numerical Libraries for ARM SVE
Porting and Optimization of Numerical Libraries for ARM SVE
Linaro
 
Async java8
Async java8Async java8
Async java8
Murali Pachiyappan
 
Performance is a feature! - Developer South Coast - part 2
Performance is a feature!  - Developer South Coast - part 2Performance is a feature!  - Developer South Coast - part 2
Performance is a feature! - Developer South Coast - part 2
Matt Warren
 
From 'dotnet run' to 'hello world'
From 'dotnet run' to 'hello world'From 'dotnet run' to 'hello world'
From 'dotnet run' to 'hello world'
Matt Warren
 
Puppet Camp Dallas 2014: Replacing Simple Puppet Modules with Providers
Puppet Camp Dallas 2014: Replacing Simple Puppet Modules with Providers Puppet Camp Dallas 2014: Replacing Simple Puppet Modules with Providers
Puppet Camp Dallas 2014: Replacing Simple Puppet Modules with Providers
Puppet
 
Debugging Ruby (with Pry)
Debugging Ruby (with Pry)Debugging Ruby (with Pry)
Debugging Ruby (with Pry)
LukeBergen
 
Node day 2014
Node day 2014Node day 2014
Node day 2014
Trevor Norris
 
Performance Analysis Tools for Linux Kernel
Performance Analysis Tools for Linux KernelPerformance Analysis Tools for Linux Kernel
Performance Analysis Tools for Linux Kernel
lcplcp1
 
RabbitMQ for Perl mongers
RabbitMQ for Perl mongersRabbitMQ for Perl mongers
RabbitMQ for Perl mongers
Lenz Gschwendtner
 
VCLをTDDで書いてデプロイする
VCLをTDDで書いてデプロイするVCLをTDDで書いてデプロイする
VCLをTDDで書いてデプロイする
Kengo HAMASAKI
 
Talk 160920 @ Cat System Workshop
Talk 160920 @ Cat System WorkshopTalk 160920 @ Cat System Workshop
Talk 160920 @ Cat System Workshop
Quey-Liang Kao
 
GroovyServ - Technical Part
GroovyServ - Technical PartGroovyServ - Technical Part
GroovyServ - Technical Part
Yasuharu Nakano
 
Embedded systems
Embedded systems Embedded systems
Embedded systems
Katy Anton
 
Global Interpreter Lock: Episode III - cat < /dev/zero > GIL;
Global Interpreter Lock: Episode III - cat < /dev/zero > GIL;Global Interpreter Lock: Episode III - cat < /dev/zero > GIL;
Global Interpreter Lock: Episode III - cat < /dev/zero > GIL;
Tzung-Bi Shih
 
Trust, but verify | Testing with Docker Containers
Trust, but verify | Testing with Docker ContainersTrust, but verify | Testing with Docker Containers
Trust, but verify | Testing with Docker Containers
Nan Liu
 
Статический анализ кода в контексте SSDL
Статический анализ кода в контексте SSDLСтатический анализ кода в контексте SSDL
Статический анализ кода в контексте SSDL
Positive Hack Days
 

What's hot (20)

LCA14: LCA14-412: GPGPU on ARM SoC session
LCA14: LCA14-412: GPGPU on ARM SoC sessionLCA14: LCA14-412: GPGPU on ARM SoC session
LCA14: LCA14-412: GPGPU on ARM SoC session
 
Event loop
Event loopEvent loop
Event loop
 
XebiCon'16 : Server-Side Swift. Par Simone Civetta, Développeur iOS chez Xebia
XebiCon'16 : Server-Side Swift. Par Simone Civetta, Développeur iOS chez XebiaXebiCon'16 : Server-Side Swift. Par Simone Civetta, Développeur iOS chez Xebia
XebiCon'16 : Server-Side Swift. Par Simone Civetta, Développeur iOS chez Xebia
 
Profiling and optimizing go programs
Profiling and optimizing go programsProfiling and optimizing go programs
Profiling and optimizing go programs
 
Porting and Optimization of Numerical Libraries for ARM SVE
Porting and Optimization of Numerical Libraries for ARM SVEPorting and Optimization of Numerical Libraries for ARM SVE
Porting and Optimization of Numerical Libraries for ARM SVE
 
Async java8
Async java8Async java8
Async java8
 
Performance is a feature! - Developer South Coast - part 2
Performance is a feature!  - Developer South Coast - part 2Performance is a feature!  - Developer South Coast - part 2
Performance is a feature! - Developer South Coast - part 2
 
From 'dotnet run' to 'hello world'
From 'dotnet run' to 'hello world'From 'dotnet run' to 'hello world'
From 'dotnet run' to 'hello world'
 
Puppet Camp Dallas 2014: Replacing Simple Puppet Modules with Providers
Puppet Camp Dallas 2014: Replacing Simple Puppet Modules with Providers Puppet Camp Dallas 2014: Replacing Simple Puppet Modules with Providers
Puppet Camp Dallas 2014: Replacing Simple Puppet Modules with Providers
 
Debugging Ruby (with Pry)
Debugging Ruby (with Pry)Debugging Ruby (with Pry)
Debugging Ruby (with Pry)
 
Node day 2014
Node day 2014Node day 2014
Node day 2014
 
Performance Analysis Tools for Linux Kernel
Performance Analysis Tools for Linux KernelPerformance Analysis Tools for Linux Kernel
Performance Analysis Tools for Linux Kernel
 
RabbitMQ for Perl mongers
RabbitMQ for Perl mongersRabbitMQ for Perl mongers
RabbitMQ for Perl mongers
 
VCLをTDDで書いてデプロイする
VCLをTDDで書いてデプロイするVCLをTDDで書いてデプロイする
VCLをTDDで書いてデプロイする
 
Talk 160920 @ Cat System Workshop
Talk 160920 @ Cat System WorkshopTalk 160920 @ Cat System Workshop
Talk 160920 @ Cat System Workshop
 
GroovyServ - Technical Part
GroovyServ - Technical PartGroovyServ - Technical Part
GroovyServ - Technical Part
 
Embedded systems
Embedded systems Embedded systems
Embedded systems
 
Global Interpreter Lock: Episode III - cat < /dev/zero > GIL;
Global Interpreter Lock: Episode III - cat < /dev/zero > GIL;Global Interpreter Lock: Episode III - cat < /dev/zero > GIL;
Global Interpreter Lock: Episode III - cat < /dev/zero > GIL;
 
Trust, but verify | Testing with Docker Containers
Trust, but verify | Testing with Docker ContainersTrust, but verify | Testing with Docker Containers
Trust, but verify | Testing with Docker Containers
 
Статический анализ кода в контексте SSDL
Статический анализ кода в контексте SSDLСтатический анализ кода в контексте SSDL
Статический анализ кода в контексте SSDL
 

Viewers also liked

大上帝慈悲 冬季大典
大上帝慈悲   冬季大典大上帝慈悲   冬季大典
大上帝慈悲 冬季大典guest646f18
 
藥用植物2月23日(1)
藥用植物2月23日(1)藥用植物2月23日(1)
藥用植物2月23日(1)guest646f18
 
玉米田的奇蹟 R2
玉米田的奇蹟 R2玉米田的奇蹟 R2
玉米田的奇蹟 R2guest646f18
 
神奇的鹹檸檬
神奇的鹹檸檬神奇的鹹檸檬
神奇的鹹檸檬guest646f18
 
Study: The Future of VR, AR and Self-Driving Cars
Study: The Future of VR, AR and Self-Driving CarsStudy: The Future of VR, AR and Self-Driving Cars
Study: The Future of VR, AR and Self-Driving Cars
LinkedIn
 
Hype vs. Reality: The AI Explainer
Hype vs. Reality: The AI ExplainerHype vs. Reality: The AI Explainer
Hype vs. Reality: The AI Explainer
Luminary Labs
 

Viewers also liked (8)

小和尚
小和尚小和尚
小和尚
 
大上帝慈悲 冬季大典
大上帝慈悲   冬季大典大上帝慈悲   冬季大典
大上帝慈悲 冬季大典
 
小和尚
小和尚小和尚
小和尚
 
藥用植物2月23日(1)
藥用植物2月23日(1)藥用植物2月23日(1)
藥用植物2月23日(1)
 
玉米田的奇蹟 R2
玉米田的奇蹟 R2玉米田的奇蹟 R2
玉米田的奇蹟 R2
 
神奇的鹹檸檬
神奇的鹹檸檬神奇的鹹檸檬
神奇的鹹檸檬
 
Study: The Future of VR, AR and Self-Driving Cars
Study: The Future of VR, AR and Self-Driving CarsStudy: The Future of VR, AR and Self-Driving Cars
Study: The Future of VR, AR and Self-Driving Cars
 
Hype vs. Reality: The AI Explainer
Hype vs. Reality: The AI ExplainerHype vs. Reality: The AI Explainer
Hype vs. Reality: The AI Explainer
 

Similar to Rails Hardware (no conclusions!)

Rails Performance
Rails PerformanceRails Performance
Rails Performance
Wen-Tien Chang
 
JRuby 9000 - Taipei Ruby User's Group 2015
JRuby 9000 - Taipei Ruby User's Group 2015JRuby 9000 - Taipei Ruby User's Group 2015
JRuby 9000 - Taipei Ruby User's Group 2015
Charles Nutter
 
The details of CI/CD environment for Ruby
The details of CI/CD environment for RubyThe details of CI/CD environment for Ruby
The details of CI/CD environment for Ruby
Hiroshi SHIBATA
 
Parallelism in a NumPy-based program
Parallelism in a NumPy-based programParallelism in a NumPy-based program
Parallelism in a NumPy-based program
Ralf Gommers
 
Infrastructureascode slideshare-160331143725
Infrastructureascode slideshare-160331143725Infrastructureascode slideshare-160331143725
Infrastructureascode slideshare-160331143725
miguel dominguez
 
Infrastructureascode slideshare-160331143725
Infrastructureascode slideshare-160331143725Infrastructureascode slideshare-160331143725
Infrastructureascode slideshare-160331143725
MortazaJohari
 
Infrastructure as code: running microservices on AWS using Docker, Terraform,...
Infrastructure as code: running microservices on AWS using Docker, Terraform,...Infrastructure as code: running microservices on AWS using Docker, Terraform,...
Infrastructure as code: running microservices on AWS using Docker, Terraform,...
Yevgeniy Brikman
 
Code quality par Simone Civetta
Code quality par Simone CivettaCode quality par Simone Civetta
Code quality par Simone Civetta
CocoaHeads France
 
Ansible for Configuration Management for Lohika DevOps training 2018 @ Lohika...
Ansible for Configuration Management for Lohika DevOps training 2018 @ Lohika...Ansible for Configuration Management for Lohika DevOps training 2018 @ Lohika...
Ansible for Configuration Management for Lohika DevOps training 2018 @ Lohika...
Ihor Banadiga
 
Performance Optimization of Rails Applications
Performance Optimization of Rails ApplicationsPerformance Optimization of Rails Applications
Performance Optimization of Rails Applications
Serge Smetana
 
Packaging perl (LPW2010)
Packaging perl (LPW2010)Packaging perl (LPW2010)
Packaging perl (LPW2010)
p3castro
 
Run Node Run
Run Node RunRun Node Run
Run Node Run
Kevin Swiber
 
Upgrading to Rails 3
Upgrading to Rails 3Upgrading to Rails 3
Upgrading to Rails 3
juliangiuca
 
これからのPerlプロダクトのかたち(YAPC::Asia 2013)
これからのPerlプロダクトのかたち(YAPC::Asia 2013)これからのPerlプロダクトのかたち(YAPC::Asia 2013)
これからのPerlプロダクトのかたち(YAPC::Asia 2013)
goccy
 
What to expect from Java 9
What to expect from Java 9What to expect from Java 9
What to expect from Java 9
Ivan Krylov
 
2015-GopherCon-Talk-Uptime.pdf
2015-GopherCon-Talk-Uptime.pdf2015-GopherCon-Talk-Uptime.pdf
2015-GopherCon-Talk-Uptime.pdf
UtabeUtabe
 
introduction-infra-as-a-code using terraform
introduction-infra-as-a-code using terraformintroduction-infra-as-a-code using terraform
introduction-infra-as-a-code using terraform
niyof97
 
Kettunen, miaubiz fuzzing at scale and in style
Kettunen, miaubiz   fuzzing at scale and in styleKettunen, miaubiz   fuzzing at scale and in style
Kettunen, miaubiz fuzzing at scale and in style
DefconRussia
 
Speedy TDD with Rails
Speedy TDD with RailsSpeedy TDD with Rails
Speedy TDD with Rails
PatchSpace Ltd
 
May2010 hex-core-opt
May2010 hex-core-optMay2010 hex-core-opt
May2010 hex-core-opt
Jeff Larkin
 

Similar to Rails Hardware (no conclusions!) (20)

Rails Performance
Rails PerformanceRails Performance
Rails Performance
 
JRuby 9000 - Taipei Ruby User's Group 2015
JRuby 9000 - Taipei Ruby User's Group 2015JRuby 9000 - Taipei Ruby User's Group 2015
JRuby 9000 - Taipei Ruby User's Group 2015
 
The details of CI/CD environment for Ruby
The details of CI/CD environment for RubyThe details of CI/CD environment for Ruby
The details of CI/CD environment for Ruby
 
Parallelism in a NumPy-based program
Parallelism in a NumPy-based programParallelism in a NumPy-based program
Parallelism in a NumPy-based program
 
Infrastructureascode slideshare-160331143725
Infrastructureascode slideshare-160331143725Infrastructureascode slideshare-160331143725
Infrastructureascode slideshare-160331143725
 
Infrastructureascode slideshare-160331143725
Infrastructureascode slideshare-160331143725Infrastructureascode slideshare-160331143725
Infrastructureascode slideshare-160331143725
 
Infrastructure as code: running microservices on AWS using Docker, Terraform,...
Infrastructure as code: running microservices on AWS using Docker, Terraform,...Infrastructure as code: running microservices on AWS using Docker, Terraform,...
Infrastructure as code: running microservices on AWS using Docker, Terraform,...
 
Code quality par Simone Civetta
Code quality par Simone CivettaCode quality par Simone Civetta
Code quality par Simone Civetta
 
Ansible for Configuration Management for Lohika DevOps training 2018 @ Lohika...
Ansible for Configuration Management for Lohika DevOps training 2018 @ Lohika...Ansible for Configuration Management for Lohika DevOps training 2018 @ Lohika...
Ansible for Configuration Management for Lohika DevOps training 2018 @ Lohika...
 
Performance Optimization of Rails Applications
Performance Optimization of Rails ApplicationsPerformance Optimization of Rails Applications
Performance Optimization of Rails Applications
 
Packaging perl (LPW2010)
Packaging perl (LPW2010)Packaging perl (LPW2010)
Packaging perl (LPW2010)
 
Run Node Run
Run Node RunRun Node Run
Run Node Run
 
Upgrading to Rails 3
Upgrading to Rails 3Upgrading to Rails 3
Upgrading to Rails 3
 
これからのPerlプロダクトのかたち(YAPC::Asia 2013)
これからのPerlプロダクトのかたち(YAPC::Asia 2013)これからのPerlプロダクトのかたち(YAPC::Asia 2013)
これからのPerlプロダクトのかたち(YAPC::Asia 2013)
 
What to expect from Java 9
What to expect from Java 9What to expect from Java 9
What to expect from Java 9
 
2015-GopherCon-Talk-Uptime.pdf
2015-GopherCon-Talk-Uptime.pdf2015-GopherCon-Talk-Uptime.pdf
2015-GopherCon-Talk-Uptime.pdf
 
introduction-infra-as-a-code using terraform
introduction-infra-as-a-code using terraformintroduction-infra-as-a-code using terraform
introduction-infra-as-a-code using terraform
 
Kettunen, miaubiz fuzzing at scale and in style
Kettunen, miaubiz   fuzzing at scale and in styleKettunen, miaubiz   fuzzing at scale and in style
Kettunen, miaubiz fuzzing at scale and in style
 
Speedy TDD with Rails
Speedy TDD with RailsSpeedy TDD with Rails
Speedy TDD with Rails
 
May2010 hex-core-opt
May2010 hex-core-optMay2010 hex-core-opt
May2010 hex-core-opt
 

Recently uploaded

20 Comprehensive Checklist of Designing and Developing a Website
20 Comprehensive Checklist of Designing and Developing a Website20 Comprehensive Checklist of Designing and Developing a Website
20 Comprehensive Checklist of Designing and Developing a Website
Pixlogix Infotech
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
Edge AI and Vision Alliance
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
Data structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdfData structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdf
TIPNGVN2
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
Kumud Singh
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
DianaGray10
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
Neo4j
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
Octavian Nadolu
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
Neo4j
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
danishmna97
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
shyamraj55
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
Large Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial ApplicationsLarge Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial Applications
Rohit Gautam
 

Recently uploaded (20)

20 Comprehensive Checklist of Designing and Developing a Website
20 Comprehensive Checklist of Designing and Developing a Website20 Comprehensive Checklist of Designing and Developing a Website
20 Comprehensive Checklist of Designing and Developing a Website
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
Data structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdfData structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdf
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
Large Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial ApplicationsLarge Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial Applications
 

Rails Hardware (no conclusions!)

  • 1. You need different kinds of performance
  • 2. You need different kinds of performance Production
  • 3. You need different kinds of performance Production Development
  • 5. core 1 core 2 core 3 core 4 … time core time
  • 6. core 1 core 2 core 3 core 4 … time core time
  • 7. core 1 core 2 core 3 8 core 4 … time core 5 time
  • 8. Great max RPM == high performance?
  • 9. 100 ppl x 60 km/h Economical and efficient
  • 10. User cares about performance of HIS request only 1 x 300 km/h
  • 11. …especially in ruby Time, s C GNU gcc 1.07 Java 6 -server 1.55 Haskell GHC 2.16 Scala 2.22 Lisp SBCL 2.67 C# Mono 2.95 OCaml 3.35 Clojure 5.32 Erlang HiPE 13.17 Python 3 28.07 Ruby 1.9 65.14 by http://shootout.alioth.debian.org Computer Language Benchmarks Game  
  • 12. Garbage collection (GC) core 1 core 2 core 3 core 4 … time Actual productive work
  • 13. Ideally, GC should occur between requests (during idle time) core 1 core 2 core 3 core 4 … time what USER cares about
  • 14. Tweaking GC results in… 30%–50% better throughput AND response times http://www.rubyenterpriseedition.com/ documentation.html#_garbage_collector_performance_tuning
  • 16.
  • 17. Roundtrip to Moscow 50ms … Europe +100ms … US +100ms
  • 19. In development You reinitialize Rails stack frequently You use a single CPU core most of the time
  • 20. In development You reinitialize Rails stack frequently (unless using Spork etc) You use a single CPU core most of the time
  • 21. In development You reinitialize Rails stack frequently (unless using Spork etc) You use a single CPU core most of the time (unless using parallel_specs, hydra etc)
  • 23. Rails’ own test suite ~% git clone git://github.com/rails/rails.git Cloning into rails... ~% cd rails ~/rails[master]% git checkout v3.0.7 Note: checking out 'v3.0.7'. … HEAD is now at 2c32601... bumping version for release ~/tmp/rails[tag: v3.0.7]% bundle install Fetching source index for http://rubygems.org/ … Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed. ~/tmp/rails[tag: v3.0.7]% time bundle exec rake test | tee out.txt 2>&1
  • 24. MySQL 5.5 PostgreSQL 9 SQLite 3.6.16+ memcached mysql2 gem 0.2.x (not 0.3.x) …
  • 25. ~/rails[tag: v3.0.7]% cat out.txt| grep 'errors' 2294 tests, 9629 assertions, 0 failures, 0 errors 419 tests, 1171 assertions, 0 failures, 0 errors 2981 tests, 12075 assertions, 0 failures, 0 errors 72 tests, 142 assertions, 0 failures, 0 errors 200 tests, 515 assertions, 0 failures, 0 errors 273 tests, 773 assertions, 0 failures, 0 errors 2483 tests, 7646 assertions, 0 failures, 0 errors 2471 tests, 7634 assertions, 0 failures, 0 errors 2443 tests, 7555 assertions, 0 failures, 0 errors 2522 tests, 7865 assertions, 0 failures, 0 errors 28 tests, 33 assertions, 0 failures, 0 errors 6 tests, 15 assertions, 0 failures, 0 errors 7 tests, 14 assertions, 0 failures, 0 errors 1 tests, 0 assertions, 0 failures, 0 errors 1 tests, 1 assertions, 0 failures, 0 errors 10 tests, 12 assertions, 0 failures, 0 errors 6 tests, 7 assertions, 0 failures, 0 errors 13 tests, 18 assertions, 0 failures, 0 errors 5 tests, 9 assertions, 0 failures, 0 errors 1 tests, 2 assertions, 0 failures, 0 errors 3 tests, 6 assertions, 0 failures, 0 errors 21 tests, 22 assertions, 0 failures, 0 errors 4 tests, 28 assertions, 0 failures, 0 errors 5 tests, 7 assertions, 0 failures, 0 errors 4 tests, 4 assertions, 0 failures, 0 errors 13 tests, 18 assertions, 0 failures, 0 errors 5 tests, 5 assertions, 0 failures, 0 errors 3 tests, 3 assertions, 0 failures, 0 errors 1 tests, 1 assertions, 0 failures, 0 errors 4 tests, 4 assertions, 0 failures, 0 errors 37 tests, 69 assertions, 0 failures, 0 errors 35 tests, 305 assertions, 0 failures, 0 errors … (continues)
  • 26. ~/rails[tag: v3.0.7]% cat out2.txt | ruby -ne 'next unless $_ =~ /^((d+) (tests|assertions|failures|errors)(?:, )?) {4}$/; $_.split(", ").each { |pair| count, name = *pair.split(" "); @totals ||= {}; @totals[name] ||= 0; @totals[name] += count.to_i }; print "r"+@totals.map { | key, val| "#{key} #{val}"}.join(", "); STDOUT.flush; END {puts}' failures 0, tests 16658, errors 0, assertions 56316
  • 27. ## ruby -ne '...' next unless $_ =~ /^((d+) (tests|assertions|failures|errors)(?:, )?){4}$/ $_.split(", ").each do |pair| count, name = *pair.split(" ") @totals ||= {} @totals[name] ||= 0 @totals[name] += count.to_i end print "r"+@totals.map { |key, val| "#{key} #{val}"}.join(", "); STDOUT.flush; END {puts}
  • 28.
  • 29.
  • 30. CC (attribution) photos bus http://www.flickr.com/photos/futurepastnow/2972823328 ferrari http://www.flickr.com/photos/dontthinkfeel/200793214/ obie http://www.flickr.com/photos/seanosh/2544491971 earth NASA rope walking http://www.flickr.com/photos/envizion/470658414

Editor's Notes

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. simplest of all, but it does not tell the whole story\n
  9. This is where cloud infrastructure may seem inferior.\n
  10. \n
  11. you should benchmark representative code to be relevant, not calculating Pi\n
  12. \n
  13. (and less frequently too)\n
  14. What’s the word on tweaking GC in ruby 1.9?\n
  15. free + lots of promo codes\nyou want to track queueing time as well \nUse REE to get GC info\nOutlier requests analysis is not so useful, to me it always happens during the times of I/O shortage, not CPU shortage\nAn opportunity to create a more focused service\nRecall cloud hosting\n\nIn real application, there may be no single point responsible for the slowdown\n"Death by a thousand cuts" is the toughest one to combat\nExcept we can jump to the latests CPUs\nTurbo boost, eh? Perhaps underutilized Xeons are the way to go to get the absolute max\nA particular problem with Rails 3 where middleware is slightly slower, activerecord is slightly slower, who knows what else slightly slower\nThis is what the adoption rate slow\nView helpers are slow when there are many of them\nSerialization is slow\nHappens when loading structured data from memcached\nLoad strings?\n
  16. \n
  17. Why Basecamp feels sluggish\nWhy Rails 3 is adopted slowly\nWhy streaming in Rails 3.1 may change the game\n
  18. \n
  19. Chances are, you will be loading a single core\nYou need fastest startup time - running rake tasks, tests, generators, console, restarting the server\nThe way rubygems are written, every 'require' inspects LOADPATH\nRuby 1.9.2 is not that good for fast startups\n
  20. \n
  21. \n
  22. \n
  23. \n
  24. \n
  25. \n
  26. \n
  27. \n
  28. \n
  29. \n
  30. \n