SlideShare una empresa de Scribd logo
1 de 34
Descargar para leer sin conexión
When Efficiency Matters
                                                                            for
                                                                    Drupal

       Scott Mattoon
       Sun Microsystems, Inc.
       http://blogs.sun.com/downstream
       http://twitter.com/smattoon

                                                                                                   1
             Bay Area Drupal Camp 2009 San Francisco | When Efficiency Matters - Drupal at Scale


Monday, June 8, 2009
Agenda




                                                                                                   2
             Bay Area Drupal Camp 2009 San Francisco | When Efficiency Matters - Drupal at Scale


Monday, June 8, 2009
NetBeans for Drupal




             Bay Area Drupal Camp 2009 San Francisco | When Efficiency Matters - Drupal at Scale


Monday, June 8, 2009
NetBeans for Drupal

                 PHP Plugin http://wiki.netbeans.org/PHP
                    Run and Debug project action – break points, watches
                    Run single file, Debug single file, Run in command line
                    Wizard for creating new php and phtml files
                    Editing - Syntactic and Semantic coloring
                    Code Completion
                    File system code completion for include/require
                    Bracket Matching
                    Automatic Insertions (brackets, braces, parens, quotes)
                    Code Navigation - Go to Declaration/Type, Hyperlinking
                    Refactoring - Instant Rename

               Drupal Module and Theme Wizard http://is.gd/lgnB
                    generates required files
                    provides template code



             Bay Area Drupal Camp 2009 San Francisco | When Efficiency Matters - Drupal at Scale


Monday, June 8, 2009
Bay Area Drupal Camp 2009 San Francisco | When Efficiency Matters - Drupal at Scale


Monday, June 8, 2009
VirtualBox for Drupal




             Bay Area Drupal Camp 2009 San Francisco | When Efficiency Matters - Drupal at Scale


Monday, June 8, 2009
Top 10 Reasons for Running Virtual Box

           10 - You want to impress your friends.
           9 - Your wife has told you one more computer in the house
           and she's gone.
           8 - Windows 3.1 is your favorite operating system.
           7 - You want to make sure you have deleted all traces of
           what you have done.
           6 - You want to give root to your baby sister.
           5 - You want to try writing a kernel module while drunk.
           4 - You want to install that cracked version of Photo Shop.
           3 - You've always wondered what deleting /bin would do.
           2 - You really REALLY want to click on that email attachment.
           1 - You like running that older version of Internet Explorer.

             Bay Area Drupal Camp 2009 San Francisco | When Efficiency Matters - Drupal at Scale


Monday, June 8, 2009
Bay Area Drupal Camp 2009 San Francisco | When Efficiency Matters - Drupal at Scale


Monday, June 8, 2009
OpenSolaris for Drupal




                                                                                                   9
             Bay Area Drupal Camp 2009 San Francisco | When Efficiency Matters - Drupal at Scale


Monday, June 8, 2009
Glassfish WebStack
        OpenSolaris AMP +++

         Apache                                        2.2.11                            Python                 2.6.1
         lighttpd                                      1.4.21                            memcached            1.2.5
         Squid                                         2.7.6                             Apache Tomcat        6.0.18
         MySQL                                          5.10                             Glassfish Enterprise      2.1
         PHP                                           5.2.9                             Web Stack Manager         1.5
         Ruby                                          1.8.7
         nginx                                         0.6.35                            webstack-dev-tools        0.1




             Bay Area Drupal Camp 2009 San Francisco | When Efficiency Matters - Drupal at Scale


Monday, June 8, 2009
Solaris – Linux Performance




             Bay Area Drupal Camp 2009 San Francisco | When Efficiency Matters - Drupal at Scale


Monday, June 8, 2009
Solaris – Linux Performance
        THROUGHPUT
        Lightweight & Complex Workloads




             Bay Area Drupal Camp 2009 San Francisco | When Efficiency Matters - Drupal at Scale


Monday, June 8, 2009
Solaris – Linux Performance
        THROUGHPUT zoom in
        Complex Workloads




             Bay Area Drupal Camp 2009 San Francisco | When Efficiency Matters - Drupal at Scale


Monday, June 8, 2009
The S in SAMP stands for Solaris
        Solaris Zones
           ★   Free, lightweight and easy virtualization
           ★   Allocate a “system” to each app instance or to each developer
           ★   Resources are controlled in one of three ways
                             • Capped Resources: Upper limit on consumption
                             • Guaranteed Resources: Guarantee of a minimum available
                             • Dedicated Resources: Resources are set aside for
           ★   share filesystems and network across zones
                             OR
           ★   dedicate filesystems and network to individual zones


                                                                                                   14
             Bay Area Drupal Camp 2009 San Francisco | When Efficiency Matters - Drupal at Scale


