SlideShare una empresa de Scribd logo
1 de 30
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

Más contenido relacionado

La actualidad más candente

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 sessionLinaro
 
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 XebiaPublicis Sapient Engineering
 
Profiling and optimizing go programs
Profiling and optimizing go programsProfiling and optimizing go programs
Profiling and optimizing go programsBadoo 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 SVELinaro
 
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 2Matt 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
 
Performance Analysis Tools for Linux Kernel
Performance Analysis Tools for Linux KernelPerformance Analysis Tools for Linux Kernel
Performance Analysis Tools for Linux Kernellcplcp1
 
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 WorkshopQuey-Liang Kao
 
GroovyServ - Technical Part
GroovyServ - Technical PartGroovyServ - Technical Part
GroovyServ - Technical PartYasuharu 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 ContainersNan Liu
 
Статический анализ кода в контексте SSDL
Статический анализ кода в контексте SSDLСтатический анализ кода в контексте SSDL
Статический анализ кода в контексте SSDLPositive Hack Days
 

La actualidad más candente (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
 

Destacado

大上帝慈悲 冬季大典
大上帝慈悲   冬季大典大上帝慈悲   冬季大典
大上帝慈悲 冬季大典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 CarsLinkedIn
 
Hype vs. Reality: The AI Explainer
Hype vs. Reality: The AI ExplainerHype vs. Reality: The AI Explainer
Hype vs. Reality: The AI ExplainerLuminary Labs
 

Destacado (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 a Rails Hardware (no conclusions!)

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 2015Charles 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 RubyHiroshi SHIBATA
 
Parallelism in a NumPy-based program
Parallelism in a NumPy-based programParallelism in a NumPy-based program
Parallelism in a NumPy-based programRalf Gommers
 
Infrastructureascode slideshare-160331143725
Infrastructureascode slideshare-160331143725Infrastructureascode slideshare-160331143725
Infrastructureascode slideshare-160331143725miguel dominguez
 
Infrastructureascode slideshare-160331143725
Infrastructureascode slideshare-160331143725Infrastructureascode slideshare-160331143725
Infrastructureascode slideshare-160331143725MortazaJohari
 
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 CivettaCocoaHeads 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 ApplicationsSerge Smetana
 
Packaging perl (LPW2010)
Packaging perl (LPW2010)Packaging perl (LPW2010)
Packaging perl (LPW2010)p3castro
 
Upgrading to Rails 3
Upgrading to Rails 3Upgrading to Rails 3
Upgrading to Rails 3juliangiuca
 
これからの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 9Ivan Krylov
 
2015-GopherCon-Talk-Uptime.pdf
2015-GopherCon-Talk-Uptime.pdf2015-GopherCon-Talk-Uptime.pdf
2015-GopherCon-Talk-Uptime.pdfUtabeUtabe
 
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 terraformniyof97
 
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 styleDefconRussia
 
May2010 hex-core-opt
May2010 hex-core-optMay2010 hex-core-opt
May2010 hex-core-optJeff Larkin
 

Similar a 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
 

Último

Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 

Último (20)

Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 

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

Notas del editor

  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