# Presentation: 824596

## Evolution of the CERN printing service

- Ignacio Reguero, Sam Lown
- October 2002

- PS/Unix Infrastructure Section
- IT Division, CERN

## Outline

- Description of the Printing System
- Before, After
- Upgrade Process
- Hardware, Software
- Manageability
- Configuration
- Accounting
- The Future

## System Description

- CERN Print service:
- ~ 1180 network printers
- ~ 1400 total queues
- Including trays and remote printers
- Statistics based on current System:
- 17,000 jobs per day
- 14Gb spooled per day
- 70,000 to 100,000 Pages per day

## System Description – Before

- PRINT1

- PRINT2

**Printer Server Back-end**

**DNS Server**

- Server IP

- Printer
- Name

- PRINT3

**Web Server**

- Accounting Summary

- Unix/Linux

- MS Windows

**Clients**

- TCP/IP

- AppleTalk

- LPR
- (RFC1179)

## System Description – Before

**LPRng**

**Apsfilter**

- Determine Model

- APS config
- for Printer

- Papif

- CTH-ifhp

- Phaserif

- if (model =~ /hp2500/) {
-   if (opt_Q =~ /A3/) {
-     opt_Z = “a3,inupper”;
-   } ......
- } .....

- Determine Output
- Filter Options

- Determine CommProg

- Add Options to
- Output Filter

- Convert to PostScript

- commprog
-   = commprog.” -Z”.opt_Z;

## System Description – Before

- Characteristics
- Centralised
- All clients talk to the same server rather than each client trying to access the printer directly (No collisions)
- High Reliability
- No single points of failure
- Unified
- All clients access servers using standard protocols

## System Description – Before

- Problems
- Limited Tray Support
- Printer trays are hard-programmed
- Lacks new LPRng IFHP features
- Limited Scaleability
- Scripts for each new printer must be run on EACH serveri.e. More Servers = More Work
- De-Synchronisation
- Each server may contain different configurations
- Limited Accounting

## System Description – After

- PRINT1

- PRINT2

**Printer Server Back-end**

**DNS Server**

- Server IP

- Printer
- Name

- PRINT *n*

- ...

**Web Server**

**DBMS**
- (oracle)

- Accounting

- Unix/Linux

- MS Windows

**Clients**

- TCP/IP

- AppleTalk

- LPR
- (RFC1179)

- Configuration

- Configuration

- Accounting

- Printer -> Server
- Mappings

## System Description – After

**LPRng**

**Apsfilter**

- Add Model

- APS config
- for Printer

- Netatalk

- LPRng IFHP

- commprog
-    .= “ -Tmodel=hp2500cm”;
- opt_z
-    .= “inupper,a4”;

- Add Tray Options
- (opt_z)

- Determine CommProg

- Add Options to
- Output Filter

- Convert to PostScript

- commprog
-   = commprog.“ -Z”.opt_Z;

## System Description – After

- Characteristics
- Centralised Configuration
- Always synchronised
- New IFHP features used
- Better Tray Support
- Improved accounting
- Individual jobs can be recorded rather than a summary
- Improved Scaleability
- More servers can be added with less work and less synchronisation problems

## The Upgrade Process

- Hardware and Software Upgrades

## The Upgrade – Hardware

- Previous System
- 3 Machines
- Pentium Pro – 200Mhz
- 199.07 BogoMips
- 256Mb RAM
- Hard Disk - SCSI 9.1Gb
- Fast Ethernet 10/100Base-T Network

## The Upgrade – Hardware

-  Replacement System
- 3+ Machines
- Dual Pentium 3 – 800Mhz
- 3185.04 Total BogoMips
- 512Mb RAM
- Hard Disk – IDE 40Gb
- Fast Ethernet 10/100Base-T Network
- SCSI bus available (for CDR)

## The Upgrade – Software

- RedHat 5.0		RedHat 7.2.1 – CERN
- Kernel 2.4.x (from 2.0.32!)
- Perl 5.6
- Using Locally Compiled Software for Printing
- LPRng, IFHP, netatalk

## The Upgrade – Software

- LPRng – 3.5.2			3.8.13
- General Bug/Performance fixes
- CTI-ifhp 2.2.8			LPRng-IFHP 3.5.10
- Uses ifhp.conf for printer control commands
- No 'hard-coded' PostScript/PCL
- Vastly improved printer support (replaces Phaserif)
- Vastly improved Tray Support
- Easily modified
- Improved Accounting

## The Upgrade – Software

- CAP 6.0		Netatalk – 1.5.3.1
- CAP is deprecated!
- No support
- Required too much work to recompile on new system
- Netatalk now provides superior performance
- Wrapper Required for compatibility
- Maps original papif options to new pap command
- Plug-in replacement for Apsfilter
- Accounting improvements
- Adds some functions only done by CAP (trays selection)

## Manageability

- How to manage 1100 printers....

## The Database

- SERVER

- PRINTER

- PRINTER
- TYPE

- TYPE
- TRAY

- PRINTOUT

- USER

- HOST

- Accounting

- Configuration

## The Database

- All Database Functions Stored in Single Module
- PrintMan.pm  (PrintMan = “Printer Manager”)
- General Purpose Module
- Hides SQL code
- Basic functions for each table
- Add, Update, List, Get, Delete
- Job entry functions optimised for efficiency
- Database access minimised by caching data
- Provides Check functions for data entry
- Simplifies programming of user interfaces

## Manageability

- Database Centric Configuration
- Configuration files
- Generated automatically
- Easily modified
- Synchronised on all systems
- Support for SQL data extraction
- Generated Files:
- /etc/printcap – Standard LPR printcap
- /etc/cap.printers – Printer name lookup file for AppleTalk
- apsfilter/conf/<PrinterName> – ApsFilter config folder
- NamedFile – DNS lookup – Each printer points to server

## Manageability

- Database Accounting
- Each Job Recorded
- Including size, pages, and date
- Job records cached locally
- Jobs collated and inserted at end of day
- Support for LARGE Tables
- ~400+Mb data required per year
- Statistical Report Generation
- Fast, Dynamic
- Order by user, date, jobs, pages, hosts, etc. ....

## The Future

- High Availability
- Server monitoring
- Automated redirection (alter DNS, slow)
- Server Load Balancing .. ?
- Difficult
- Simple re-routing of TCP pipe does not work(Linux Virtual Server Project)
- Printer spool dir must be on same server
- Possible?
- Load Balancer *forwards* to correct server (DBMS helps)

## Questions

- ?