Você está na página 1de 38

ASE CLUSTER EDITION INSTALLATION &

ADMINISTRATION BEST PRACTICES

DIAL‐IN NUMBERS:
1‐866‐803‐2143
1‐210‐795‐1098

PASSCODE: SYBASE
ASE CLUSTER EDITION ON LINUX: 
INSTALLATION AND BEST PRACTICES

Your host… Today’s speaker

Amit Satoor Mark Kusma


Product Marketing  Product Support 
Manager  Manager 
Sybase  Sybase

2 – March 3, 2010
HOUSEKEEPING
Questions?
Submit via the ‘Questions’ tool on your Live Meeting console, 
or call 1‐866‐803‐2143 United States
0800‐777‐0476 Argentina
0800‐8911992 Brazil
01800‐9‐156448 Colombia
001‐866‐888‐0267 Mexico
Password SYBASE
Press *1 during the Q&A segment

Presentation copies?
Select the printer icon on the Live Meeting console

3 – March 3, 2010
ASE CLUSTER EDITION INSTALLATION &
ADMINISTRATION BEST PRACTICES

MARK KUSMA
PRODUCT SUPPORT MANAGER
SYBASE, INC.
AGENDA
• Terminology
• Migration
• Locks
• sp_sysmon
• Disk System and I/O Fencing
• Network Configuration
• Backup Server Configuration
• Application Architecture
• Temporary Databases
• Logical Clusters
• Use Cases
• Cluster Use
• Disaster Recovery

5 – March 3, 2010
TERMINOLOGY
• Instance
− An ASE CE server (dataserver) running on a 
node
• Node
− Hardware running the ASE CE instance
• Cluster
− One or more instances of ASE CE sharing 
access to data
• Logical Cluster
− A specific set of instances with defined 
properties
• System Logical Cluster
− All instances running in the cluster
• CIPC
− Cluster Inter‐Process Communication
6 – March 3, 2010
TERMINOLOGY
• Active instance
− An instance where an application is running
• Passive instance
− A standby instance waiting for a failover
• Well Partitioned
− Any given database is only accessed from a 
single instance
• Badly Partitioned
− Access to a database from multiple instances
• ASE SMP
− “Good ole ASE” – like we’ve always had
• Multiple Simultaneous Failover
− Support in 15.5 CE for multiple instances 
failing at the same time without crashing the 
cluster
7 – March 3, 2010
Instance1 Instance2

Local user local user


tempdb
tempdb

private private
disk disk Instance3

Local user
system local system tempdb
tempdb tempdb

shared private
disk disk

Instance1 and Instance2 can be a Logical Cluster


The System Logical Cluster always includes all
instances
8 – March 3, 2010
MIGRATION FROM ASE SMP
• From 12.5.x
− New optimizer from ASE 15
− Migration guideline at 
www.sybase.com/detail?id=1058962
• From 15.x
− Have some room for CE overhead
• From pre‐12.5
− Upgrade to 12.5.x or 15.x SMP first
• Cross platform
− XPDL supported just like ASE SMP

9 – March 3, 2010
MIGRATION FROM ASE SMP
• Establish baseline for comparison
− Gather timings from “source” system
− Compare times to ASE CE
− If needed, test with only 1 instance 
running
• Eliminates CE interprocess communication 
overhead

10 – March 3, 2010
LOCKS
• Configuration parameter “cluster redundancy 
level”
− Default = 1, Max is “#instances – 1”
− Defines the number of *simultaneous* 
instances that can crash without crashing 
the cluster
• Within a single heartbeat interval
• Once failover begins, a second failure would crash 
the cluster
− New in 15.5 CE, previous versions were hard‐
coded at 1
− Really determines the number of copies of 
locks
• Result is an increase in CIPC traffic
• Performance tradeoff
− Consider increasing to 2 if you have a 3 or 4 
node cluster
11 – March 3, 2010
LOCKS
• Configuration parameter “lock hashtable
size”
− Different than “number of locks”
− Formula included in 15.5 CE Release Bulletin
− Typically configured between 2 – 4 million
• 24 bytes each in case “max memory” needs to be 
increased
lock hashtable size = ( (number of locks * (4 + 
cluster redundancy level) ) + 
( (total data cache size(in KB) / max database 
page size(in KB)) * 
(2 + cluster redundancy level) ) ) / 8

12 – March 3, 2010
sp_sysmon vs. MDA
• sp_sysmon may be too high level for CE
− May need to use “clear” and “set system_view
instance”
• Use “clear” if receive errors or sp_sysmon takes a long 
time to run
− Many new pieces of information in the output
• If documentation is lacking, please open a case
− If using “instance” system_view, run on all “active”
instances
• MDA
− Several new MDA tables for ASE CE
− Provides more granularity
− monProcessWaits and monSysWaits ‐ great starting 
places
− Chris Brown / Jeff Tallman presentation
• DATASE21 and DATASE23 (2 parts)
13 – March 3, 2010
DISK SYSTEM
• Multipathing support for HP and Linux

