PAUL SCHERRER INSTITUT

EPICS COLLABORATION MEETING 7-10 MAY, 2001 PAUL SCHERRER INSTITUTE SWITZERLAND

LINUX AS A CONSOLE

COLIN HIGGS SLS COMPUTING AND CONTROLS PAUL SCHERRER INSTITUTE

˜/infrastructure/EPICS-talk.tex 9 May 2001 1 PAUL SCHERRER INSTITUT

From the SLS Handbook (Chapter 8: Computing and Controls)

Software Architecture Some of the primary criteria that must be considered are

Performance: judged on real-time response as well as throughput considerations

Flexibility: the ease with which it is possible to modify software, add new functionality and how well it can adapt to changing requirements

Scalability: the ability for the system to grow in terms of – number of control points – number of nodes in the system

Robustness: tolerance to errors from – users – software developers – hardware – software

Openness: – the adherance to standards – the ability to interface easily (and without performance degradation) to other software packages (including commercial software)

˜/infrastructure/EPICS-talk.tex 9 May 2001 2 PAUL SCHERRER INSTITUT

From the SLS Handbook (Chapter 8: Computing and Controls)

Control Room

The accelerators of the SLS complex will all be controlled from a single central control room. This control room will house the operator stations from which it will be possible to control all aspects of machine operation. Three consoles will be provided, in order to be able to carry out machine development in parallel with normal machine operation. Consoles will not be dedicated to one task or accelerator. All consoles will have the same facilities. There will be no specialized hardware or software installed on just one console. Consoles will each have three display monitors (multi-headed), sharing a mouse and keyboard to avoid .... one program window hidden under another. General program development will be discouraged in the control room. The control room will be equipped with a number of large fixed displays showing critical machine status and parameters. These will be mounted high on the front wall so that they can be viewed from any console.

˜/infrastructure/EPICS-talk.tex 9 May 2001 3 PAUL SCHERRER INSTITUT

Investment Costs

CHF 159 million granted by the Swiss Federation during a four year construction period. Financing will be covered completely by resources included in the 1997 estimates and in the financial plans of the National Financial Administration and the ETH domain. The project will therefore not further burden the Swiss budget. Operating Costs

CHF 23 million annually will be financed from the start of operations out of the ordinary resources of PSI. These costs will be borne internally by PSI by reallocating funds.

˜/infrastructure/EPICS-talk.tex 9 May 2001 4 PAUL SCHERRER INSTITUT

The Choice of an Operating System The Choice of a Control System

The criteria for both were much the same

performance flexibility, scalibility robustness, openness

Some of the choices:

Unix (AIX, Solaris, HP UX, IRIX, Digital Unix, Linux,...) Windows 95, 98, NT, ME, CE, 2000, XP,...... Mac OS OpenVMS

LEP Control System (HP Unix) PS Cern (VMS Unix) SLAC (VMS Unix) APS (EPICS with Solaris) Jefferson (EPICS with HP Unix)

The control system / operating system had to be:

Unix-like (to blend-in with the general user community) cheap (the SLS has a very tight budget) not require special hardware (see above!) not require special software (ditto)

The decision: Operating System Red Hat Linux 5.2 Control System EPICS Release 3.13.0.beta 12 Hardware Pentium PCs

˜/infrastructure/EPICS-talk.tex 9 May 2001 5 PAUL SCHERRER INSTITUT

The Original SLS Console

4 computers each with

Linux Red Hat 5.2 1 x 450 MHz Pentium III 512 Mb RAM 9 Gb SCSI disk 1 mouse

1 keyboard

4 single screens configured at 1280 1024

(85 Hz refresh)

X-server from Accelerated-X 5.0.3 from X ¡ Graphics

1 graphic card: single slot Jeronimo Pro 4x8Mb PCI

˜/infrastructure/EPICS-talk.tex 9 May 2001 6 PAUL SCHERRER INSTITUT

Physically the screens were

But logically the screens were

We had a

good resolution (1280 1024) and a good refresh rate (85 Hz) and applications could be started from any screen But ...

Each screen was “stand-alone” Applications once started could not be moved to another screen Navigation with the mouse was confusing There was some “latency” when many (20+) windows were open

˜/infrastructure/EPICS-talk.tex 9 May 2001 7 PAUL SCHERRER INSTITUT

And then along came XFree86 Version 4 ....

Now we could have Xinerama mode !!

