11.07.2015 Views

VIrTuAL MACHINES - z/VM - IBM

VIrTuAL MACHINES - z/VM - IBM

VIrTuAL MACHINES - z/VM - IBM

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

the virtual machine from being dispatchedfor a period of time. Instead ofmoving the virtual machine to the dispatchlist to run, CP places the virtualmachine on the eligible list, which is alist of virtual machines that are ready torun, but which CP is holding backbecause there appears to be too littlephysical resource available to run them.The tendency of a virtual machine toincur page faults is directly related tothe amount of physical memory CP hasset aside for the virtual machine’s pages.Usually, CP makes this determinationon its own. However, the CP SETRESERVE command lets the operatorinfluence the determination, telling CPto reserve at least said minimum numberof real frames to hold the guest’spages. When the operator uses SETRESERVE, he’s offering a guest favoredstatus with respect to memory consumption.Using SET RESERVE is avaluable performance tuning technique.z/<strong>VM</strong> lets virtual machines sharememory, which helps reduce memoryrequirements. z/<strong>VM</strong> has three kinds ofshared memory. The first, aDiscontiguous Saved Segment (DCSS),is a range of guest memory addressesfor which all participating guests see thesame physical memory pages. A z/<strong>VM</strong>systems programmer can place commonlyused data or programs in a DCSS,letting many virtual machines share onephysical copy.With the second type of sharedmemory, a Named Saved System (NSS),participating guests share a physicalcopy of the data; in addition, the “data”is typically a bootable operating system.This lets many guests share, for example,a single copy of the Linux kernel orCMS nucleus. Booting from memoryoffers speed advantages as well as memoryeconomy.The third type of shared memory, a<strong>VM</strong> Data Space, is similar to a DCSS,but offers much more addressability.With <strong>VM</strong> Data Spaces, the shared dataare in one or more distinct addressspaces, each address space being entirelyavailable for sharing. The participatingguests access those address spacesusing a System z operand addressingarchitecture called Access Register (AR)mode. With AR mode, a single System zinstruction can refer to operands locatedin more than one address space.Virtualization of I/O Devicesz/<strong>VM</strong> uses various methods to providedevices to virtual machines. First,CP can dedicate, or attach, a real deviceto a virtual machine. This gives the virtualmachine exclusive use of the entirereal device. Tape drives are typicallyattached to virtual machines. CP alsocan virtualize a device, which means itgives a guest a portion of a real device.This can be a portion in time, such asof a processor, or a portion of thedevice’s storage capacity, such as of adisk drive. Simulation of devices is athird approach. Earlier we discusseddevices such as a virtual card reader.This is an example of a device wherereal hardware isn’t present, but CP simulatesit using memory and disk. Thelast approach we’ll mention, emulation,is when CP uses hardware of one typeto create the illusion of a similar type.For example, CP uses modern SCSIdisks to cause guests to believe that anolder, no-longer-manufactured style ofdisk, called Fixed Block Architecture(FBA), is present.z/<strong>VM</strong> provides disks to guests invarious ways. While CP can dedicateentire disk volumes to virtual machines,more common is for CP to divide realdisk volumes into disjoint, contiguouscylinder or block ranges called minidisks,thereby letting many guests eachuse some fraction of a real volume’sstorage capacity. Minidisks can be exclusiveto virtual machines, or many virtualmachines can use a single minidisksimultaneously, thereby sharing data.One particularly interesting kind ofdisk z/<strong>VM</strong> can provide for a guest is theVirtual Disk in Storage or VDISK. AVDISK appears to the guest as an FBAdisk drive with extremely fast performance.The VDISK performs wellbecause z/<strong>VM</strong> backs the VDISK inpaged memory instead of on real diskhardware. Because CP doesn’t back aVDISK with permanent disk, the data isvolatile. Even so, VDISKs are handy inseveral situations. In particular, VDISKsare an especially good choice for Linuxswap space.One last disk feature worth mentioningis Temporary Disk (TDISK). Thesystem administrator can assign CP apool of disk volumes it can use to instantiateminidisks users need for only ashort time. The CP DEFINE commandlets the z/<strong>VM</strong> user define such a minidisk;when a user does so, CP findssome free space in the pool and uses itto create the minidisk. When the userno longer needs the minidisk, he issuesthe CP DETACH command to disposeof it, and CP clears the space and returnsit to the pool.Because CP mediates access to minidisks,it can use memory to improvetheir performance. Central to z/<strong>VM</strong>’sminidisk strategy is the CP MinidiskCache (MDC). With MDC, CP usesreal memory or expanded memory tocache recently read portions of minidisks.This greatly improves performancefor minidisks that are frequentlyread, such as those containing objectcode libraries or frequently used binaries.The minidisk cache is a writethroughcache, which means that if aguest writes to blocks that are cached,CP updates the cache and commits thechange to the minidisk before informingthe guest that the write is complete.A z/<strong>VM</strong> system administrator or operatorcan use the CP SET MDCACHEcommand to control or configure theminidisk cache.Network connectivity is an importantconcern in many environments.z/<strong>VM</strong> meets customers’ network needsby offering several networking options.CP can dedicate network devices tovirtual machines. The dedicated devicecan be a channel-to-channel adapter, an<strong>IBM</strong> Open Systems Adapter (OSA) thatprovides Ethernet connectivity, or aHiperSockets device, a kind of networkadapter that connects one LPAR toanother. z/<strong>VM</strong> also has its own TCP/IPstack, which guests can use as if it werean IP router. A common networkoption used today is the virtual switch.Here, CP equips each virtual machinewith a simulated <strong>IBM</strong> OSA and connectsall those simulated OSAs to asimulated LAN segment called a guestLAN. Also connected to the guest LANis a real OSA that CP manages. Withthis configuration established, CP canprovide packet- or frame-switchingfunctions for the guests, just as a realswitch would in a real external network.In this way, the guest LANbecomes an extension of a real externalLAN segment.Diagnostic and Programming Servicesz/<strong>VM</strong> offers a variety of debug facilities,making it invaluable for developingoperating systems for System z.Commands exist to display, search, ormodify virtual machine memory. Indisplaying memory, CP can display thememory in hexadecimal, ASCII,EBCDIC, or even as disassembledassembler instructions.The tracing facility, whose documentationexceeds 40 pages, is extensive. CPTRACE can trap references to memory,changes to registers, use of specificinstructions, or arrival of interrupts, to4 2 • z / J o u r n a l • F e b r u a r y / M a r c h 2 0 0 8