• All nodes must see the devices using the 
same path
− Symbolic links can be your friend
− Remember, there is only 1 copy of the data
− disk init needs to find the device from all instances

14 – March 3, 2010
DISK SYSTEM
• Disk system must support SCSI‐3 PGR 
commands
− Each OS has specific requirements
− Use iofenceutil (despite doc warning) to 
verify I/O Fencing
• iofenceutil /dev/raw/raw40
– If errors, verify all permissions are correct 
(see doc for your OS)
• Be sure to use I/O Fencing in production
• UAF Agents need to have the permission in 
order to start ASE
– Use host boottime scripts, ensure sybase
user is used to start UAF
• Do not fence the quorum device
− Must be on a separate LUN since fencing is 
at LUN level
15 – March 3, 2010
I/O FENCING ON AIX
• Ensure PR_key_value is set using: lsattr –El 
hdisk<n>
• Set PR_key_value for all raw devices to 
instance_id
chdev –l hdisk<n> ‐a PR_key_value=<id> ‐a 
reserve_policy=PR_shared
− Only the quorum device is set to no_reserve
chdev –l hdisk<n> ‐a 
reserve_policy=no_reserve
− Grant permission for current (sybase) user –
Use su or sudo
setsecattr ‐p iprivs=+PV_KER_RAS $$
• The $$ means “this session”. An admin may 
use <pid of sybase login>

16 – March 3, 2010
I/O FENCING ON HP‐UX
• Use Persistent DSF 

• Use chown, chgrp, or chmod to set 
permissions properly for sybase login

17 – March 3, 2010
I/O FENCING ON LINUX
• SCSI Generic driver must be loaded
− Creates /dev/sg<x> files
− The sybase user needs write permission to 
the corresponding /dev/sg<x> files
− /dev/sda = /dev/sg0, /dev/sdb = /dev/sg1, 
etc
− /dev/sg<x> files recreated at system start, 
use script to set permissions

18 – March 3, 2010
I/O FENCING ON SOLARIS
• The sybase user needs to have 
SYS_DEVICES permission
• ppriv ‐s I+sys_devices $$
− To set permanently
• usermod ‐K defaultpriv=basic,sys_devices
sybase

19 – March 3, 2010
NETWORK CONFIGURATION
• Three (3) network connections
− Public connection
• For all the client traffic
− Private interconnects
• Use 2 for redundancy
• Private switch, VLAN, cross over cables
• Delays here will impact overall system 
performance
• Monitor with monCIPC and monCIPCEndpoints
– Watch “Error” columns, Retransmits, Switches in 
monCIPC
– Watch “Max” columns in monCIPCEndpoints
• Larger MTU / Jumbo frames on secondary 
interconnect?
– If using Active / Active setup
– Used to transmit data pages
20 – March 3, 2010
NETWORK CONFIGURATION
• Faster is better – at least 10GigE
• Can be bonded, but have primary and 
secondary
• Ensure hostname isn’t using localhost
(especially on Linux)
• Private interconnects should be pingable
• Use separate switches for each 
interconnect for redundancy

21 – March 3, 2010
BACKUP SERVER CONFIGURATION
• Multiple Backup Server feature
− To configure for “round robin”
• sp_addserver SYB_BACKUP, null, ‘$ROUNDROBIN’
• Dump/load will route to backup server with least 
load in RR rotation
− To configure for “dedicated”
(recommended)
• sp_addserver SYB_BACKUP, null, ‘$DEDICATED’
• Dump/load will run on node corresponding to the 
instance where the spid is connected
− Use shared file system for dump files so 
either node works
• Quorum device
− Not backed up by Backup Server
− Use OS level backup or qrmutil with ‐‐
extract_config
22 – March 3, 2010
BACKUP SERVER CONFIGURATION
• HA Feature for Backup Server
− sp_configure ‘enable backupserver HA’,1
− BS will be started by ASE if needed
− Uses RUN_<bs_name> file

