An Experimental Study and Optimization of Operating Systems

An Experimental Study and Optimization of Operating Systems

AN EXPERIMENTAL STUDY AND O P T I t l I Z A T I O N OF OPERATING SYSTEMS 0. I. Aven, N.:i.Gurin, Ya.n. ;.O~LLT ad !i.B. Lei~~an I r ~ s t i t u ...

881KB Sizes 42 Downloads 97 Views

AN EXPERIMENTAL STUDY AND O P T I t l I Z A T I O N OF OPERATING SYSTEMS

0. I. Aven, N.:i.Gurin,

Ya.n.

;.O~LLT

ad !i.B.

Lei~~an

I r ~ s t i t u t eof 2oncroi Ccierlces Eoscovl, USSR

ABSTRACT This paper i s devoted t o experimental study of o p e r a t i n g systems through sof Ware measurements. The b a s i c s t a g e s of experimental s t u d i e s a r e considered. Software monitor ATOM which i s f l e x i b l e measurement t o o l t o o b t a i n d e t a i l e d d a t a on the a c t u a l computer system performance i s described. The ATOM i s used t o study en ICL Srstem 4-70 J - l e v e l d i s k o p e r a t i n g system with t h e use of programs a c t i v i t y t r a c e and input/output t r a c e . The b o t t l e n e c k s of t h e system and v a r i o u s w a y s of t u n i n g and optimization a r e studied.

t i n g system " under normal load. A special software monitor ATOM was developed t o c a r r y o u t t h e measurements. The main r e s u l t s include : (1) Supervisor a c t i v i t y a n a l y s i s , ( 2 ) system programs act;ivity a n a l y s i s ,

(3) system f i l e s a l l o c a t i o n problem and (4) improvement of system f i l e a c c e s s

EXPXRIMEXTTALENVIXC~NIVZENT

The configuration of the ICL Eystorn 4-70 includes : a c e n t r a l processor, 3b4K bytes of main memory, 4 x 7.25 M b y t e s r e INTRODUCTION placeable a i s k d r i v e s ( s i m i l a r t o In..: 2 3 1 1 ) The e f f i c i e n c y of complex computer sy.>tems on one channel, 5 x 29.2 K b y t e s re?lazeable d i s k d r i v e s ( s i m i l a r t o IBM 2314) on depends on an enormous n w b e r of v a r i a b l e s r a n ~ i n gfrom hardware p o t e n t i a l to software the o t h e r channel, 6 tape d r i v e s , t e r z i n a l s ( t e l e p r i n t e r s and d i s p l a y s ) and v a r i o u s 1 / 0 a l d o r i t h n s to l a b o r p r o d u c t i v i t y . The opera t i o n of co iputers can be analyzed in a num- devices. The r e s o l u t i o n of t h e system timer i s in microsecond range. b e r of ways including a n a l y t i c a l models,
:

This paper r e p o r t s on an experimental study of t h e ICL :;ysc;em 4-70 J-level d i s k opera-

Measurement-based experimental study o f ceaputer 2ysterps deals with the cathering

,

p m m n t a t i o n md i n t e r p r e t a t i o n of d a t a on actual computer sjstem performance.

-

Data GatherThere severalkinds Of measurement f o r d a t a gathering: hardware monitors, -sampling type software monitors, t r a c i n g type sof Ware monitors (of en r e f e r r e d t o as event-recording monitors).

-

tracing

tme

softwaFa

des-

in this is a measurement t o o l and does n o t r e q u i r e modificOperating 'rstem* To reduce ation Of t h e overheads the t r a c e s of only most imp o r t a n t processes a r e recorded.

AH AUTONOMOUS TRACELORIENTED MONITOR

In Autonomous Trace-Oriented Monitor ,ATOM, i s a powerful and f l e x i b l e t o o l of software measurements. It does n o t r e q u i r e modi f i c a t i o n of the operating system; the mani t o r i s l i n k e d t o t h e o e r a t i n g system by the binding technique < 3]P. ATOM

.pig.,

of a measuring

aria

control s e c t i o n s . The former includes measwing procedures collect the desired data. The c o n t r o i s e c t i o n i s comprized of routines to bind aria to unbind the meas=ing procedures and the operating system, t o perform data bcrffering and input,output operations, t o communicate with o p e r a t o r , etc.

