Upload
votruc
View
219
Download
4
Embed Size (px)
Citation preview
© 2011 IBM Corporation
A Look into Linux on System z with DB2 LUW
This presentation is intended to give the audience a look into the architecture of running Linux on System z. The presentation will cover an overview of z/VM capabilities to run Linux as a guest, as well as, helpful tips and techniques while running DB2 LUW in this environment.
Jan Koblenzer Data Management Technical Specialist [email protected]
© 2011 IBM Corporation2
A Look into Linux on System z with DB2 LUW
Trademarks
Notes: Performance is in Internal Throughput Rate (ITR) ratio based on measurements and projections using standard IBM benchmarks in a controlled environment. The actual throughput that any user will experience will vary depending upon considerations such as the amount of multiprogramming in the user's job stream, the I/O configuration, the storage configuration, and the workload processed. Therefore, no assurance can be given that an individual user will achieve throughput improvements equivalent to the performance ratios stated here. IBM hardware products are manufactured from new parts, or new and serviceable used parts. Regardless, our warranty terms apply.All customer examples cited or described in this presentation are presented as illustrations of the manner in which some customers have used IBM products and the results they may have achieved. Actual environmental costs and performance characteristics will vary depending on individual customer configurations and conditions.This publication was produced in the United States. IBM may not offer the products, services or features discussed in this document in other countries, and the information may be subject to change without notice. Consult your local IBM business contact for information on the product or services available in your area.All statements regarding IBM's future direction and intent are subject to change or withdrawal without notice, and represent goals and objectives only.Information about non-IBM products is obtained from the manufacturers of those products or their published announcements. IBM has not tested those products and cannot confirm the performance, compatibility, or any other claims related to non-IBM products. Questions on the capabilities of non-IBM products should be addressed to the suppliers of those products.Prices subject to change without notice. Contact your IBM representative or Business Partner for the most current pricing in your geography.
* Registered trademarks of IBM Corporation
The following are trademarks or registered trademarks of other companies.
* All other products may be trademarks or registered trademarks of their respective companies.
Adobe, the Adobe logo, PostScript, and the PostScript logo are either registered trademarks or trademarks of Adobe Systems Incorporated in the United States, and/or other countries.Cell Broadband Engine is a trademark of Sony Computer Entertainment, Inc. in the United States, other countries, or both and is used under license there from. Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both. Microsoft, Windows, Windows NT, and the Windows logo are trademarks of Microsoft Corporation in the United States, other countries, or both.InfiniBand is a trademark and service mark of the InfiniBand Trade Association.Intel, Intel logo, Intel Inside, Intel Inside logo, Intel Centrino, Intel Centrino logo, Celeron, Intel Xeon, Intel SpeedStep, Itanium, and Pentium are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States and other countries.UNIX is a registered trademark of The Open Group in the United States and other countries. Linux is a registered trademark of Linus Torvalds in the United States, other countries, or both. ITIL is a registered trademark, and a registered community trademark of the Office of Government Commerce, and is registered in the U.S. Patent and Trademark Office.IT Infrastructure Library is a registered trademark of the Central Computer and Telecommunications Agency, which is now part of the Office of Government Commerce.
The following are trademarks of the International Business Machines Corporation in the United States and/or other countries.
AIX*BladeCenter*CICS*Cognos*DB2*DB2 ConnectDomino*
GDPSHiperSocketsInformixInfoSphereIBM*IBM (logo)*IMS
Lotus*MQSeries*Parallel SysplexPowerVMRACF*
System x*System z*System z10*Tivoli*WebSphere*
z10zEnterprisez/VM*z/VSE
© 2011 IBM Corporation3
A Look into Linux on System z with DB2 LUW
Agenda
Linux Virtualization
Components of Linux on System z Virtualization
DB2 LUW running on Linux for System z
© 2011 IBM Corporation4
A Look into Linux on System z with DB2 LUW
What is Linux
From Wikipedia: Linux refers to the family of Unix-like computer operating systems using the Linux kernel.
A fully-networked 32/64-bit UNIX-like operating system developed by Linus Torvalds
Multi-user, multitask, multiprocessor
Compilers like C, C++, Fortran, Smalltalk, Ada, java
GNU development tools, runtime, and utilities
apache- web server, samba- file and print server, nfs file server, ldap, database
X Windows Graphical User Interface - gnome, kde
Coexists with other operating systems - Runs on multiple platforms
Includes the source code
© 2011 IBM Corporation5
A Look into Linux on System z with DB2 LUW
Linux and IBM
IBM announced commit to Linux-enable all platforms in 1999. Today over 3,000 applications and counting on Linux for System z. Project Green took 3,900 x86 and Unix workloads to 30 System z for 80% energy savings
Power Systems System zSystem x
WebSphere® Tivoli® Lotus®Information Management Rational®
• Full range of virtualization options• Cross-platform consolidations• Choose the platform that bestsuits the workload
Efficiency
• Wristwatches to mainframes• Community drives innovation for scaling both up and out
Scalability
• Enhanced Testing & Cert. • NSA-based Linux Features• Very rapid time to fix if vulnerabilities are discovered
Security
Match the platform to the workload, without adding complexity
© 2011 IBM Corporation
A Look into Linux on System z with DB2 LUW
Why Customers Are Adopting Linux
Linux offers UNIX customers the flexibility to choose lower cost hardware
Linux offers Windows customers increased flexibility and enhanced security / reliability
Linux offers all customers choice for new workloads through open computing, avoiding lock-in to proprietary hardware or software vendors or architectures
NewWorkloads
UNIXmigrations
Windowsmigrations
Total Cost of Ownership
Flexibility and Choice
Reliability
Security
© 2011 IBM Corporation7
A Look into Linux on System z with DB2 LUW
The Linux Kernel
System z
Legendary dependability, Always on Designed for multiple diverse workloads
executing concurrently Highly scalable – up or out Rich security features Proven high volume data acquisition
and management Advanced virtualization capabilities
Hardware
Platform Specific Code
Platform Specific Code
Linux Applications
Linux Kernel
GNU CompilerGNU
RTLGNU
Binutils
Pure ASCII environment Does not need any other OS to run on a
mainframe Not a replacement for any other OS on IBM
System z Novell-SuSE and RedHat are the supported
distributions
Linux on System z is not a special Linux
Not an emulationNot an emulation
Linux is "hardware agnostic" by designAPI's are consistentAppearance, look, and feel is consistentApplications and skills are portable from platform to platform
© 2011 IBM Corporation8
A Look into Linux on System z with DB2 LUW
Virtualization“Virtualization is the ability for a computer system to share resources so that one physical server can act as many virtual servers.”
© 2010 IBM Corporation
IT Optimization on IBM System z
© 2011 IBM Corporation10
A Look into Linux on System z with DB2 LUW
System z Virtualization
Multi-dimensional virtualization technoogy
System z provides logical (LPAR) and software (z/VM) partitioning
PR/SM ( Processor Resource/System Manager ) is a type 1 Hypervisor which enables highly scalable virtual server hosting for LPAR and z/VM Virtual machine environments.
IRD (Intelligent Resource Director) coordinates allocation of CPU and I/O resources among z/OS and non-z/OS LPARs.
© 2011 IBM Corporation11
A Look into Linux on System z with DB2 LUW
Linux on System z is virtualized
Linux on System z is always executed in a virtualized environment.
Linux in an LPAR (native)
Linux as a guest under z/VM
© 2010 IBM Corporation 06/07/11
IT Optimization on IBM System z
Some of the Key Components
IFL – Integrated Facility for Linux
Storage
LPAR – Logical Partition
z/VM
Linux guest
© 2010 IBM Corporation 06/07/11
IT Optimization on IBM System z
Integrated Facility for Linux (IFL)
The Integrated Facility for Linux® (IFL) is a central processor (CP) dedicated to Linux workloads.
Isolated from general use
Supported by z/VM® and the Linux operating system
Can purchase additional processing capacity exclusively for Linux workloads•Without adding general purpose processors•
Operates on full capacity, independent of the general purpose processor speed
© 2010 IBM Corporation 06/07/11
IT Optimization on IBM System z
Integrated Facility for Linux (IFL)
IFLs (physical processors )
Activated IFL Installed, not activated IFL
System z allows the customer to dynamically activate the number of IFLs needed for their work
Different models have different numbers of IFLs installed
Above: 15 activated IFLs, out of 32 installed
© 2010 IBM Corporation 06/07/11
IT Optimization on IBM System z
Storage (memory)
Memory is shared between the Linux guests in an LPAR.
Memory is not shared between LPARs
Both the z/VM layer (LPAR) and the Linux (guest) layer have swap.
Most define the guests as to push swapping up to the zVM level and use the linux level swap area as padding for unforeseen high usage.
© 2010 IBM Corporation 06/07/11
IT Optimization on IBM System z
Logical Partition (LPAR)
Logical partitioning of System Resources
The hardware and firmware that provides partitioning is known as PR/SM™ (Processor Resource/System Manager)
Each LPAR is assigned its share of CPU and Memory
LPARs can be configured as:–Native Linux or z/OS in an LPAR.
–Many Linux guests running under z/VM–
System zSystem z
© 2010 IBM Corporation 06/07/11
IT Optimization on IBM System z
z/VM
Uses real resources available to create Virtual machines•CPU, Memory, I/O, Network
Virtualization technology•Provides each VM guest with its own working environment •Can run any OS
Provides Guest Support•Capable of running hundreds of Linux VM guests on a single mainframe •Runs with other System z operating systems such as z/OS
z/VM (Control Program (CP))
CMS z/VM z/OSVSE/ESA
OS/390VM/ESA
Linux
Other Operating Systems: TPF, GCS
© 2010 IBM Corporation 06/07/11
IT Optimization on IBM System z
z/VM - continued
CP (Control Program) – the Hypervisor itself• No high level commands – just basic VM maintenance and control• No files concepts – only virtual devices• No job control – everything is a VM.
CMS (Conversational Monitor System) – Administration Virtual-machine
Interacts with z/VM like a shell or bash in Linux
Edit script like executable files
REXX scripts (EXEC type), file-manager (filelist), text-editor (xedit)
TCP/IP connectivity (TCPMAINT minidisk 592)–Independent copy of OS
© 2010 IBM Corporation 06/07/11
IT Optimization on IBM System z
Linux Guest
A guest virtual machine runs in the context of a z/VM user ID
Each LPAR runs one OS, If Running z/VM
Z/VM can in turn run many other Operating Systems. These can be linux.
Linux guests are assigned virtual CPUs. 1 or many virtual CPUs per guest.
Tens or hundreds of guests
Resource over commitment (CPU, Memory)
© 2011 IBM Corporation20
A Look into Linux on System z with DB2 LUW
CPU CPU CPU Shared Physical CPUsCPU CPUCPU
z/VM Paging Subsystem
ExpandedStorage Paging Volumes
Virtual CPUs
z/VM Paging Subsystem
ExpandedStorage
Guest Memory
Run multiple copies of z/VM on a single mainframe for enhanced scalability, failover, operations, and energy efficiency
Share CPUs and I/O adapters across all z/VM LPARs, and over-commit memory in each LPAR for added cost effectiveness
LPAR Running z/VM LPAR Running z/VM
Logical CPUs
z/VM-Managed Memory z/VM-Managed Memory
Paging Volumes
Virtualization Components in a Single-System, Multi-LPAR, Linux in z/VM EnvironmentMaximizing Resource Utilization and System Availability
© 2011 IBM Corporation21
A Look into Linux on System z with DB2 LUW
* Source: gomainframe.com Joe Clabby
Up to 100% server utilization compared to 10-20% distributed server utilization*
Shared everything infrastructure allows for maximum utilization of resources–Processors, Memory, Network, Adapters, Cryptography, Devices
Moderate distributed servers Up to 100% utilized System z server
Many applications on one physical System z server
Typically single application per physical server
Virtualization + Consolidation =Maximizing Utilization of Resources with IBM System z
0%
10%
20%
30%
40%
50%
60%
70%
80%
90%
100%
App App App App App App App App
App App App App App App App App
App App App App App App App App
0%
10%
20%
30%
40%
50%
60%
70%
80%
90%
100%
App App App App AppApp App App App AppApp App App App App
© 2011 IBM Corporation22
A Look into Linux on System z with DB2 LUW
Customers use Linux® on System z for: Application Serving (OLTP, Web, ERP, etc.)Application Development Data Serving (Warehousing & analytics)Infrastructure Serving (Security, file, print, etc.)
Recommended “best fit” workloads:
Business critical applications: WebSphere®, SAP, Oracle E-Business Suite, …
Development & test: e.g. of WebSphere / Java™ applications
Data services: Cognos®, DB2®, InfoSphere®, Oracle, Informix®, Builders WebFOCUS
Email & collaboration: Lotus Domino®, Lotus® Collaboration products, Web 2.0
Network Infrastructure: FTP, NFS, DNS, etc., Business connectors: WebSphere MQSeries®, DB2 Connect™, CICS® Transaction Gateway, Security Services: Firewall, Proxy, etc.
Percentage of survey respondentsSource: 4Q2010 IBM Market Intelligence
29%
49%
31%
43%
51%
18%
29%
37%
51%
23%
43%
54%
57%
Other workload
Systems Mgmt.
File & Print
Networking
Security
Email/Collaboration
Data Analysis
Data Warehousing
ApplicationDevelop.
CRM/ERP
Batch
Web Serving
OLTP
Consolidate what?
© 2011 IBM Corporation23
A Look into Linux on System z with DB2 LUW
Leverage classic strengths of the System z –High availability–High i/o bandwidth capabilities –Flexibility to run disparate workloads concurrently –Requirement for excellent disaster recovery capabilities–Security
Shortening end to end path length for applications–Co-location of applications–Consolidation of applications from distributed servers–Reduction in network traffic–Simplification of support model
Consolidation Effect–Power requirements–Software costs–People Costs–Real Estate–Workloads requiring EXTREME Flexibility
What Makes A Best Fit Workload for Linux on System z?
© 2011 IBM Corporation24
A Look into Linux on System z with DB2 LUW
DB2 on Linux for System z
DB2 on Linux for System z is NOT DB2 z/OS
DB2 on Linux for System z = DB2 LUW (Linux,Unix, Windows)
Linux is Linux, DB2 LUW is DB2 LUW ...so administration is Common
Examples:
./db2_install - character based installer or ./db2setup GUI db2pd db2ls Fixpaks are also available on FixCentral just like Linux for x86,Windows,Aix Fixes are applied just the same way
Administration is the same … No special DB2, No special Linux.
© 2011 IBM Corporation25
A Look into Linux on System z with DB2 LUW
Monitoring
Same monitoring tools
So what considerations for DB2 running on Linux for System z ?
© 2011 IBM Corporation26
A Look into Linux on System z with DB2 LUW
Considerations and Guidelines for running DB2 on Linux for System z
✔ Check that the kernel jiffies are disabled.echo "0" >/proc/sys/kernel/hz_timer
There are four different I/O schedulers available:noop, deadline,as, cfqnoop, deadline,as, cfqThe default in the distribution is deadline. Don't change the setting to asas on Linux for System z
DIO/AIO are best practices for DB2 LUW but, if your going to use DIO (Direct I/O)
✔ Check that the underlying storage supports this.
SCSI over FCP supports DIO and offers good performance for database servers
Use EXT3 (over reiserfs) , FCP attached SCSI with DIO/AIO whenever possible. .
✔ Disable CMM (Cooperative Memory Management)
© 2011 IBM Corporation27
A Look into Linux on System z with DB2 LUW
Understand the Black Box
Don't treat your storage server like a black box. If you ask your system admin for16 disks, and he gives you 5100-510F. That's the worst case. What's wrong with that ?
Example ESS Architecture
© 2011 IBM Corporation28
A Look into Linux on System z with DB2 LUW
Understand the Black Box
© 2011 IBM Corporation29
A Look into Linux on System z with DB2 LUW
Optimize the storage layout for DB2
– Use as many paths as possible (CHPID -> host adapter)– Spread the host adapters used across all host adapter bays• For ECKD switching of the paths is done automatically• FCP needs a fixed relation between disk and path– Use Linux multipathing for load balancing– Select disks from as many ranks as possible!– Switch the rank for each new disk in a logical volume– Switch the ranks used between servers and device adapters– Avoid reusing the same resource (path, server, device adapter, and disk) as long as possible
Goal is to get a balanced load on all paths and physical disks
In addition striped Linux logical volumes and / or storage pool striping may help to increasethe overall throughput.
© 2011 IBM Corporation30
A Look into Linux on System z with DB2 LUW
Collect System Information
✔Collect dbginfo.sh output and db2support– Proactively in healthy system–When problems occur – then compare with healthy system
dbginfo.sh is a script to collect various system related files, fordebugging purposes. It generates a tar-archive which can beattached to PMRs / Bugzilla entries
part of the s390-tools package in SUSE and recent Red HatDistributions
. It collects the following z/VM information:– Release and service Level: q cplevel– Network setup: q [lan, nic, vswitch, v osa]– Storage setup: q [set, v dasd, v fcp, q pav ...]– Configuration/memory setup: q [stor, v stor, xstore, cpus...]– When the system runs as z/VM guest, ensure that the guest has the appropriate privilegeclass authorities to issue the commands
© 2011 IBM Corporation31
A Look into Linux on System z with DB2 LUW
Collect z/VM performance data
Cheet Sheet at: http://www.vm.ibm.com/perf/tips/collect.html
5 basic steps● create monitor DCSS●setup userid to issue monwrite command●start and configure monitor● start monwrite● stop monwrite and save data
© 2011 IBM Corporation32
A Look into Linux on System z with DB2 LUW
Linux on System z - 10 Years and counting …..
© 2011 IBM Corporation33
A Look into Linux on System z with DB2 LUW
References and Where to find more Info
http://www.ibm.com/developerworks/linux/linux390/index.html
http://www.ibm.com/developerworks/linux/linux390/perf/tuning_diskio.html
Performance considerations for databases on Linux for System z
http://www.vm.ibm.com/education/lvc/
http://linuxvm.org/Present/index.html