SAS 9 on Solaris 10 – Calling SuperHeroes to Fight SuperVillians

Maureen Chew [email protected] Staff Engineer Sun Miicrosystems South Central SAS Users Conference Dallas, TX, Oct 2006 Agenda • Standard Solaris Tools • Solaris Containers • Service Management Framework • ZFS • DTrace • Bonus: Lasso of Truth

S. Central SAS Users Conference, Oct 06 2 Standard Solaris Tools • Get me help – STAT! • Most take a time interval (ie: 5) • prstat (Process) • mpstat (processor) • vmstat (virtual memory) • netstat (network) • iostat (i/o)

S. Central SAS Users Conference, Oct 06 3 Solaris Containers Rationale > “web” and “containments > Consolidate trusted and trusted apps > Dev, test, prod > Service developers and users who need root

S. Central SAS Users Conference, Oct 06 4 Containers vs. Zones

Development Test • Container = Zone + Container 1 Container 2 SAS Zone 1 4 CPUs, 16 GB RAM SAS Zone 2 resource management 2 CPUs, 8 GB RAM • Dynamically move

CPU & memory Production resources between Container 3 SAS Zone 3 zones 8 CPUs, 32 GB RAM

Global Zone 10 CPUs 40 GB RAM

S. Central SAS Users Conference, Oct 06 5 Solaris Containers

• Virtualization of the OS as Independent Zones SAS Zone 1 SAS Zone 2 Development • Appears as a different Test instance of Solaris • Each container can be rebooted w/o affecting SAS Zone 3 other containers Production • Each can bring up the Solaris 10 Metadata server of port S u Global Zone 8561 S

S. Central SAS Users Conference, Oct 06 6 Predictive, Self-Healing

• Fault Management Architecture > Automatically and silently detects and diagnoses underlying problem • Service Management Framework (SMF) > Standardized control mechanisms for application services

S. Central SAS Users Conference, Oct 06 7 Service Management Framework

• New and improved way to start/stop services • Major component of fault management architecture • Replaces init.d startup scripts (but legacy support remains) • Can automatically restart a failed service

S. Central SAS Users Conference, Oct 06 8 Service Management Framework

• Create a service manifest file, and shell script file to define the start, stop, restart methods for the service • Validate and import the service manifest using svccfg(1M) • Enable or start the service using svcadm(1M) • Verify service is running using svcs(1)

S. Central SAS Users Conference, Oct 06 9 Generation ZFS ...

S. Central SAS Users Conference, Oct 06 10 Zebra, Zamboni, Zen and the art of ZFS • Zebra > Eliminates need for volume manager > Raid 0, 1, Z (like 5) • Zamboni > Rock-solid data integrity, data protected by 256 bit checksums, data consistency maintained at all times > Scalability: 128-bit file system which translates to 16 billion billion times the capacity of 32- or 64-bit file systems > High performance: Proven, cutting-edge technologies combine to optimize performance • Zen > Managability, Reliabilit y, Scalability, Performance

S. Central SAS Users Conference, Oct 06 11 ZFS – the Proof is in the pudding • How easy is it? > # zpool create -f -m /z0 zpl0 raidz c3t1d0s7 c3t2d0s7 c3t3d0s7 • Volume creation, file system creation, mount, vfstab edit • How does it perform?

S. Central SAS Users Conference, Oct 06 12 Solaris ZFS Performance Cumulative Performance Results 04:48:00

04:19:12

03:50:24

03:21:36 S

S 02:52:48 :

e ZFS M

m 02:24:00 i M

: Linux T

H 01:55:12 H

01:26:24

00:57:36

00:28:48

00:00:00

. Sun X4600, 4x2.6GHz dual core Opteron, 64GB RAM, 3 internal disks Dell, 4x3.2GHz Xeon, 8GB RAM, RH4, 7 disk external, RAID 0 volume, EXT3 . 35+ SAS tests cumulative time: Solaris ZFS: 3hrs, 30min, RH: 4.4 4hrs, 30 min

S. Central SAS Users Conference, Oct 06 13 DTrace – Utility Belt

> Batarangs, Bat cuffs, communications device, 1st aid kit, forensic kit, gas mask, grappling hook, infrared goggles, ring, laser torch, line gun, lock picks, camera, smoke goggles, mini toolkit, money, rebreather, Batmobile remote control, grenades, thermite... DTrace does it all and MORE WW OO WW !

S. Central SAS Users Conference, Oct 06 14 DTrace

• Dynamic Tracing framework • Used to observe, debug, tune • Enables one to ask the system arbitrary questions about the behavior of the system or applications • Scripts are written in 'D' - ( similar to a mix of C/perl/awk) • DTrace expertise == resume standout

S. Central SAS Users Conference, Oct 06 15 DTrace