Monday, June 8, 2009
Need Efficiency & Control?
       Hypothetical Constraints & Objectives

          Constraints:
              one server available
              need to host four environments:
                     (2) Developers
                     (1) Test environment
                     (1) Production environment
          Objectives:
              maximize sharing, minimize redundancy
              guarantee max. resources for production
              maximize efficiency & consistency btw. envs.
                                                                                                    15
              Bay Area Drupal Camp 2009 San Francisco | When Efficiency Matters - Drupal at Scale


Monday, June 8, 2009
Solaris Zones for Efficiency & Control
       globalzone                              zoneA                     zoneB                ...   qazone    prodzone

                                                  Apache                    Apache                   Apache


                                                    PHP                       PHP                     PHP




                                                         dbzone1                                               Apache


                                                                                                                PHP




                                                               MySQL                                            MySQL




             Bay Area Drupal Camp 2009 San Francisco | When Efficiency Matters - Drupal at Scale


Monday, June 8, 2009
Solaris Zones for Efficiency & Control
       globalzone                              zoneA                     zoneB                ...   qazone      prodzone
       /usr/                                   -ro                      -ro                                  /usr’
              ./apache                        -ro
              ./mysql                         -ro
              ./php                           -rw
       /data/drupal-6.12                      -rw                       -ro                         -ro      /data/drupal-5.10
              ./misc                                                   -ro                          -ro
              ./modules                                                -ro                          -ro
              ./scripts                                                 -ro                         -ro
              ./sites                                                   -rw                         -ro
              ./themes                                                 -ro                          -ro
              ./files                                                  -ro                          -rw

             Bay Area Drupal Camp 2009 San Francisco | When Efficiency Matters - Drupal at Scale


Monday, June 8, 2009
Find Hampster Wheels with DTrace
        DTrace provider for PHP

        “DTrace is one of those tools that makes you
        wonder how you did anything without it before
        you'd heard of it.

        Why is it better than strace and similar tools? It's
        non-invasive, fast, scriptable and extensible.”
                                           - Wez Furlong



             Bay Area Drupal Camp 2009 San Francisco | When Efficiency Matters - Drupal at Scale


Monday, June 8, 2009
Performance Tuning - DEMO
        DTrace provider for PHP
        Which functions are being called by Drupal?
        # dtrace -n function-entry'{printf(quot;called %s() in %s at 
         line %dnquot;,copyinstr(arg0), copyinstr(arg1), arg2)}' -q

        How many times is a function called?
        # dtrace -n function-entry'{@[copyinstr(arg0)] = count()}'

        What's the file name and line number count:
        # dtrace -n function-entry'{@[copyinstr(arg1)] = 
          lquantize(arg2, 0, 5000)}'




             Bay Area Drupal Camp 2009 San Francisco | When Efficiency Matters - Drupal at Scale


Monday, June 8, 2009
Security

           RBAC
             − Assign users to roles with privileges they need
           Process Rights Management
             − Run with least privileges
             − E.g., not root, nosuid, noexec




                                                                                                   20
             Bay Area Drupal Camp 2009 San Francisco | When Efficiency Matters - Drupal at Scale


Monday, June 8, 2009
Versioning & Protecting Data
        ZFS snapshots & Rollback

         $ zfs snapshot /data/site@31Oct

         $ zfs snapshot /data/site@01Nov

           - - - DEPLOY -> SMOKE-TEST -> UH-OH! - - -

         $ cp .zfs/snapshot/@01Nov/Drupal_5.2/themes/mysite 
         ./Drupal_5.2/themes




             Bay Area Drupal Camp 2009 San Francisco | When Efficiency Matters - Drupal at Scale


Monday, June 8, 2009
Project Caroline
        Cloud Computing - Platform as a Service
                                                                                                   Internet
          Resource Types                                        Your
                                                            Service Code




                                                         Launch service using
                                                         multiple load-balanced
                                              +          processes, connected
                                                        to a backend database.

                                                            Flex processes to
                                                             match demand.                                    ●●●




             Bay Area Drupal Camp 2009 San Francisco | When Efficiency Matters - Drupal at Scale


Monday, June 8, 2009
Drupal and Java
        PHP apps on Glassfish

              Two Options:
                  Quercus http://caucho.com/products/quercus.xtp
                  LRWP on Glassfish http://is.gd/mhxP
              Gives you:
                  Database connection pooling
                  JIT Compiler
                  Makes possible clustering with Terracotta
                  Access to vast Java class library



              Bay Area Drupal Camp 2009 San Francisco | When Efficiency Matters - Drupal at Scale


