IBM s/390 manual Writes Cache Hits

Page 61

￿Use the writethroughcache parameter to force a different operation of the cache (on a device or control unit level). The default operation uses a writeback cache technique.

Here is an example that uses all three options:

(resources

definitions)

....

 

 

c3990A: cu

3390

 

interface local(1)

options ‘trackcachesize=150’

device(00)

3390-3 /usr/flexes/links/A3s1

device(01)

3390-3 /usr/flexes/links/B3s1 devopt ‘trackcachesize=5’

device(02)

3390-3

/usr/flexes/links/C3s1 devopt ‘trackcachesize=45’

device(03)

3390-3

/usr/flexes/links/D3s1 devopt ‘trackcachesize=30,writethroughcache’

device(04)

3390-1

OFFLINE devopt ‘trackcachesize=0’

end c3990A

 

 

This is a bit complex. The five devices defined will ask for (15 + 5 + 45 + 30 + 0 =) 95 tracks of cache. (Device (00) does not specify a cache size and defaults to 15 tracks.) The control unit definition specifies 150 tracks of cache. This is (150 - 95 =) 55 more tracks than needed by individual device caches, and the 55 tracks will be a floating cache. The floating cache is managed by internal FLEX-ES logic. Each 3390 track is about 57 KB, so the 150 tracks of cache will require about 8.3 MB of Server storage.

Cache is normally allocated for an offline device, since you might perform a FLEX-ES mount command to use the device. If you are certain you will not use the device (or you really want no cache for some reason), you can specify a cache of zero tracks.

If you specify a control unit cache size of less than the sum of the individual device caches, the specified control unit cache size is ignored.

FLEX-ES defaults to writeback cache operation. This allows the S/390 disk write channel operation to complete when the data is in the FLEX-ES cache. The data will be flushed to the Server disk at an indeterminate time in the future.10 An exposure exists if the system fails after a S/390 channel program thinks it completed a disk write, but the cache buffer has not really been written to disk. In this case, the S/390 program may have wrong state information. Such failures are extremely rare and the performance advantage of writeback is so great that this default operation is almost always used.

A writethrough operation means that the S/390 channel operation for a disk write is not complete until the data is actually written to the Server disk.11 A copy of the data is retained in the FLEX-ES cache for possible future use. A writethrough cache provides considerably lower performance than a writeback cache, but it provides higher integrity. It might be considered for a S/390 volume containing DB2 log data, for example.

If you have enough Server memory, you can specify large disk caches for better overall system performance. There is obviously room for considerable tuning here, by manipulating cache sizes at the device and control unit level. You can use the d ckdcachestats cuu command to monitor cache effectiveness:

flexes> d ckdcachestats A80

 

 

 

 

ADDRESS

READS

WRITES

CACHE HITS

DEDICATED LINES

LINES USED

A80

2880

182

1811

(97%)

15

15

(0%)

A81

2880

182

1811

(97%)

15

15

(0%)

A82

2880

182

1811

(97%)

15

15

(0%)

10This should be a familiar concept. The typical UNIX operation involves writeback caches, where the disk cache buffers are synched (flushed) to disk every 10 seconds or so.

11This is not quite correct, because the RAID adapter also has a cache and the individual disk drives often have a buffer that performs a temporary cache function. We ignore these points in the current discussion.

Chapter 5. Additional Topics

51