• Many useful examples included in /usr/demo/dtrace • Best starter - Google dtrace, I'm feeling lucky • Sample scripts – show me.... > All failed open(2) system calls and their failure code > All signals by sender and recipient > Count calls into libc(3) > write(2) times by process name

S. Central SAS Users Conference, Oct 06 16 DTrace - Example

● Show total I/O by process name, along with write stats

bash-2.05b$ cat iototal.d #pragma D option quiet io:::start { @[args[1]->dev_statname, execname,pid ] = sum(args[0]->b_bcount); } syscall::write:entry { @writes[probefunc] = count(); @sizes["write Sizes"] = quantize(arg2); } END { printf("%10s %20s %10s %15s\n", "DEVICE", "APP", "PID", "BYTES"); printa("%10s %20s %10d %15@d\n", @); }

S. Central SAS Users Conference, Oct 06 17 DTrace – example results

bash-2.05b$ dtrace -s iototal.d DEVICE APP PID BYTES sd1 fsflush 3 5120 sd0 vi 21042 11776 sd0 cpudiagd 493 24576 sd1 sched 0 54784 sd0 fsflush 3 369152 sd0 sched 0 698368 ssd102 sched 0 1370624 ssd102 fsflush 3 1936896 sd1 sas 21054 811515904 sd0 sas 21054 811735040 ssd102 sas 21054 880518144 HH write 99095 oo write Sizes llyy value ------Distribution ------count 0 | 0 1 | 38 DD 2 | 3 4 | 4 TT 8 | 10 16 | 8 ra 32 | 0 ra 64 | 4 128 | 0 256 | 0 cc 512 | 11 e 1024 | 0 99K writes issued, all length of 8K e 2048 | 0 ! 4096 | 1 ! 8192 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 99016 16384 | 0

S. Central SAS Users Conference, Oct 06 18 Solaris 10 • Many other reasons to upgrade > Performance > TCP/IP stack rewrite > Fault Management Architecture > Security enhancements – least privileges, trusted Solaris > Enterprise grade OS > COST is FREE RTU > Open Source

S. Central SAS Users Conference, Oct 06 19 Bonus – Lasso of Truth

SAS 9 Install & Deploy Tips and Tricks > Skill set survey > general Solaris admin basics > DBA for SAS/ACCESS > App Server/Web Container > Xythos WebDav > Platform LSF for Grid > SPDS > Careful planning, patience > in SAS we truss(1M)

S. Central SAS Users Conference, Oct 06 20 Bonus: Lasso of Truth • Very large, I/O intensive jobs – use larger BUFSIZE(SAS option-8K -> 64K) UBUFSIZE=128K for data set views >15 hr vs 13 hr : dmreg, neural, decision tree (views) • Set CPUCOUNT (especially on large systems) • US IV+ performance vs. US IV rocks

S. Central SAS Users Conference, Oct 06 21 Bonus: Lasso of Truth • Metadata repository should be in high performance dir • Installation defaults or state stored in 3 places > $HOME/vpd.properties, .sasprefs, Solaris package registry • Can't share “sas” user via NFS home directory if supporting multiple installs or havoc can ensue • NFS – setuid root – sasperm, sasauth, ... • CD library – execute permission on all scripts • Uninstall is not automated # pwd > Don'/d0/apps/sas/sas9-1201/SASManagementConsole/9.1/_uninstt 'rm -rf' else stale package info will remain # ls UninstSASMC uninstall.dat uninstall.jar

S. Central SAS Users Conference, Oct 06 22 Bonus: Lasso of Truth

• Java Client > Data Integration Studio, Cube Studio, OLAP Monitor, Map Studio, etc... > It's Java after all

root@ctclava # pwd /net/ctcsun8/sharefs1/SAS/913-SE21/client3cd/databuilder root@ctclava # ls media.inf setup.exe setup.ini setup.jar setup_s64.sh • Solaris 10

S. Central SAS Users Conference, Oct 06 23 Bonus: Lasso of Truth • High end SAS ETL results on Sun Fire E25K, Sun StorEdge 3510 with high performance shared QFS file system • SAS Data Integration Studio > Bulk load : 4.22 TB input, < 80 min >3.22 TB sustained throughput > World record... • And last but not least ...

S. Central SAS Users Conference, Oct 06 24 Bonus: Lasso of Truth • Read all about it .... http://www.sas.com/events/partners/116589

SSASAS 99..11..33 SSPP44 nnooww aavvaaiillaabbllee oonn SSoollaarriiss 1100 // OOpptteerroonn**

*And other 64bit x86 architectures

S. Central SAS Users Conference, Oct 06 25 SAS 9 on Solaris 10 – Calling SuperHeroes to Fight SuperVillians

Maureen Chew [email protected] Staff Engineer Sun Miicrosystems South Central SAS Users Conference Dallas, TX, Oct 2006