Transcript
Page 1: OpenSolaris Web Stack MySQL BOF

1

OpenSolaris Web Stack Where MySQL Meets the Next Generation OS.

MySQL 2009 Conference & ExpoBirds of A Feather Session

Murthy Chintalapati (CVR)Jyri VirkkiSriram Natarajan, Brian Overstreet

Page 2: OpenSolaris Web Stack MySQL BOF

2

Agenda

1) Introducing the OpenSolaris Web Stack2) OpenSolaris as cloud-ready, next generation web

infrastructure platform3) Support subscriptions via GlassFish Portfolio4) Performance5) Future Plus ...

Demos & How to get involved.

Page 3: OpenSolaris Web Stack MySQL BOF

3

Brief Historical Background

1) OpenSolaris Web Stack project – Ongoing since August 2007– Formally integrate all interesting web tier open source projects into OpenSolaris (via native IPS packages)

2) CoolStack project– Used to publish Solaris 10 packages of common web infrastructure open source components– Community effort, not a Sun product, no support

Page 4: OpenSolaris Web Stack MySQL BOF

4

Why Sun for your AMP stack?

● Sun has recognized experts on the virtual team standing behind the Web Stack

Long-time committers and other contributors to Apache HTTP Server and PHP

Core MySQL development

The original author of lighttpd, as well as other contributors

Memcached contributors

Ruby (and JRuby), Python (and JPython) contributors

Apache Tomcat was originally developed by Sun

Page 5: OpenSolaris Web Stack MySQL BOF

5

Why Sun for your AMP stack?

● Deep experience in product integration, performance, QA, and support of these features

Delivering and supporting Apache HTTP Server, Tomcat, MySQL, and more in Solaris 10

Delivering a rich and up to date set of web components with

CoolStack for Solaris 10

OpenSolaris

● Understanding of the entire lifecycleImproving the developer experience with support for web development from NetBeans

Rich dynamic tracing capabilities

Page 6: OpenSolaris Web Stack MySQL BOF

6

What's Web Stack?

• A superset of 'AMP' (Apache + MySQL + PHP) stack• Provides the key web tier open source projects integrated and tested for interoperability, as part of the OS distribution

• Optimized for performance• Customized to leverage all the advanced OpenSolaris features.

• Fully supported for production deployments (including cloud environments, viz., Amazon EC2, or network.com)

Page 7: OpenSolaris Web Stack MySQL BOF

7

OpenSolaris Web StackThe Complete Web Tier

Sun Web Server

Apache HTTPd

GlassFish

Lighttpd

MySQL, Memcached

Mod_jk, perl,

PHP, Ruby, Python

Squid, TomcatMediaWiki, Drupal, Wordpress, Joomla — deploy in minutes!

Page 8: OpenSolaris Web Stack MySQL BOF

8

Web Stack componentsWeb Stack component 1.4 1.5 Apache HTTP Server 2.2.9 2.2.11

v2 UR2 V2.11.4.19 1.4.211.2.5 1.2.51.2.25 1.2.27

mod_perl 2.0.2 2.0.4MySQL 5.0.67 5.1.30 and 5.0.67PHP 5.2.6 5.2.9Python 2.5.2 2.6.1Ruby Gems 0.9.4 1.3.1Ruby 1.8.6 p287 1.8.7 p72Squid 2.6.STABLE17 2.7 STABLE6Tomcat 5.5.27 6.0.18Hudson 1.2.x

GlassFish Enterpriselighttpdmemcachedmod_jk

Page 9: OpenSolaris Web Stack MySQL BOF

9

Sun GlassFish Web Stack?

• Sun Glassfish Web Stack unifies Sun product offering under one umbrella – GlassFish Portfolio.

• 24x7 production support available on both OpenSolaris and Solaris 10

– Replaces CoolStack– Available on Amazon EC2 cloud deployments.

• And also available on Red Hat Enterprise Linux 5• Same components; One product; Three platforms• Support pricing is based on per-server annual subscriptions – very similar to MySQL.

Page 10: OpenSolaris Web Stack MySQL BOF

10

GlassFish Portfolio: Easy to Acquire

GlassFish Portfolio (per server per year in USD)

•Basic•Silver •Gold•Platinum

$ 999$2,999$5,999$8,999

MySQL Enterprise (per server per year in USD)

•Basic•Silver •Gold•Platinum

$599$1,999$2,999$4,999

++

GlassFish Portfolio Unlimited Starting at $120,000For the price of a single CPU of Oracle Enterprise Edition, companies with up to 1000 employees can deploy an unlimited number of GlassFish Enterprise Server, Web Stack,

Web Server, Web Space, or ESB servers with full 24x7 production support.

Page 11: OpenSolaris Web Stack MySQL BOF

11

Some of the benefits of OpenSolaris.

• ZFS rocks!– Data management made easy w/ lightweight snapshots– Copy on write semantics; Support for native NFSv4 ACLs

• DTrace– Improves observability of software stack– Diagnose most crippling performance problems

• RBAC Security– Allows delegation of parts of system administration tasks to users via roles.

• SMF– Self-healing for services.

• Compatibility– Assurance of compatibility

Page 12: OpenSolaris Web Stack MySQL BOF

12

Platform Notes: OpenSolaris 2008.11

• Web Stack is available via native IPS–No separate install required

• Install most components in one go:•% pfexec pkg install amp

• Or handpick individual favorite components:•% pfexec pkg install SUNWphp52 SUNWruby18

• Fully integrated with SMF•% pfexec svcadm enable apache22

• DTrace support included–In Apache httpd, PHP, and Ruby.