S av e e n e r g yU S e S D SBest-of-Breed z/OSIP Management• Locate performance-sapping glitches.• Avoid resource-hog monitoringtechniques.• Maintain OSA and EnterpriseExtender at peak performance.• Perform live traces with ease.SDS FTP ManagerTransforming z/OS FTP• Automate batch transfers to gainoptimum throughput.• Eliminate FTP-related productivityshortfalls.• Thwart security violations.• Expedite transfer tracking.Putting your time and MIPS to best use.Free test drives available.www.sdsusa.com • 800-443-6183


name a few. CP TRACE also includesthe ability to issue commands when certaintrace points are hit. The softwaredeveloper can conduct tracing interactively,or let the trace run, collecting thetrace records for later analysis.z/<strong>VM</strong> provides several programminginterfaces to let guests interact with CP.The System z architecture provides a specialassembler instruction, Diagnose,which on real hardware performs diagnosticfunctions. Recognizing the utilityof such a trappable instruction, CP implementsan entire Application ProgrammingInterface (API) built on Diagnose. To usethe API, a guest builds a parameter list inmemory, puts the address of the parameterlist into a register, and then issues theDiagnose instruction. CP performs therequested operation and returns controlto the guest.CP provides more than 50 differentfunctions through Diagnose. Thesefunctions include interrogating realdevice characteristics, performing I/O,or managing memory segments. CPalso provides various communicationAPIs that connect virtual machines toone another. One of these methods, theInter-User Communication Vehicle(IUCV), also lets a virtual machinecommunicate with CP. Over an IUCVconnection to CP, a trusted virtualmachine can help CP accomplish certainimportant system managementfunctions such as accounting, performancemonitoring, or security.The Future<strong>IBM</strong>’s <strong>VM</strong> product family hasthrived for four decades because <strong>IBM</strong>has constantly improved <strong>VM</strong> to matchthe market’s virtualization needs. Inthe early ’70s, <strong>VM</strong> hosted a smallnumber of ordinary guest operatingsystems. In the late ’70s and early ’80s,the number grew modestly. In themid-80s, CMS became popular as ageneral-purpose interactive computingplatform, owing largely to a CMSbasedemail and calendar packageknown as Professional Office System(PROFS). To handle the growth, <strong>IBM</strong>sharpened <strong>VM</strong>’s ability to run manylightweight, single-user interactive virtualmachines; some customers ran20,000 office users concurrently on asingle hardware footprint. The late ’90ssaw CMS wither as a general-purposeinteractive environment, while Linuxascended. At the turn of the century,Linux on the mainframe gained a foothold,again bringing <strong>VM</strong>’s virtualizationcapabilities to the forefront. Inresponse to the Linux boom, <strong>IBM</strong>again changed z/<strong>VM</strong>, improving itsvirtualization capabilities so that CPcould begin to handle a large numberof Linux guests as easily as it oncehandled many CMS guests. z/<strong>VM</strong>’sability to adapt to the needs of the systemsrunning in its virtual machines isa strength that should carry it forwardin the next three decades. ZAbout the AuthorsBill Bitner is a senior software engineer in the <strong>IBM</strong>Systems and Technology Group in Endicott, NY. Hejoined <strong>IBM</strong> in 1985, and has worked on performancein various areas of <strong>VM</strong>. He currently leads the <strong>VM</strong>Performance team.Email: bitnerb@us.ibm.comBrian Wade is a senior software engineer in the<strong>IBM</strong> Systems and Technology Group in Endicott, NY. Hejoined <strong>IBM</strong> in 1986 after earning his Ph.D. in ElectricalEngineering from the University of Notre Dame. Hecurrently works in z/<strong>VM</strong> Performance.Email: bkw@us.ibm.comBluePhoenix Migration PlusModernize your legacy mainframedatabases and applications and cutgrowing maintenance costs now!Enhance user interfacesUpdate business processesExpand and improve missioncritical applicationsWith Migration Plus, BluePhoenix helps you to moveinto the future with confidence.BLUEPHOENIXwww.bphx.com4 4 • z / J o u r n a l • F e b r u a r y / M a r c h 2 0 0 8

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!