Monday, June 8, 2009
Cool Drupal Site
                                              on Solaris



                                                                                                   24
             Bay Area Drupal Camp 2009 San Francisco | When Efficiency Matters - Drupal at Scale


Monday, June 8, 2009
Bay Area Drupal Camp 2009 San Francisco | When Efficiency Matters - Drupal at Scale


Monday, June 8, 2009
• 7 Creative Commons Licenses
  • Drupal 5.10 + >12 new modules
  • X64 tuned Webstack
  • Solaris 10
  • (2) SunFire X2200 M2 servers
  • (1) 6TB SunStorage 3511
  • Hosted at AMD datacenter

                                                                                                   26
             Bay Area Drupal Camp 2009 San Francisco | When Efficiency Matters - Drupal at Scale


Monday, June 8, 2009
Bay Area Drupal Camp 2009 San Francisco | When Efficiency Matters - Drupal at Scale


Monday, June 8, 2009
Bay Area Drupal Camp 2009 San Francisco | When Efficiency Matters - Drupal at Scale


Monday, June 8, 2009
For More Information
        Get OpenSolaris
                −    http://opensolaris.org/os/downloads/
        ZFS
                −    http://opensolaris.org/os/community/zfs/
                −    http://tinyurl.com/235vxe
        RBAC
                −    http://blogs.sun.com/darren/tags/rbac
        Project Caroline
                −    https://www.projectcaroline.net/
        VBox – Free Virtualization software
                −    http://www.virtualbox.org/

             Bay Area Drupal Camp 2009 San Francisco | When Efficiency Matters - Drupal at Scale


Monday, June 8, 2009
For More Information
      NetBeans
              −   http://www.netbeans.org/
      VBox – Free Virtualization software
              −   http://www.virtualbox.org/
      Project Caroline
              −   https://www.projectcaroline.net/
      Glassfish
              −   http://glassfish.java.net/
          Running MySQL in Solaris Zones
              −   http://wikis.sun.com/display/BluePrints/Running+MySQL+Database+in+Solaris+Containers%20



             Bay Area Drupal Camp 2009 San Francisco | When Efficiency Matters - Drupal at Scale


Monday, June 8, 2009
For More Information
        Get OpenSolaris
                −    http://opensolaris.org/os/downloads/
        ZFS
                −    http://opensolaris.org/os/community/zfs/
                −    http://tinyurl.com/235vxe
        SMF & Security
                −    http://www.opensolaris.org/os/community/smf/
                −    http://www.sun.com/software/solaris/howtoguides/s10securityhowto.jsp
        DTrace
                −    http://blogs.sun.com/bmc/entry/dtrace_and_php_demonstrated
                −    http://blogs.sun.com/angelo/entry/dtrace_meet_the_amp_apache
        RBAC
                −    http://blogs.sun.com/darren/tags/rbac

             Bay Area Drupal Camp 2009 San Francisco | When Efficiency Matters - Drupal at Scale


Monday, June 8, 2009
Q&A



     Scott Mattoon
     http://blogs.sun.com/downstream
     twitter: smattoon

             Bay Area Drupal Camp 2009 San Francisco | When Efficiency Matters - Drupal at Scale


Monday, June 8, 2009
Resource Management & Isolation
         Projects and Zone resource configuration

     Projects
     #   projadd -c quot;Apache-PHPquot; -U webservd httpd.php
     #   projmod -sK quot;project.max-sem-ids=(privileged,256,deny)quot; httpd.php
     #   svccfg -s http:CSKapache2 setprop start/project = astring: httpd.php
     #   svcadm -v enable CSKapache2

     CPU Shares
     global# zonecfg -z zone1
     zonecfg:zone1> add rctl
     zonecfg:zone1:rctl> set name=zone.cpu-shares
     zonecfg:zone1:rctl> add value (priv=privileged,limit=15,action=none)
     zonecfg:zone1:rctl> end
     zonecfg:zone1> exit




             Bay Area Drupal Camp 2009 San Francisco | When Efficiency Matters - Drupal at Scale


Monday, June 8, 2009
The S in SAMP stands for Solaris
        SMF for MySQL & Apache
      MySQL
            # svcadm -v enable mysql

            # svcadm refresh mysql
            # svcadm restart mysql
            # svcadm disable mysql

      Apache
            # svcadm -v enable apache22

            # svcadm refresh mysql
            # svcadm restart mysql
            # svcadm disable mysql




             Bay Area Drupal Camp 2009 San Francisco | When Efficiency Matters - Drupal at Scale