23 – March 3, 2010
APPLICATION ARCHITECTURE
• Applications need support for CE features:
− Login Redirection
• Support automatically enabled with supported 
client version
− Connection Migration
• A planned event
• Support automatically enabled with supported 
client version
− Extended HA Failover
• An unplanned event
• App must request this and be programmed to deal 
with it
− SDK 15.0 ESD12 or higher
− jConnect 6.0 or higher
− May need to code Service Name options if 
using alias routes
• More on routes in Logical Cluster section
24 – March 3, 2010
TEMPORARY DATABASES
• ASE CE supports 4 types of Temporary 
Databases
− Global temporary databases, 2 types
• Global system temporary database – normal 
tempdb (dbid=2)
• Global user tempdbs ‐ optional
• Accessible from any instance in the cluster
• No #temp tables stored in global temp databases
• Must be on shared disk
• Must be used for shared temp tables
– create table tempdb..my_table ....
– If this isn’t a requirement
• Global system tempdb (dbid=2) can be small
• Global user tempdbs should be omitted

25 – March 3, 2010
TEMPORARY DATABASES
• ASE CE supports 4 types of Temporary 
Databases
− Local temporary databases, 2 types
• Local system temporary databases
– At least 1 per instance
– Must be on shared disk
• Local user temporary databases
– Optional
– Can be on local, private disk devices or shared
• Doc recommends local disk, but no one has done it yet
– Can bind connections using sp_tempdb
• Only accessible from owning instance
• Used for #temp tables, worktables, etc

26 – March 3, 2010
LOGICAL CLUSTERS
• Logical Clusters are used to control 
workloads
− Define a “base instance” where the 
application should normally run
− Define “failover instances” telling CE 
where the application should run when 
the base instance fails.
− Define “routes”, which direct incoming 
connections to specific logical clusters, 
using service name, login, or app name
− Use sp_cluster (or Sybase Central) to 
manage the LC(s)

27 – March 3, 2010
USE CASES
• High Availability
− An instance / node crash doesn’t affect 
rest of cluster
− Failover instance takes over the 
workload

28 – March 3, 2010
USE CASES
• Server Consolidation
− Combine underutilized servers into a cluster
− An easy case for Active / Active due to well 
partitioned
BenefitsLC
Benefits
PayrollLC

Payroll Benefits
Sales
SalesLC Sales

Payroll

29 – March 3, 2010
USE CASES
• Reduce number of standby servers
− Eg. 3 production servers + 3 standby servers
− With CE, 4‐node cluster running as 3 active + 
1 passive

Currently Idle

30 – March 3, 2010
CLUSTER USE
• Active / Active vs. Active / Passive
− A/A can be well partitioned or badly partitioned
• Badly partitioned is not recommended due to 
performance impact
– Last log page contention between nodes
– Master / shadow lock changes / downgrades
–Data pages shipped via CIPC
– However, it can work if volume is relatively low
• Well partitioned allows for maximum usage of 
resources
– Key is any given database accessed from a single instance
− A/P is the typical HA configuration
• “runnable process search count” default is 3 in 
ASE CE
− Performance degraded with multiple instances 
running?
31 – March 3, 2010
• Try RPSC of 2000
DISASTER RECOVERY
• No ASE CE ‐> ASE SMP via dump/load
− If you are planning for a DR site, 
currently CE databases cannot be 
dumped and loaded to SMP
− Engineering is working on it
− Single instance of ASE CE for DR site
• Standby licensing available

32 – March 3, 2010
SUMMARY
• Do
− Establish benchmark on “source” server
− Plan for time to handle query 
performance changes if moving from 
pre‐15.0.x
− Increase “lock hashtable size”
− Consider increasing “cluster 
redundancy level”
• Not more than 2
− Use two *private* interconnects
− Test failover adequately with all clients 
and under load
• Ensure they properly handle resetting the 
context, resubmit batch
− Ensure headroom if migrating to CE on 
existing hardware
33 – March 3, 2010
SUMMARY
• Do
− Use a “private” installation ‐ instead of 
local (requires CFS)
− Use a well partitioned setup or Active / 
Passive
− Backup the quorum device (not done 
with Backup Server)
− Consider using local user tempdbs and 
add to default group
− Test increased “RPSC” if slowness seen 
with > 1 instance
− Give yourself the proper amount of 
time to do it right
− Contact CS&S early on to get advice / 
ask questions
34 – March 3, 2010
SUMMARY
• Don’t
− Use Workload Manager to round robin 
connections
− Load balance a single application across 
instances/nodes
− Forget to test, test, test

35 – March 3, 2010
Type your question in the online Q&A box 
or call 1‐866‐803‐2143 United States
0800‐777‐0476
Argentina 0800‐8911992  Brazil
01800‐9‐156448 Colombia
001‐866‐888‐0267 Mexico
Password SYBASE
Press 1

36 – March 3, 2010
Thank you.
FOR FURTHER INFORMATION 
WWW.SYBASE.COM/CLUSTERS

37 – March 3, 2010
38 – March 3, 2010

Você também pode gostar