˜/infrastructure/EPICS-talk.tex 9 May 2001 8 PAUL SCHERRER INSTITUT

X-Server Benchmark Tests

A series of comparison calculations was first performed. Tasks to be addressed included:

The Accelerated-X server 5.0.3 vs. the XFree86 4.0.1 server with (private) patch The Appian Jeronimo Pro card vs. multiple cards A single CPU system vs. a dual-CPU system For each available combination of hardware, a constant X performance test (version 1.5) was performed. This test was first executed on an idle machine, and then repeated on a fully-loaded computer. The various configurations are shown below. The patch used in the XFree86 4.0.1 test was specific to the cases involving the Jeronimo Pro card. This patch has already found its way into the 4.0.2 official XFree release. Hardware

1 Appian Jeronimo Pro 4x8Mb (PCI) 3 PCI 8 Mb SDRAM 1 Matrox G400 AGP 16 Mb SDRAM Single CPU 450 MHz Pentium III processor with 512 Mb RAM Dual CPU 500 MHz Pentium III processor with 512 Mb RAM Red Hat LINUX 6.2 X-server

Accelerated-X 5.0.3 XFree86 4.0.1 with patch

˜/infrastructure/EPICS-talk.tex 9 May 2001 9 PAUL SCHERRER INSTITUT

CPU intensive test The computer was loaded with a simple repetitive task.

The job looked like this:

#!/bin/bash while true do echo "2ˆ50000/1.99ˆ50000" | bc & echo "2ˆ50000/1.99ˆ50000" | bc & echo "2ˆ50000/1.99ˆ50000" | bc & echo "2ˆ50000/1.99ˆ50000" | bc & echo "2ˆ50000/1.99ˆ50000" | bc done

X11 test A short X11 performance test (version 1.5) was performed and the timings recorded.

The job looked like this:

#!/bin/bash # \rm slsxtest.log date > slsxtest.log x11perf -srect1 1> slsxtest.log date >> slsxtest.log

˜/infrastructure/EPICS-talk.tex 9 May 2001 10 PAUL SCHERRER INSTITUT t OK OK ama ama star to — Xiner Xiner 112% 141% 11540 11528 20786 15235 w sessions sessions screens screens 4 4 slo x x session/screen session/screen 3 4 2x2 2x2 1 1 Matro Matro x x seconds) 4 4 OK OK (in updated singles singles 106% 117% updated 10826 10665 17202 14441 sessions sessions results 4 4 screens screens not 3 4 4 session/screen session/screen 3 3 1 The 1 1 ree86 ree86 XF XF t ecuted. OK x ama ama e star to — updated ere 95% Xiner Xiner 106% 10284 10190 15627 12910 w sessions sessions w screens 4 4 slo session/screen session/screen 4 none 2x2 2x2 Pro Pro 1 1 calculations OK OK Jeronimo Jeronimo w — slo 94% timing singles singles 102% 10212 10250 15057 12809 sessions sessions 4 4 screens screens 4 4 session/screen session/screen 4 2 1 1 ations OK configur Pro Pro w ated-X ated-X — — slo singles singles 100% 100% 10239 10615 14757 13643 sessions sessions 4 4 screens 4 4 session/screen session/screen Jeronimo Jeronimo 2 Acceler Acceler 1 1 . w orementioned af belo test test PIII PIII the of load load load load RAM RAM BPM BPM ulated MHz MHz load load full full Mb Mb each tab CPU CPU CPU CPU or Results F 1x450 512 no full MEDM with CPU 2x500 512 no full MEDM with CPU are

˜/infrastructure/EPICS-talk.tex 9 May 2001 11 PAUL SCHERRER INSTITUT

Conclusions I From the above results, we can deduce the following conclusions

In single-screen mode: – Both X-servers, (Accelerated-X and XFree86 4.0.1), deliver approximately the same performance, irrespective of whether multiple Matrox cards or a single Jeronimo Pro card were used. – In each case, the multiple Matrox solution was slower than the corresponding Jeronimo Pro solution.

In Xinerama mode: (one logical screen displayed over 4 physical screens) – The Accelerated-X server did not support Xinerama mode. – For the multiple Matrox solution, Xinerama mode resulted in a time penalty of 5% to 20% compared with the single screen mode option. – For the Jeromino Pro solution, Xinerama mode resulted in a time penalty of 1% to 4% compared with the single screen mode option. – However the multiple Matrox solution in Xinerama mode was 20-35% slower than the corresponding Jeronimo Pro solution. To this end the Jeronimo Pro solution appeared to be the preferred solution and was therefore implemented in the Control Room. The card also supported video.

˜/infrastructure/EPICS-talk.tex 9 May 2001 12 PAUL SCHERRER INSTITUT

But ... under “real working conditions” other considerations came into play.

The graphics driver glint drv.o for the Jeronimo Pro card at

present only supports a refresh rate of 60 Hz at 1280 1024 pixels. A refresh rate of 75 Hz was obtained at a screen resolution of 1152 x 870, but the Operators didn’t like this either. In a future release of the XFree86 software, this deficiency will be removed.

Conclusions II So the Jeronimo Pro cards were replaced with multiple Matrox

cards.

At a screen resolution of 1280 1024 the Matrox cards gave an 85Hz refresh rate. If in the future a video signal needs to be displayed, other Matrox cards will be required. Or we await a future release of XFree86 4.x.x

˜/infrastructure/EPICS-talk.tex 9 May 2001 13 PAUL SCHERRER INSTITUT

˜/infrastructure/EPICS-talk.tex 9 May 2001 14 PAUL SCHERRER INSTITUT

0

6

8

6 . 0 . L . 1 i

0

9 g n

8 u

t f

u l

b h A

4

5 M . ^ t 4 f c

u l

u d

Z a n 0 ) w u 0 4 r