Monday, June 8, 2009

Más contenido relacionado

Similar a Bay Area Drupal Camp Efficiency

Philly Spring UG Roo Overview
Philly Spring UG Roo OverviewPhilly Spring UG Roo Overview
Philly Spring UG Roo Overviewkrimple
 
Doctrine 2: Enterprise Persistence Layer for PHP
Doctrine 2: Enterprise Persistence Layer for PHPDoctrine 2: Enterprise Persistence Layer for PHP
Doctrine 2: Enterprise Persistence Layer for PHPJonathan Wage
 
Hw09 Whats New From Cloudera
Hw09   Whats New From ClouderaHw09   Whats New From Cloudera
Hw09 Whats New From ClouderaCloudera, Inc.
 
Where The Cloud Things Are
Where The Cloud Things AreWhere The Cloud Things Are
Where The Cloud Things AreShunsaku Kudo
 
Drupal CDN integration: easier, more flexible and faster!
Drupal CDN integration: easier, more flexible and faster!Drupal CDN integration: easier, more flexible and faster!
Drupal CDN integration: easier, more flexible and faster!Wim Leers
 
Java and Container - Make it Awesome !
Java and Container - Make it Awesome !Java and Container - Make it Awesome !
Java and Container - Make it Awesome !Dinakar Guniguntala
 
Doing More With Less: The Economics of Open Source Database Adoption
Doing More With Less: The Economics of Open Source Database AdoptionDoing More With Less: The Economics of Open Source Database Adoption
Doing More With Less: The Economics of Open Source Database AdoptionEDB
 
Hw09 Map Reduce Over Tahoe A Least Authority Encrypted Distributed Filesy...
Hw09   Map Reduce Over Tahoe   A Least Authority Encrypted Distributed Filesy...Hw09   Map Reduce Over Tahoe   A Least Authority Encrypted Distributed Filesy...
Hw09 Map Reduce Over Tahoe A Least Authority Encrypted Distributed Filesy...Cloudera, Inc.
 
Accelerate Your Rails Site with Automatic Generation-Based Action Caching
Accelerate Your Rails Site with Automatic Generation-Based Action CachingAccelerate Your Rails Site with Automatic Generation-Based Action Caching
Accelerate Your Rails Site with Automatic Generation-Based Action Cachingelliando dias
 
Cloud Foundry the Open PaaS - OpenTour Austin Keynote
Cloud Foundry the Open PaaS - OpenTour Austin KeynoteCloud Foundry the Open PaaS - OpenTour Austin Keynote
Cloud Foundry the Open PaaS - OpenTour Austin KeynotePatrick Chanezon
 
Cloud Foundry and Ubuntu - 2012
Cloud Foundry and Ubuntu - 2012Cloud Foundry and Ubuntu - 2012
Cloud Foundry and Ubuntu - 2012Patrick Chanezon
 
Lessons I Learned While Scaling to 5000 Puppet Agents
Lessons I Learned While Scaling to 5000 Puppet AgentsLessons I Learned While Scaling to 5000 Puppet Agents
Lessons I Learned While Scaling to 5000 Puppet AgentsPuppet
 
Open Source WCM and Standards
Open Source WCM and StandardsOpen Source WCM and Standards
Open Source WCM and Standardssggottlieb
 
The Maven2 Revolution
The Maven2 RevolutionThe Maven2 Revolution
The Maven2 Revolutionelliando dias
 
Aloha on-rails-2009
Aloha on-rails-2009Aloha on-rails-2009
Aloha on-rails-2009John Woodell
 

Similar a Bay Area Drupal Camp Efficiency (20)

Philly Spring UG Roo Overview
Philly Spring UG Roo OverviewPhilly Spring UG Roo Overview
Philly Spring UG Roo Overview
 
Doctrine 2: Enterprise Persistence Layer for PHP
Doctrine 2: Enterprise Persistence Layer for PHPDoctrine 2: Enterprise Persistence Layer for PHP
Doctrine 2: Enterprise Persistence Layer for PHP
 
Hw09 Whats New From Cloudera
Hw09   Whats New From ClouderaHw09   Whats New From Cloudera
Hw09 Whats New From Cloudera
 
JavaFX Uni Parthenope
JavaFX Uni ParthenopeJavaFX Uni Parthenope
JavaFX Uni Parthenope
 
Where The Cloud Things Are
Where The Cloud Things AreWhere The Cloud Things Are
Where The Cloud Things Are
 