Data Repre s e n t a t i o n S t a t i s t i c a l processing of l a r g e a ~ ~ ~ofn t The s monitor is entered into the system as a d a t a i s a p r e r e q u i s i t e of e f f e c t i v e U r s - usual job. During the time is. The d a t a may be represented as : it o b t a i n s the supervisory s t a t u s and binds formatted l i ~ t k of o buurce a a t a , t r a c e u , the measuring and the operating e t c . over c e r t a i n p e r i o d s , system i n s p e c i f i e d measuring points. Meassimple s t a t i s t i c a l r e p r e s e n t a t i o n s such uring procedures gather the needed infomaa s means, variances and hystograms, t i o n u n t i l reaching a s p e c i f i e d amount of time-oriented displays. information o r u n t i l an o p e r a t o r ' s intervention. Then the monitor unbinds the measurMore methods are needed, however, ingprocedures and the operating system and f o r a n a l y s i s of i n t e r r e l a t i o n s between corn- terminates the p u t e r system elements. In t h i s paper cer-

-

-

-

tdn such a s "state-to-state s t a t e s ' ' and others.

be used

t r a n s i t i o n s " ,Itmean

ATOM's specific features and advantages a r e : system need not be modified, - the - the monitor i s bound t o the operating syst e n during the system's operation, - f l e x i b i l i t y i n s e l e c t i o n of measuring

Data Analysis and InterSimple techniques such a s "looking on the points, data" a r e u s e f u l f o r preliminary estimation ease of deletion, addition and altering and f o r n u l a t i o n of hypotheses. Common s t a t - the procedures, i s t i c a l nethods such a s r e g r e s s i o n ana corease of implementation and r e l a t i o n a n a l y s i s c m be employea t o unrave l the r e l z t i o n s between c e r t a i n parameters pROGHMdS ACTIVITY AfiAiYSIS anc f o r f o r e c a s t i n g the e f f e c t of changing one of them on the o t h e r s . The d a t a collec- hograms activity permits:determte6 can be used to the 'jstem Or i n a t i o n of F r o g r m a * needs i n s y s t e a resouri t s versions. ces; identification o f she most loaded re,-

-

-

.

o u r c e s and :nail1 consumers of t h e r e s o u r c e , ; i d e n t i f i c a t i o n 9f t h e r e a s o n s f o r i n e f f e c t i v e use o f t h e r e a c ~ u - c e s ; s e l e c t i o nof n o a t s u i t a b l e a l s o r i t h m s f o r p r o g r a x :;cIied-ding and e f f e c t i v e l e v e l of l n u l t i r r ~grazuning. I n our case the a n d y s i , leliec: cn progran a c t i v i t y t r a c e which z c n t s i n s the d a t a nece s s a y t o answer the questions posed.

