IBM s/390 manual Vmstat command

Page 50

The key principle is that the Linux system should not be forced to page when running S/390 emulation. Linux might perform considerable paging when getting started, but once a S/390 instance is started and the system working set is established, the average Linux paging rate should be close to zero. (S/390 operating systems running in the emulated S/390 might have much higher paging rates; this is not the point at issue here.) This almost always means that the ThinkPad real memory must be considerably larger than the emulated real memory of all the S/390 instances that are active at any one time.

In principle, the Linux memory needed to emulate a S/390 is “just” virtual memory to Linux and might exist in a much smaller real memory used by Linux. In practice, this does not work well. Your ThinkPad should have enough memory so that all the S/390 requirements (memsize + essize + cachesize*11 + DASD cache) fit in your real ThinkPad memory, without requiring Linux paging. If you assume 100 MB for Linux, FLEX-ES programs, TCP/IP operation, and so forth, then the 512 MB ThinkPad in our examples might be used as follows:

Rough guess for Linux, FLEX-ES, etc

100

MB

S/390 memsize

256

MB

S/390 essize

64

MB

FLEX-ES instruction cache * 11

22

MB

default DASD cache for 10 volumes (approx)

10

MB

 

--------

 

462

MB

This leaves a reasonable margin in a 512 MB system. The 100 MB for Linux is just a guess. The working sets (as seen by Linux) of the emulated S/390 memory (central and expanded), the FLEX-ES instruction cache, and most of the DASD cache will normally be their full sizes.

The working set of Linux itself and its many system processes are much harder to determine.

5.4.1 The vmstat command

The traditional UNIX command for monitoring swapping3 rates, sar, is not available in base Linux distributions. The vmstat command can be used instead. For example, the command vmstat 10 2 means to run vmstat with 10 seconds between reports and quit after 2 reports.

# vmstat 10 2

 

 

 

 

 

 

 

 

 

 

 

 

 

procs

 

 

 

memory

swap

 

io

system

 

 

cpu

r

b

w

swpd

free

buff

cache

si

so

bi

bo

in

cs

us

sy

id

0

0

0

0

329156

28768

70156

0

0

4

1

105

196

1

0

99

0

0

0

0

329156

28768

70156

0

0

0

0

105

196

1

0

99

You should refer to your Linux documentation or man listings for more complete information about vmstat. Very briefly, the key fields are documented as:

￿Procs

r: number of processes waiting for CPU time

b: number of processes in uninterruptable sleep

w: number of processes swapped out but otherwise runnable

￿Memory

swpd: the amount of virtual memory used (in the swap file) (kB)

free: the amount of idle memory (kB)

buff: the amount of memory used as buffers (kB)

￿Swap

si: amount of memory swapped in from disk (kB/s)

so: amount of memory swapped out to disk (kB/s)

￿IO

bi: blocks sent received from a block device (blocks/s)

3In S/390 terms, we would say paging rates. In older contexts, swapping has a different meaning than paging. In modern Linux systems, swapping appears to have exactly the same meaning as paging.

40S/390 PID: ThinkPad Enabled for S/390

Image 50
Contents ThinkPad Enabled for S/390 Bill OgdenPage International Technical Support Organization First Edition October Contents Shutting down Index Vi S/390 PID ThinkPad Enabled for S/390 Special notice AuthorIBM trademarks Comments welcomeIntroduction Purpose of this redbook ThinkPad/EFS systemsFLEX-ES Linux Positioning with other small S/390sThinkPad/EFS hardware used Terminology System and Linux installation Disk planningDifferences Partition Manually Partition Linux installationThinkPad Mount Point Device Requested Actual Type Purpose255.255.255.0 Device Partition Type Default Boot12.17.210 12.17.150Gnome Select Start X automatically Installation notesMonitor Setup IBM 9513 T55A TFT No clock chip 24 bit # df -h# kill -s USR1 pidnumber PID number for xinetd Etc/xinetd.d # vi telnet# ps -ef grep xinetd 14 S/390 PID ThinkPad Enabled for S/390 FLEX-ES and OS/390 installation FLEX-ES Brief introductionPC Processor in ThinkPad Page Installation Installing the FLEX-ES license key AD systems OS/390 AD systemsNext steps # mkdir /s3912 OS/390 on CD-ROM Basic CD-ROM formats3 OS/390 device configuration FLEX-ES formatsAn unzip program Installation tasksUnzipping and installing Awsckd CD-ROM files Mount /dev/cdrom /mnt/cdromMinor problems File ownershipVolume in two separate zip files Files unzip in wrong orderFLEX-ES Operation FLEX-ES system and resource definitions Comments# resadm -s R10A.rescf Building a shell script$ cd /usr/flexes/rundir $ resadm -r$ sh shos Flexes ipl a80 0a82cs =stor IPL OS/390Terminal Solicitor 11.42.47 Operation and useUser terminal connection A80,8System performance monitors Linux TN3270Iodf requirements Rmf5 TCP/IP for OS/390 # resadm -k Shutting down# resadm -T # exit36 S/390 PID ThinkPad Enabled for S/390 Additional Topics Basic debugging Server memory Operating Systems Messages consoleSecurity Vmstat command Importance of Linux swapping CPU# cat /proc/partitions Using a second Linux hard diskUltrabay Second disk planning Device Volser Addr Use Disk layout AD systemPartition Mount Size Use FLEX-ES FakeTape on OS/390 Alternative method560 222222Multi-system setup $ x3270 -model 3 -keymap pc -port tn3270 localhostt91f X3270 client$ x3270 -model 3 -keymap pc -port tn3270 localhost Function Keys Used# vi # cd /usr/lib/X11/app-defaults # cp X3270 X3270oldRemote resources Disk caches System BWrites Cache Hits Tuning cachesize FSI Channel AdaptersDisk fragmentation Backup and restore considerationsScsi adapter for the ThinkPad Using tar to back up S/390 volumes $ tar -cvzf /holding/OS39RA.tarz /s390/OS39RAUsing tar and ftp $ cd /usr/flexes/rundir $ sh buOS39RAc16 S/390 identification CD-RW driveDisplay PSW and registers RAS discussionVerify ckd disk Linux windowsInstalling FLEX-ES upgrades ThinkPad power controlUseful Linux commands Common commandsMultiple consoles, sessions, screens Text editors62 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 Appendix A. FLEX-ES definition listings Basic definitions for a single HDDShell script for a single HDD Definitions for two HDDs Shell script for two HDDs Appendix B. FLEX-ES parameters System definitionsCpu0 Cpu1 Cpu2 Resource definitions Emulated control unit typesEmulated device types Typical resource definitionsCKD disk resources Terminal resources Tape resources LAN resourcesCloned devices Resadm command Common rulesCLI commands 560 Home/tape3 Flexes mount A90 S390/WORK01710 Altcons 84 S/390 PID ThinkPad Enabled for S/390 Special notices 86 S/390 PID ThinkPad Enabled for S/390 Referenced Web sites How to get IBM RedbooksIBM Redbooks 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 ThinkPad Enabled for S/390 System setup AD CD-ROM use System operation