Drupal CDN integration: easier, more flexible and faster!
Drupal CDN integration: easier, more flexible and faster!Drupal CDN integration: easier, more flexible and faster!
Drupal CDN integration: easier, more flexible and faster!
 
Rubypalooza 2009
Rubypalooza 2009Rubypalooza 2009
Rubypalooza 2009
 
php_mysql_tutorial
php_mysql_tutorialphp_mysql_tutorial
php_mysql_tutorial
 
php_mysql_tutorial
php_mysql_tutorialphp_mysql_tutorial
php_mysql_tutorial
 
Java and Container - Make it Awesome !
Java and Container - Make it Awesome !Java and Container - Make it Awesome !
Java and Container - Make it Awesome !
 
DTrace and Drupal
DTrace and DrupalDTrace and Drupal
DTrace and Drupal
 
Doing More With Less: The Economics of Open Source Database Adoption
Doing More With Less: The Economics of Open Source Database AdoptionDoing More With Less: The Economics of Open Source Database Adoption
Doing More With Less: The Economics of Open Source Database Adoption
 
Hw09 Map Reduce Over Tahoe A Least Authority Encrypted Distributed Filesy...
Hw09   Map Reduce Over Tahoe   A Least Authority Encrypted Distributed Filesy...Hw09   Map Reduce Over Tahoe   A Least Authority Encrypted Distributed Filesy...
Hw09 Map Reduce Over Tahoe A Least Authority Encrypted Distributed Filesy...
 
Accelerate Your Rails Site with Automatic Generation-Based Action Caching
Accelerate Your Rails Site with Automatic Generation-Based Action CachingAccelerate Your Rails Site with Automatic Generation-Based Action Caching
Accelerate Your Rails Site with Automatic Generation-Based Action Caching
 
Cloud Foundry the Open PaaS - OpenTour Austin Keynote
Cloud Foundry the Open PaaS - OpenTour Austin KeynoteCloud Foundry the Open PaaS - OpenTour Austin Keynote
Cloud Foundry the Open PaaS - OpenTour Austin Keynote
 
Cloud Foundry and Ubuntu - 2012
Cloud Foundry and Ubuntu - 2012Cloud Foundry and Ubuntu - 2012
Cloud Foundry and Ubuntu - 2012
 
Lessons I Learned While Scaling to 5000 Puppet Agents
Lessons I Learned While Scaling to 5000 Puppet AgentsLessons I Learned While Scaling to 5000 Puppet Agents
Lessons I Learned While Scaling to 5000 Puppet Agents
 
Open Source WCM and Standards
Open Source WCM and StandardsOpen Source WCM and Standards
Open Source WCM and Standards
 
The Maven2 Revolution
The Maven2 RevolutionThe Maven2 Revolution
The Maven2 Revolution
 
Aloha on-rails-2009
Aloha on-rails-2009Aloha on-rails-2009
Aloha on-rails-2009
 

Más de smattoon

openarchitecturenetwork.org at Open Everything
openarchitecturenetwork.org at Open Everythingopenarchitecturenetwork.org at Open Everything
openarchitecturenetwork.org at Open Everythingsmattoon
 
Drupal Efficiency using open source technologies from Sun
Drupal Efficiency using open source technologies from SunDrupal Efficiency using open source technologies from Sun
Drupal Efficiency using open source technologies from Sunsmattoon
 
Drupal Efficiency - Coding, Deployment, Scaling
Drupal Efficiency - Coding, Deployment, ScalingDrupal Efficiency - Coding, Deployment, Scaling
Drupal Efficiency - Coding, Deployment, Scalingsmattoon
 
Why Sun for Drupal?
Why Sun for Drupal?Why Sun for Drupal?
Why Sun for Drupal?smattoon
 
Drupal Deployment on Solaris - DrupalCamp Bay Area 2007 - Mattoon
Drupal Deployment on Solaris - DrupalCamp Bay Area 2007 - MattoonDrupal Deployment on Solaris - DrupalCamp Bay Area 2007 - Mattoon
Drupal Deployment on Solaris - DrupalCamp Bay Area 2007 - Mattoonsmattoon
 
Green Makes Green V2
Green Makes Green V2Green Makes Green V2
Green Makes Green V2smattoon
 
Drupalcon2007 Sun
Drupalcon2007 SunDrupalcon2007 Sun
Drupalcon2007 Sunsmattoon
 

Más de smattoon (7)

openarchitecturenetwork.org at Open Everything
openarchitecturenetwork.org at Open Everythingopenarchitecturenetwork.org at Open Everything
openarchitecturenetwork.org at Open Everything
 