Page 13: OpenSolaris Web Stack MySQL BOF

13

Platform Notes: Solaris 10

• Same components, same versions as OpenSolaris• Available as SVR4 packages• Go to www.sun.com/software/webstack and click on “Get It!”

– Unpack the downloaded file into a new directory•# ./install amp(installs typical components)

• Integrated with SMF• DTrace support included

–In Apache httpd, Ruby, PHP

Page 14: OpenSolaris Web Stack MySQL BOF

14

Platform Notes: RHEL 5

• Again same components, same versions as OpenSolaris.

• Available as RPM packages• As with Solaris 10, download from www.sun.com/software/webstack

–Unpack the downloaded file into a new directory•# ./install amp(installs typical components)

•Full feature parity with OpenSolaris/Solaris10–Except for features which are not available on Linux:–No smf, no DTrace support

Page 15: OpenSolaris Web Stack MySQL BOF

15

MySQL Performance

• Performance Issues with MySQL 5.0.67– Data loads took 5-10 minutes– Could only support 1450 concurrent users on Olio benchmark on X2250 server (16GB RAM, 2x quad core AMD 1.9GHz processors)

• Switched to MySQL 5.1.25– Data loads now take seconds– Concurrent users up to 1900 on the same h/w (+30%)– Master database handling 20,000 connections

• MySQL 5.4 (beta) even faster(especially on multi-core systems)

Page 16: OpenSolaris Web Stack MySQL BOF

16

MySQL Performance Tuning

• MySQL Specific Tuning– innodb_flush_log_at_trx_commit = 2–> Relaxed requirements for Web 2.0 apps vs OLTP–> Flush log every second instead of every commit

– innodb_doublewrite_disabled–> ZFS already provides consistency

– Increased join_buffer_size to 8M–> Helps reduce join latency

– table_open_cache = 2048–> Increased to support large number of threads.

– Place the InnoDB write log on SSD's.

Page 17: OpenSolaris Web Stack MySQL BOF

17

Apache & PHP Tuning• Apache Specific Tuning

– ListenBacklog 16384– ServerLimit 8192– MaxClients 8192– MaxRequestsPerChild 0– StartServers 128– MinSpareServers 20– MaxSpareServers 128

• PHP Specific Tuning– error_reporting = E_ALL & ~E_NOTICE– upload_tmp_dir = /tmp– session.save_path = “/tmp/http_sessions”

Page 18: OpenSolaris Web Stack MySQL BOF

18

Web Stack Performance on Nehalem

• Workload – Apache Olio/PHP• Servers based on Intel® Xeon® Processor 5500• Web server + Memcached (1 system)

– 2 quad-core CPUs at 2.9 Ghz with 48GB main memory(Sun Fire X2270 server configuration)

– Hyper-threading is on – effectively 16 threads– Apache, PHP, memcached from OpenSolaris 2008.11

• Database – (3 systems)– 2 quad-core CPUs at 2.5 Ghz (Sun Fire X4170)– Using MySQL 5.1 Replication (1 master, 2 slaves)– Database on internal drives (ZFS)

Page 19: OpenSolaris Web Stack MySQL BOF

19

Web Stack Nehalem configuration

Horizontal Scaling: With 2 web server, Web Stack scales to10,000 users + 1 Million MySQL rows with 1 TB data

Page 20: OpenSolaris Web Stack MySQL BOF

20

Web Stack Performance

0 1000 2000 3000 4000 5000 60000

10

20

30

40

50

60

70

80

Scaling on Nehalem Serv-ers

CPU

Users

CP

U U

til.

Blueprint: Deploying Web 2.0 Applications on Sun Servers and the OpenSolaris Operating System with Apache Olio/PHP Workloadhttp://wikis.sun.com/display/BluePrints/Deploying+Web+2.0+Applications+on+Sun+Servers+and+the+OpenSolaris+Operating+System

Page 21: OpenSolaris Web Stack MySQL BOF

21

Future Directions

• Continue updating component versions to stay as current as release cycle permits

– Releases are approximately aligned with OpenSolaris releases

• Add selected components based on customer value (feedback welcome!)• Working towards fully relocatable stack via integration with Glassfish Update Center

• Continuing on performance and scalability improvements, and value adds for enterprise users.• And enhancing unique features...

–e.g. much more DTrace support coming in 1.5.

Page 22: OpenSolaris Web Stack MySQL BOF

22

Future Directions – Enterprise Manager

• Dashboard–Server/Runtimes listing w/ status–Message Console–Monitoring graphs–System-wide data–Server level data

• Server management–Start/Stop–Richer monitoring at server level–Log viewer

Page 23: OpenSolaris Web Stack MySQL BOF

23

Future Directions – Web Stack Enterprise Manager

Page 24: OpenSolaris Web Stack MySQL BOF

24

Web Stack – More Information ...

• OpenSolaris Web Stack Project:–http://opensolaris.org/os/project/webstack/

• OpenSolaris Web Stack discussion:–[email protected]

• Glassfish Web Stack product page:–http://www.sun.com/software/webstack/

• Solaris 10/RHEL download page:– http://www.sun.com/software/webstack/ and click on “Get It!”

• Web Stack product forum:–http://forums.sun.com/forum.jspa?forumID=980

Page 25: OpenSolaris Web Stack MySQL BOF

25

Demos – OpenSolaris Web Stack

1> Deploy Drupal CMS in seconds! 2> MySQL data restore via ZFS timeslider 3> End-to-end observability with DTrace (using NetBeans 6.7 PHP MS3)

Page 26: OpenSolaris Web Stack MySQL BOF

26

OpenSolaris Web Stack

[email protected]


Top Related