Image 61
Contents Bill Ogden ThinkPad Enabled for S/390Page International Technical Support Organization First Edition October Contents Shutting down Index Vi S/390 PID ThinkPad Enabled for S/390 Author Special noticeComments welcome IBM trademarksIntroduction ThinkPad/EFS systems Purpose of this redbookFLEX-ES Positioning with other small S/390s LinuxThinkPad/EFS hardware used Terminology Disk planning System and Linux installationDifferences ThinkPad Linux installationPartition Manually Partition Mount Point Device Requested Actual Type Purpose12.17.210 Device Partition Type Default Boot255.255.255.0 12.17.150Gnome Monitor Setup IBM 9513 T55A TFT No clock chip 24 bit Installation notesSelect Start X automatically # df -h# ps -ef grep xinetd Etc/xinetd.d # vi telnet# kill -s USR1 pidnumber PID number for xinetd 14 S/390 PID ThinkPad Enabled for S/390 FLEX-ES and OS/390 installation Brief introduction FLEX-ESPC Processor in ThinkPad Page Installation Installing the FLEX-ES license key Next steps OS/390 AD systemsAD systems # mkdir /s391Basic CD-ROM formats 2 OS/390 on CD-ROMFLEX-ES formats 3 OS/390 device configurationUnzipping and installing Awsckd CD-ROM files Installation tasksAn unzip program Mount /dev/cdrom /mnt/cdromFile ownership Minor problemsFiles unzip in wrong order Volume in two separate zip filesFLEX-ES Operation Comments FLEX-ES system and resource definitions$ cd /usr/flexes/rundir Building a shell script# resadm -s R10A.rescf $ resadm -r$ sh shos Flexes ipl a80 0a82cs Terminal Solicitor IPL OS/390=stor User terminal connection Operation and use11.42.47 A80,8Iodf requirements Linux TN3270System performance monitors Rmf5 TCP/IP for OS/390 # resadm -T Shutting down# resadm -k # exit36 S/390 PID ThinkPad Enabled for S/390 Additional Topics Basic debugging Security Operating Systems Messages consoleServer memory Vmstat command CPU Importance of Linux swappingUltrabay Using a second Linux hard disk# cat /proc/partitions Second disk planning Partition Mount Size Use Disk layout AD systemDevice Volser Addr Use Alternative method FLEX-ES FakeTape on OS/390222222 560Multi-system setup $ x3270 -model 3 -keymap pc -port tn3270 localhost X3270 client$ x3270 -model 3 -keymap pc -port tn3270 localhostt91f Function Keys UsedRemote resources # cd /usr/lib/X11/app-defaults # cp X3270 X3270old# vi System B Disk cachesWrites Cache Hits FSI Channel Adapters Tuning cachesizeScsi adapter for the ThinkPad Backup and restore considerationsDisk fragmentation $ tar -cvzf /holding/OS39RA.tarz /s390/OS39RA Using tar to back up S/390 volumes$ cd /usr/flexes/rundir $ sh buOS39RAc Using tar and ftpCD-RW drive 16 S/390 identificationRAS discussion Display PSW and registersLinux windows Verify ckd diskThinkPad power control Installing FLEX-ES upgradesCommon commands Useful Linux commandsText editors Multiple consoles, sessions, screens62 S/390 PID ThinkPad Enabled for S/390 Frequently asked questions 64 S/390 PID ThinkPad Enabled for S/390 Frequently asked questions 66 S/390 PID ThinkPad Enabled for S/390 Frequently asked questions 68 S/390 PID ThinkPad Enabled for S/390 Basic definitions for a single HDD Appendix A. FLEX-ES definition listingsShell script for a single HDD Definitions for two HDDs Shell script for two HDDs System definitions Appendix B. FLEX-ES parametersCpu0 Cpu1 Cpu2 Emulated control unit types Resource definitionsTypical resource definitions Emulated device typesCKD disk resources Terminal resources LAN resources Tape resourcesCloned devices Common rules Resadm commandCLI commands 710 Altcons Flexes mount A90 S390/WORK01560 Home/tape3 84 S/390 PID ThinkPad Enabled for S/390 Special notices 86 S/390 PID ThinkPad Enabled for S/390 IBM Redbooks How to get IBM RedbooksReferenced Web sites Other resourcesIBM Redbooks collections Index Pipe Port Power control Terminal logo Terminal Solicitor 16, 18, 31, 39, 65 92 S/390 PID ThinkPad Enabled for S/390 Partners in Development ThinkPad Enabled for S/390 Page Page System setup AD CD-ROM use System operation ThinkPad Enabled for S/390