Drupal Efficiency using open source technologies from Sun
Drupal Efficiency using open source technologies from SunDrupal Efficiency using open source technologies from Sun
Drupal Efficiency using open source technologies from Sun
 
Drupal Efficiency - Coding, Deployment, Scaling
Drupal Efficiency - Coding, Deployment, ScalingDrupal Efficiency - Coding, Deployment, Scaling
Drupal Efficiency - Coding, Deployment, Scaling
 
Why Sun for Drupal?
Why Sun for Drupal?Why Sun for Drupal?
Why Sun for Drupal?
 
Drupal Deployment on Solaris - DrupalCamp Bay Area 2007 - Mattoon
Drupal Deployment on Solaris - DrupalCamp Bay Area 2007 - MattoonDrupal Deployment on Solaris - DrupalCamp Bay Area 2007 - Mattoon
Drupal Deployment on Solaris - DrupalCamp Bay Area 2007 - Mattoon
 
Green Makes Green V2
Green Makes Green V2Green Makes Green V2
Green Makes Green V2
 
Drupalcon2007 Sun
Drupalcon2007 SunDrupalcon2007 Sun
Drupalcon2007 Sun
 

Último

Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusZilliz
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbuapidays
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfOverkill Security
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 

Último (20)

Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 

Bay Area Drupal Camp Efficiency

  • 1. When Efficiency Matters for Drupal Scott Mattoon Sun Microsystems, Inc. http://blogs.sun.com/downstream http://twitter.com/smattoon 1 Bay Area Drupal Camp 2009 San Francisco | When Efficiency Matters - Drupal at Scale Monday, June 8, 2009
  • 2. Agenda 2 Bay Area Drupal Camp 2009 San Francisco | When Efficiency Matters - Drupal at Scale Monday, June 8, 2009
  • 3. NetBeans for Drupal Bay Area Drupal Camp 2009 San Francisco | When Efficiency Matters - Drupal at Scale Monday, June 8, 2009
  • 4. NetBeans for Drupal  PHP Plugin http://wiki.netbeans.org/PHP  Run and Debug project action – break points, watches  Run single file, Debug single file, Run in command line  Wizard for creating new php and phtml files  Editing - Syntactic and Semantic coloring  Code Completion  File system code completion for include/require  Bracket Matching  Automatic Insertions (brackets, braces, parens, quotes)  Code Navigation - Go to Declaration/Type, Hyperlinking  Refactoring - Instant Rename  Drupal Module and Theme Wizard http://is.gd/lgnB  generates required files  provides template code Bay Area Drupal Camp 2009 San Francisco | When Efficiency Matters - Drupal at Scale Monday, June 8, 2009
  • 5. Bay Area Drupal Camp 2009 San Francisco | When Efficiency Matters - Drupal at Scale Monday, June 8, 2009
  • 6. VirtualBox for Drupal Bay Area Drupal Camp 2009 San Francisco | When Efficiency Matters - Drupal at Scale Monday, June 8, 2009
  • 7. Top 10 Reasons for Running Virtual Box 10 - You want to impress your friends. 9 - Your wife has told you one more computer in the house and she's gone. 8 - Windows 3.1 is your favorite operating system. 7 - You want to make sure you have deleted all traces of what you have done. 6 - You want to give root to your baby sister. 5 - You want to try writing a kernel module while drunk. 4 - You want to install that cracked version of Photo Shop. 3 - You've always wondered what deleting /bin would do. 2 - You really REALLY want to click on that email attachment. 1 - You like running that older version of Internet Explorer. Bay Area Drupal Camp 2009 San Francisco | When Efficiency Matters - Drupal at Scale Monday, June 8, 2009
  • 8. Bay Area Drupal Camp 2009 San Francisco | When Efficiency Matters - Drupal at Scale Monday, June 8, 2009
  • 9. OpenSolaris for Drupal 9 Bay Area Drupal Camp 2009 San Francisco | When Efficiency Matters - Drupal at Scale Monday, June 8, 2009
  • 10. Glassfish WebStack OpenSolaris AMP +++ Apache 2.2.11 Python 2.6.1 lighttpd 1.4.21 memcached 1.2.5 Squid 2.7.6 Apache Tomcat 6.0.18 MySQL 5.10 Glassfish Enterprise 2.1 PHP 5.2.9 Web Stack Manager 1.5 Ruby 1.8.7 nginx 0.6.35 webstack-dev-tools 0.1 Bay Area Drupal Camp 2009 San Francisco | When Efficiency Matters - Drupal at Scale Monday, June 8, 2009
  • 11. Solaris – Linux Performance Bay Area Drupal Camp 2009 San Francisco | When Efficiency Matters - Drupal at Scale Monday, June 8, 2009
  • 12. Solaris – Linux Performance THROUGHPUT Lightweight & Complex Workloads Bay Area Drupal Camp 2009 San Francisco | When Efficiency Matters - Drupal at Scale Monday, June 8, 2009
  • 13. Solaris – Linux Performance THROUGHPUT zoom in Complex Workloads Bay Area Drupal Camp 2009 San Francisco | When Efficiency Matters - Drupal at Scale Monday, June 8, 2009
  • 14. The S in SAMP stands for Solaris Solaris Zones ★ Free, lightweight and easy virtualization ★ Allocate a “system” to each app instance or to each developer ★ Resources are controlled in one of three ways • Capped Resources: Upper limit on consumption • Guaranteed Resources: Guarantee of a minimum available • Dedicated Resources: Resources are set aside for ★ share filesystems and network across zones OR ★ dedicate filesystems and network to individual zones 14 Bay Area Drupal Camp 2009 San Francisco | When Efficiency Matters - Drupal at Scale Monday, June 8, 2009
  • 15. Need Efficiency & Control? Hypothetical Constraints & Objectives Constraints:  one server available  need to host four environments:  (2) Developers  (1) Test environment  (1) Production environment Objectives:  maximize sharing, minimize redundancy  guarantee max. resources for production  maximize efficiency & consistency btw. envs. 15 Bay Area Drupal Camp 2009 San Francisco | When Efficiency Matters - Drupal at Scale Monday, June 8, 2009
  • 16. Solaris Zones for Efficiency & Control globalzone zoneA zoneB ... qazone prodzone Apache Apache Apache PHP PHP PHP dbzone1 Apache PHP MySQL MySQL Bay Area Drupal Camp 2009 San Francisco | When Efficiency Matters - Drupal at Scale Monday, June 8, 2009
  • 17. Solaris Zones for Efficiency & Control globalzone zoneA zoneB ... qazone prodzone /usr/ -ro -ro /usr’ ./apache -ro ./mysql -ro ./php -rw /data/drupal-6.12 -rw -ro -ro /data/drupal-5.10 ./misc -ro -ro ./modules -ro -ro ./scripts -ro -ro ./sites -rw -ro ./themes -ro -ro ./files -ro -rw Bay Area Drupal Camp 2009 San Francisco | When Efficiency Matters - Drupal at Scale Monday, June 8, 2009
  • 18. Find Hampster Wheels with DTrace DTrace provider for PHP “DTrace is one of those tools that makes you wonder how you did anything without it before you'd heard of it. Why is it better than strace and similar tools? It's non-invasive, fast, scriptable and extensible.” - Wez Furlong Bay Area Drupal Camp 2009 San Francisco | When Efficiency Matters - Drupal at Scale Monday, June 8, 2009
  • 19. Performance Tuning - DEMO DTrace provider for PHP Which functions are being called by Drupal? # dtrace -n function-entry'{printf(quot;called %s() in %s at line %dnquot;,copyinstr(arg0), copyinstr(arg1), arg2)}' -q How many times is a function called? # dtrace -n function-entry'{@[copyinstr(arg0)] = count()}' What's the file name and line number count: # dtrace -n function-entry'{@[copyinstr(arg1)] = lquantize(arg2, 0, 5000)}' Bay Area Drupal Camp 2009 San Francisco | When Efficiency Matters - Drupal at Scale Monday, June 8, 2009
  • 20. Security  RBAC − Assign users to roles with privileges they need  Process Rights Management − Run with least privileges − E.g., not root, nosuid, noexec 20 Bay Area Drupal Camp 2009 San Francisco | When Efficiency Matters - Drupal at Scale Monday, June 8, 2009
  • 21. Versioning & Protecting Data ZFS snapshots & Rollback $ zfs snapshot /data/site@31Oct $ zfs snapshot /data/site@01Nov - - - DEPLOY -> SMOKE-TEST -> UH-OH! - - - $ cp .zfs/snapshot/@01Nov/Drupal_5.2/themes/mysite ./Drupal_5.2/themes Bay Area Drupal Camp 2009 San Francisco | When Efficiency Matters - Drupal at Scale Monday, June 8, 2009
  • 22. Project Caroline Cloud Computing - Platform as a Service Internet Resource Types Your Service Code Launch service using multiple load-balanced + processes, connected to a backend database. Flex processes to match demand. ●●● Bay Area Drupal Camp 2009 San Francisco | When Efficiency Matters - Drupal at Scale Monday, June 8, 2009
  • 23. Drupal and Java PHP apps on Glassfish  Two Options:  Quercus http://caucho.com/products/quercus.xtp  LRWP on Glassfish http://is.gd/mhxP  Gives you:  Database connection pooling  JIT Compiler  Makes possible clustering with Terracotta  Access to vast Java class library Bay Area Drupal Camp 2009 San Francisco | When Efficiency Matters - Drupal at Scale Monday, June 8, 2009
  • 24. Cool Drupal Site on Solaris 24 Bay Area Drupal Camp 2009 San Francisco | When Efficiency Matters - Drupal at Scale Monday, June 8, 2009
  • 25. Bay Area Drupal Camp 2009 San Francisco | When Efficiency Matters - Drupal at Scale Monday, June 8, 2009
  • 26. • 7 Creative Commons Licenses • Drupal 5.10 + >12 new modules • X64 tuned Webstack • Solaris 10 • (2) SunFire X2200 M2 servers • (1) 6TB SunStorage 3511 • Hosted at AMD datacenter 26 Bay Area Drupal Camp 2009 San Francisco | When Efficiency Matters - Drupal at Scale Monday, June 8, 2009
  • 27. Bay Area Drupal Camp 2009 San Francisco | When Efficiency Matters - Drupal at Scale Monday, June 8, 2009
  • 28. Bay Area Drupal Camp 2009 San Francisco | When Efficiency Matters - Drupal at Scale Monday, June 8, 2009
  • 29. For More Information Get OpenSolaris − http://opensolaris.org/os/downloads/ ZFS − http://opensolaris.org/os/community/zfs/ − http://tinyurl.com/235vxe RBAC − http://blogs.sun.com/darren/tags/rbac Project Caroline − https://www.projectcaroline.net/ VBox – Free Virtualization software − http://www.virtualbox.org/ Bay Area Drupal Camp 2009 San Francisco | When Efficiency Matters - Drupal at Scale Monday, June 8, 2009
  • 30. For More Information NetBeans − http://www.netbeans.org/ VBox – Free Virtualization software − http://www.virtualbox.org/ Project Caroline − https://www.projectcaroline.net/ Glassfish − http://glassfish.java.net/ Running MySQL in Solaris Zones − http://wikis.sun.com/display/BluePrints/Running+MySQL+Database+in+Solaris+Containers%20 Bay Area Drupal Camp 2009 San Francisco | When Efficiency Matters - Drupal at Scale Monday, June 8, 2009
  • 31. For More Information Get OpenSolaris − http://opensolaris.org/os/downloads/ ZFS − http://opensolaris.org/os/community/zfs/ − http://tinyurl.com/235vxe SMF & Security − http://www.opensolaris.org/os/community/smf/ − http://www.sun.com/software/solaris/howtoguides/s10securityhowto.jsp DTrace − http://blogs.sun.com/bmc/entry/dtrace_and_php_demonstrated − http://blogs.sun.com/angelo/entry/dtrace_meet_the_amp_apache RBAC − http://blogs.sun.com/darren/tags/rbac Bay Area Drupal Camp 2009 San Francisco | When Efficiency Matters - Drupal at Scale Monday, June 8, 2009
  • 32. Q&A Scott Mattoon http://blogs.sun.com/downstream twitter: smattoon Bay Area Drupal Camp 2009 San Francisco | When Efficiency Matters - Drupal at Scale Monday, June 8, 2009
  • 33. Resource Management & Isolation Projects and Zone resource configuration Projects # projadd -c quot;Apache-PHPquot; -U webservd httpd.php # projmod -sK quot;project.max-sem-ids=(privileged,256,deny)quot; httpd.php # svccfg -s http:CSKapache2 setprop start/project = astring: httpd.php # svcadm -v enable CSKapache2 CPU Shares global# zonecfg -z zone1 zonecfg:zone1> add rctl zonecfg:zone1:rctl> set name=zone.cpu-shares zonecfg:zone1:rctl> add value (priv=privileged,limit=15,action=none) zonecfg:zone1:rctl> end zonecfg:zone1> exit Bay Area Drupal Camp 2009 San Francisco | When Efficiency Matters - Drupal at Scale Monday, June 8, 2009
  • 34. The S in SAMP stands for Solaris SMF for MySQL & Apache MySQL # svcadm -v enable mysql # svcadm refresh mysql # svcadm restart mysql # svcadm disable mysql Apache # svcadm -v enable apache22 # svcadm refresh mysql # svcadm restart mysql # svcadm disable mysql Bay Area Drupal Camp 2009 San Francisco | When Efficiency Matters - Drupal at Scale Monday, June 8, 2009