3 x

M e

^ g t 0 f

u l

4 u

Z b n x e t 0 ü u m 5 ä r

l r i r r a n u h e t e k c z c k ( t a s

0 e t s

c - e G u c l x s d

u i l

a s 4 N r C i o a -

h T P B M D B g V

w U x x x x x x

S n a

t 2 S 2 2 2 U 1 1 u ) r n t h 0 h c 0 E S c 1 e s x r i t 0 p 5 s g 2 ( e n

B u 2 0 3 3 -

h 7 2

n c

e a l

h w

r a

r e

t

b

S ü

g l n e

u n

l e m a r t ) i x

k P

ä h 2 o r

c h c i 3 c s b e 4

4 u

d . T

l 3 w i , o G

t b

0 n T B 5

t - ' ' o

i '

n '

d

n

a

w

n

o 6

e t

e 1 B

0 4 . 5 5 3 n S d 1 E 1 H m

K (

9 9 . 4 S x x a

l s 1 P 3

e

b

6

2

5 u 1 l 8 ° 6 u 1 p o r h s o c

0

2 K S n o 0 4 K 0 3

l

z

t M z

^

t

z l

e

t

z a

e

t n o

e N

a

e

N k

N s N g n

n r u t

o s

k ü

l r t m

a B - l e

b i

t e r k

h c e l

c o a

u S 2 9 3 3

l n o G 3 3 3 3

F 7 1 5 5 m o o u a r 0 0 l l 3 9 . . 3 2 o

r + + t C R n m x e t e r B o B t t r h f i e 9 o h F R c r u l K c u ü t u t u h r b e t l t e e o l l

0 h l e F l c c e d a s u d b n l t s n e 2 o F u e P o s d P l a s C i n a n T P B M K

o x x x x x

1 K 1 3 1 1 n o k l a b t h c u l F

z

z

z

t z

t

t

t

e

e

e

e

N

N

N

N

)

4

0

2

x

k

0

n

6

-

a

x

r

h

2

h

c

0

e

c 1 o

t

f (

u

k l s u

Z H

r

n

)

0 ä

s 0

0 1 2 2

9 r 2 . e 2 s

2 h

m

+

o x c

v

4

s

h

8 5 . 2 5 5 3 5 2

l

4 o l r

c

x

e

0 9 . 2

0 s t s o

s s

2 e s s o

e

l

i o

h

a 1 n

c

h m

a ( 0

s

k c

u

t

g e f 0 3

s e

u . a l 2 r

e u g .

3 l

r Z l r

S R

g

6 B r o

e + r e b t + t f e b u n l O u

o O . Z

K . b 1 2 O

. 1

t f u l b A

m

l

a

n

a

k t

u f

u

l

u

Z

a l

a

n n

a e

r k

d t f o

l

u l b

l b e l

A t f p l u h p c

s o r i F D

o t

ä

r e

r

g

s g

t n

u

t

f

ü L n o K

s s i r e i r e d l a G n t t u i r n h c G S

˜/infrastructure/EPICS-talk.tex 9 May 2001 15