program car, oe i n t h e f o ~ l o w i n g, t s t e s : E x e c u t i o n , Beaay, d a i t a,;a I n a c t i v e . The f i r s t t h r e e s t a t e s a e r;nonn a d a c c i v e . Reaay i, a a s o c i a t e u w i t h t h e lpr , c e s s o r 8s w a i Ling a!?(:h 3 i t ili31lo i t a t a e s e t of w a i t c o n L L L ~ o n , sucr. :s in,,u',iout*rdt t a r m i n a t i o n , exclusive c o i ~ t r o l,per ator r e p l y , etc.

resiaent ovei-iay S u p r r v i . - o r r c u t i n a ( p d e n o t e s t h e <,VC nudosr of r o r ? i ~ n e ) . C i x r e s i c a n t rout,ir:e.,

ax

2,212

..;e;c.

:I ;dr

r',

of c a s e s ulc cue 01' ~ 5 e zi i ~ c c c . . ~i..e j~!j ., of c a s e s . On she o t k ~ e rban? s i x out. o _ ixt e e n ~ e ~ i a e rnot l t i n e c are ~ ) r a c ; i c a ~ i"ot y a c z e ~ o e ca t a l l . Loader ( r o u t i n e 43) ha, t h e h i g k e s t a.:1 Lvi',,' p e r i o a , a b o u t 3G,% of t h e o b s e r v a t i o r , ~,i.;.\;. (Loader i s a s e r i a l l y r o u t i n e < m d serve._ b o t h t h e S u p e r v i s o r anu t h e p r u i ~ l e mpro,.z'ams). \ 4 a i t i n g f o r Z ~ ~ d e r r' ae l e s ~ eta.;.~ . i ! ~ o u t 30,i of S ~ p e r v i s o r ' so v e r i v p e r i o c ( s e e 'Table 3 ) . T h i s l e a d s t o tkt. c:mc?u=ion t h a t Loader i s one of t h e b o t t l e n e c k s i n t h e system anu ao Z o a c s r s ~ o u l dbe mane r t - n t e rable.

If ::+(pi i d t h e s t a t e of program p a t time Tile f r e q u e n c y of acces,e. anu a c t i v i t y pel.t , t h e n t h e v e c t o r :t = ( S t ( p ) ) p e P i s t h e s c a - i o d j of o v e r l a y s carl oe u s e u t o iliake .;.:ic t e of p o s r a m ~f r 3 : n t h e . j e t P a t ;ime t . Tha ?race of t h e cecco:- St i s r e f e r r e a t o as t h e programs a c t i v i t y trace,PAT.

3f

ine

thdm r e s i u e n t , e.:,. i n t h i s system raoi t 53 ~iiioulu be .ciaae ?.e..i.cient.

Le1t:ction of t h e n u ~ b c rci ':~?aervi:or 0;: ra l y a r e a s i s an i m 2 o r t a n t yuo;tic>n. h!:ai; i n t e r r u p t s , a change v e c t o r n.qr;=s t St - ~ t i s of t h e t r a c e h a s shown t h a t t h e six j : c o u l d be i n t r o d u c e d where ~t i s t h e i n t e r - tco many f o r the nu;iiber c:' overoly .3.:.5.: v a l between t h e i n t e r r u p t s . The t r a c e o f gi::ieratec i n c:?e sy2Lem. FIFO i : n:.? ,.ai:,e n St i s r e f e r r e a t o as t h e Rro@a'ms a c t i v - s a t i s f a c t o r y a s o v e r l a y s rtialaccment a l z o Because

st c a n c h a n g i

i t - value> only a t

-

i t y change t r a c e , PACT. If the i n i t i a l s t a t e So i s f i x e d , t h e n PACT i s e q - i v a i e n t t b PAT. GO R e c o r d i n g PACT i r i v t e a a of P.44 ne.., pro:::(; be z s l i c c e s s f u l method. Fol' L:~c. i;g::te::i im-

c e r s t u d y t h e c o n t i n u o u s ob;orvation i n t s r v a l (axe a r i w e t i c t a p e ) m o ~ ? c sts cevcn o r n i g h t !lows ( w i t h an i n t e r r u p t r ? t e of abo u t 100 p e r s e c o n d ) when PACT i . 5 r e c o r d e d . When PAT i s r e c o r a e a t h e whole t a p ? i s f i l l e a within a a c r e

:u p e r v i

15 t?zougn 20 a i n u t e s .

-

Si;r?,, atior,hss that; more eff re21acLme.,w aitSorithns would reor;ce the r::~:,b;r of o i r c r l a y r , ; , e a . ~t o t h r e e o r f o u r . ...,L

+iJ.2

Andi,y:;i; o.f .:y.;te.r: PT..;r J.!!:~ ':able ohcws t 2 c ;:iilies ::-

+

:

-i;ie a c t i v -

, a::,,

i t y p e r i s a s f o r some ; t a t e . , s?, for L x p m : ~ ' : e a o z r / I n t e r p r e C,?r;, , Pt . ' r l ::t (Output- :,:.iter,, Trisi3 i.yjterr! (2E., +. 3r1 C3m?ilers,I,inK :lrx 2,ditor) md ,.:, neouisr. a,7t Lac f i , - s - t t h r e a F r o g r a n s a r e r c , i c e n t in

thi.. system m c I - c n e d u l e r i; l o a d e s z - r e -

A n a l g ~si

T a b l e s 1 mid 2 snow t h e f r e q u e n c i e s ?/ ( p ) L/ =a r e l a t i v e a z t l v i t y p e r i o d s @ i p ) f o r

.:c::ecl~ier

a c t 1 ; l i t y p e r i o d anolmta yo

9.2

of the cbservation time with about I@& taf i l e s a f i l e - t o - f i l e t r a n s i t i o n matrix i s ken by waiting Tor Loader's release.Schedu1- used. Fig.2 shows a graph of strong connece r makes intensive use of ~upervisor,which t i o n s between system f i l e s ,which i s based on one of such matrices. The t r v l s i t i o n mnttakes over liO.,o of the a c t i v i t y peri0d.A more d e t a i l e d analysis revealed t h a t if the r i x i s the source material f o r the n l g o r i t h most 9sed Supervisor zoutines were reenter- determining the optimal a l l o c a t i o n of system f i l e s on disks. Optimization of f i l e alioable t h i s f r a c t i o n would be reduced. cation signifj.cantly reduces the seek t i n e Expand and Polprint make useful work only ( by a f a c t o r of 7 through 10 f o r c e r t a i n 30A and 70% of i t s activi'itj periodo. The files) I/O-bound nature of system programs iot1ic:it e s t h a t optimization of 1/0 processes Two-Level Access t o System F i l e s , would significemtly increase i t s chnrscter- An 1/0 t r a c e was used f o r simulating a twoistics. l e v e l access t o system f i l e s . A buffer pool of several buffers of one disk track capacIt was found t h a t w i t ? : the exception of the i t y i s reserved i n core memory of the syyabove three system propams an average of tem. I f a requested block i s not in the 1.4 user programs are active during the pool the t r a c k containing i t i s pulled ini d l e t i n e a d , in one half of all cases,on- t o a buffer as in virtual memory. Fig. 3 i s 1y one program i s active. T h i s i s caused b r a p l o t of the number of disk accesses veri n s u f f i c i e n t s i z e o f the core memory f o r sus buffer pool size. Six b u f f e r s halve t h e the program 1.oading. number of disk accesses and t o t a l 1/0 t i n e .

.

CONCLUSIONS Analysis of the pro@gramsa c t i v i t y ha; shown the e f f e c t of the execution time of the I / O operations on the t o t a l operating system run time. A d e t a i l e d study was undertaken t o i d e n t i f y the I / O bottlenecks and optimize the 1/0 system. The raw material f o r the s t u Q was an 1/0 t r a c e obtained with the aid of ATOM f o r d i r e c t access devices. Some r e s u l t s of in2utioutput ana-

are given. System F i l e s Allocation. A s i g n i f i c a n t f r a c t i o n (30-50s on the ave-

rage) of access time f o r system f i l e s on head ~ovementdisks i s taken by the seek time. This time i s heavily dependent on f i l e a l l o c a t i o n on disks. The concurrently used f i l e s should be on separate volumes t o reduce the head movements. To determine the s t r u c t u r e of ccnnections between system

A trace-oriented ATOM software monitor i s

a powerful t o o l t o study computer systems. Programs a c t i v i t y t r a c e and Fnj?u%/output t r a c e give exhaustive data on the a c t i v i t y of the operating systea and input/output a c t i v i t y . The sampies of data obtained perm i t detection of bottlenecks i n the operat i n g system and t'aning the system parameters.

s i g n i f i c a n t l y improved i t s perfornance.The comparative a n a l p i s proved t h a t the systen throughput was increased by 25%. REFE3UANCS

1. Miller E.F., "Bibliography on Techniques of Computer Performance Analysis", Computer, Vo1.5, No.5, 1972.

Disc Operating System, Vols 1. 2 , ICL I???.

2 . J-Level

3 . Gurin N.N.,

Dashko V.E., Kogan Ta.A., Leman A . A . , "An I n v e s t i g a t i o n of t h e I n t e r a c t i o n of an Operating System p i t h Magnetic-Eisk Memory", Automat. Rein. Contr., Vol.35, No.2, B . 2 , 1974. Control

4. Aven O . I . , Arlazarov V.L., Gurin N.N., Dashko V.B., Kogan Ya.A., Leman A.A. "Operating Systems Dynamics", i n : Proc.

fl

Symp. on Theoretical and System Programming, Vol .I , Kishinev, 1974 in Russian Table 2

Fig.1 ATOM s t r u c t u r e : flow,

-+

control flow.

OUT

R

E

-E ,L,1-

SYS SY S

PHRCWK PHR 'CWK

SYSXEC

Fig.2,Colaecfiocs between system f i l e s . PF S I CFNT

Table 3

Table 4 S

EXPAND

FOLPRINT

TFIP1.S

SCHEflULEP

0 I Fit393

2

3

4 5

5 7

BmWR POOL SIZE

8

9

I0