optimizing and improving opensimulator performance

32
 Optimizing and Improving OpenSimulator Performance Justin Clark-Casey OpenSimula tor core developer

Upload: john-simmons

Post on 01-Jun-2018

228 views

Category:

Documents


0 download

TRANSCRIPT

8/9/2019 Optimizing and Improving Opensimulator Performance

http://slidepdf.com/reader/full/optimizing-and-improving-opensimulator-performance 1/32

 

Optimizing and Improving

OpenSimulator PerformanceJustin Clark-Casey

OpenSimulator core developer

8/9/2019 Optimizing and Improving Opensimulator Performance

http://slidepdf.com/reader/full/optimizing-and-improving-opensimulator-performance 2/32

 

In this presentation

● The System Architecture

 – Components and interactions

 – Potential ottlenecks

 – !ules of thum for good performance

● "easuring and Testing

 – #hat the heck is going on$

The Conference – %&& connections for the keynote

8/9/2019 Optimizing and Improving Opensimulator Performance

http://slidepdf.com/reader/full/optimizing-and-improving-opensimulator-performance 3/32

 

#hy listen to me$

● OpenSimulator core developer and consultant for '( years)

● *ave carried out grid performance analysis for commercialand education clients)

● *ave made many performance improvements+ especiallyfor conference this year and last)

 – ,ghosts ranch to soon e integrated)

● .ut even I/m not an e0pert on everything

 –

Performance is a very comple0 topic in this architecture) – "any different net1ork 2 server arrangements)

8/9/2019 Optimizing and Improving Opensimulator Performance

http://slidepdf.com/reader/full/optimizing-and-improving-opensimulator-performance 4/32

 

The System Architecture

● Talking aout a *ypergrid-enaled grid installation)

 – Though much also applies to standalone)

 – "uch also applies to a non-*ypergrid installation)

● Assume you are already familiar 1ith fundamentalsystem concepts

 – Standalone+ grid+ *ypergrid)

 – Assets+ inventory)

 – *TTP+ TCP+ 34P)

8/9/2019 Optimizing and Improving Opensimulator Performance

http://slidepdf.com/reader/full/optimizing-and-improving-opensimulator-performance 5/32

 

5rid Components

Simulator6ie1er

5rid Services

Pulic

Private

*TTP

34P

*TTP Simulator

*TTP

*TTP

*TTP

8/9/2019 Optimizing and Improving Opensimulator Performance

http://slidepdf.com/reader/full/optimizing-and-improving-opensimulator-performance 6/32

 

*ypergrid Components

6ie1er

*ome Services 7oreign Services

*ome Simulator

7oreign Simulator

UDP

UDP

8/9/2019 Optimizing and Improving Opensimulator Performance

http://slidepdf.com/reader/full/optimizing-and-improving-opensimulator-performance 7/32

 

.ottlenecks

● In general four aspects

 – 8et1ork

 – Processing 9CP3:5P3 on vie1er side;

 –

Storage – Soft1are

● for three components

 – Simulator

 – 5rid Services

 – 6ie1er:Client

8/9/2019 Optimizing and Improving Opensimulator Performance

http://slidepdf.com/reader/full/optimizing-and-improving-opensimulator-performance 8/32

 

8et1ork .ottlenecks

● 6ie1er < Simulator+ Services

 – 34P= need lo1 latency

 – *TTP= need high and1idth

 –

!ule of thum= try at least for >&& kit per connection – pingtest)net

● Simulator < Simulator same grid

 – *TTP= ?o1 latency

● Install < Install via *ypergrid

 – *TTP= ?o1 latency+ good and1idth

8/9/2019 Optimizing and Improving Opensimulator Performance

http://slidepdf.com/reader/full/optimizing-and-improving-opensimulator-performance 9/32

 

Processing .ottlenecks

● 6ie1er

 – "ore prims+ more avatars+ higher load)

● 5P3:CP3 limiting factor

Simulator – "ore prims+ more avatars+ more scripts+ higher load)

● CP3 limiting factor in the first instance

 – !ecommended minimum @ cores per simulator

 – !ule of thum= core per active region

● One region vs multiple regions per simulator)

● Soft1are inefficiency 9more on that later;)

8/9/2019 Optimizing and Improving Opensimulator Performance

http://slidepdf.com/reader/full/optimizing-and-improving-opensimulator-performance 10/32

 

Storage .ottlenecks

● Services

 – Asset storage dominates everything)

● All assets immutale so deletion e0tremely tricky)

 – 4eduplicating asset service in future release● Or use S!AS today BS!AS)

 – 7aster storage is etter ut proaly not critical)

Simulator – Allo1 as many assets to e cached as possile)

8/9/2019 Optimizing and Improving Opensimulator Performance

http://slidepdf.com/reader/full/optimizing-and-improving-opensimulator-performance 11/32

 

Soft1are .ottlenecks

● 6ie1er

 – I kno1 little aout this)

● Services

 – "aye inefficient CD #eserver though deated)

● Simulator

 – 7ree threads for allE approach inefficient)

● Improvements for conference)

 – "ono vs #indo1s )8FT)

 –

Offload 5etTe0ture:5et"esh to direct service calls B4I!FCT SF!6ICF – *andling ad foreign installations in the *ypergrid)

8/9/2019 Optimizing and Improving Opensimulator Performance

http://slidepdf.com/reader/full/optimizing-and-improving-opensimulator-performance 12/32

 

"easuring and Testing

● Fvery install can e different)

● 6ery large numer of moving parts

 – "ore operating system than app:1eserver)

● Identifying and reproducing an issue

 – Is critical to actually fi0 it)

 – Often much G>&H of the 1ork)

8/9/2019 Optimizing and Improving Opensimulator Performance

http://slidepdf.com/reader/full/optimizing-and-improving-opensimulator-performance 13/32

 

"easuring

● 5enerations of stat systems)))

● 4ominant is no1 ,sho1 stats all)

 – Console commands on simulator and services

 – !ecord ra1 numers and moving averages

 – 7acility to periodically record to file)

8/9/2019 Optimizing and Improving Opensimulator Performance

http://slidepdf.com/reader/full/optimizing-and-improving-opensimulator-performance 14/32

 

"easuring

Simulator 9root;D sho1 stats all

clientstack)keynote)Client?ogouts4ueTo8o!eceives = &

clientstack)keynote)Ino0PacketsCount = &+ &:s+ &:s

clientstack)keynote)IncomingPacketAsync!euests#aiting = &

entitytransfer)keynote)Inter!egionTeleportAttempts = &

entitytransfer)keynote)Inter!egionTeleportCancels = &entitytransfer)keynote)Inter!egionTeleport7ailures = &

httpserver)>&&&)*TTP!euestsServed = & reuests+ & reuests:s+ & reuests:s

scene)keynote)!ootAgents = & avatars

scene)keynote)Script?ines = & lines:sec

server)memory)Process"emory = %)>K ".server)net1ork)*TTP!euests"ade = @@ reuests+ & reuests:s+ & reuests:s

server)processor)CP3Percent = & percent

"ore information at BStats)

8/9/2019 Optimizing and Improving Opensimulator Performance

http://slidepdf.com/reader/full/optimizing-and-improving-opensimulator-performance 15/32

 

CP3 Sample 5raph

8/9/2019 Optimizing and Improving Opensimulator Performance

http://slidepdf.com/reader/full/optimizing-and-improving-opensimulator-performance 16/32

 

Agent Time 5raph

8/9/2019 Optimizing and Improving Opensimulator Performance

http://slidepdf.com/reader/full/optimizing-and-improving-opensimulator-performance 17/32

 

STP #ork Items #aiting

8/9/2019 Optimizing and Improving Opensimulator Performance

http://slidepdf.com/reader/full/optimizing-and-improving-opensimulator-performance 18/32

 

5raphing

● In my o1n tools repository) See B5!AP*I85reference)

 – 8e1 this year)

#orks on ,stats record start log files) – 7ormat may change in the future)

● Primitive graphs

 – 8o outlier filtering+ time series alignment+ yet+ etc)

 – .ut can still e useful in diagnosing issues after the fact)

8/9/2019 Optimizing and Improving Opensimulator Performance

http://slidepdf.com/reader/full/optimizing-and-improving-opensimulator-performance 19/32

 

Testing

● 5eneral net1ork

 – iperf L Tool for performing TCP:34P throughput andlatency tests Biperf

● Services – 5et te0ture test code at BTFMT3!F ?OA4 TFST)

 – Other1ise not much yet)

 –

"ay e ale to use general test tools such as SiegeBSIF5F)

8/9/2019 Optimizing and Improving Opensimulator Performance

http://slidepdf.com/reader/full/optimizing-and-improving-opensimulator-performance 20/32

 

Testing

● Simulator

 – pCampot BPCA"P.OT

 – Program to manage connections of many ots from

a single console)● 4ifferent ehaviours 9teleport+ 1alk around+ etc);

 – This is a maNor tool I use in conference performancetesting)

 – #ill continue to make ehaviour more like realvie1ers)

8/9/2019 Optimizing and Improving Opensimulator Performance

http://slidepdf.com/reader/full/optimizing-and-improving-opensimulator-performance 21/32

 

The Conference

● 5etting %&& connections in the same space is ahuge challenge)

 – ?oad gro1s e0ponentially not linearly)

 – 6ery rarely een done up to no1)

8/9/2019 Optimizing and Improving Opensimulator Performance

http://slidepdf.com/reader/full/optimizing-and-improving-opensimulator-performance 22/32

 

Considerations

● Can other parts of the grid take it 9e)g) services;$

● 4o 1e have the and1idth$

 – 5etting people to login early and hence cache assets helps)

4o 1e have the CP3$ – @% core system for @ regions

● eah+ 1e/re pushing it)

● 6arregion vs) % neighouring regions

 – 7ault tolerance

 – Code maturity

8/9/2019 Optimizing and Improving Opensimulator Performance

http://slidepdf.com/reader/full/optimizing-and-improving-opensimulator-performance 23/32

 

The Process

● !egular Tuesday load tests supplemented ypCampot)

 – 7irst locally then Amazon FC@)

Stats recording and analysis)● !eproduce prolems seen in live tests 1ith

pCampot)

● Changes to OpenSimulator code or config changes)

● !epeat until e0hausted)

8/9/2019 Optimizing and Improving Opensimulator Performance

http://slidepdf.com/reader/full/optimizing-and-improving-opensimulator-performance 24/32

 

Prolems that Fmerged

● 8eeded to fi0 issues in:improve pCampot)

● 8eeded to create graphing and analysis code)

● So 1hat do you need$ .esides a miracle)

 – Stats+ lots of stats)

!educe 34P traffic 1here possile)● OpenSimulator trying to do too many things at once)

 – Super thread happy)

 – ?ots of conte0t s1itching)

 – *olds up other 1ork)

● Physics

 – 8ot a maNor issue in the keynote scenario)

8/9/2019 Optimizing and Improving Opensimulator Performance

http://slidepdf.com/reader/full/optimizing-and-improving-opensimulator-performance 25/32

 

Configuration t1eaks

● BInterest"anagement in OpenSim)ini

 – !oot!otation3pdateTolerance Q &)>>

● !educe 34P updates on avatar rotation)

 – Child!eprioritization4istance Q KKKKK● !educe thread 1ork for neighour sim oservation)

 – ChildTerse3pdatePeriod Q %

● !educe 34P traffic from child connections)

8/9/2019 Optimizing and Improving Opensimulator Performance

http://slidepdf.com/reader/full/optimizing-and-improving-opensimulator-performance 26/32

 

Configuration t1eaks

● BClientStack)?inden34P

 – enaleRadaptiveRthrottles Q false

● Oserved ad ehaviour under very high load 1ithadaptive)

 – sceneRthrottleRma0Rps Q >&&&&&&&

● %&& mits:s

 – clientRthrottleRma0Rps Q @>&&&

mit:s

8/9/2019 Optimizing and Improving Opensimulator Performance

http://slidepdf.com/reader/full/optimizing-and-improving-opensimulator-performance 27/32

 

Soft1are changes

● Pure performance

 – Process M"? as stream not document)

● Perceived performance

 – Skip ??Client6ie1 ueue for o1n mvmt packets)● ?ess thread happy

 – Seuential processing)

● Appearance:Attachments

● Some incoming:outgoing 34P handling)

● Comple0 L need to avoid one task locking another)

8/9/2019 Optimizing and Improving Opensimulator Performance

http://slidepdf.com/reader/full/optimizing-and-improving-opensimulator-performance 28/32

 

7uture 4irections

● Can proaly make efficiency gains y further controllingconcurrency)

 – Simulator-1ide No scheduler$

● 4istriuted Scene 5raph)

 – Simple component to maintain connections even if otherprocesses crash)

● Allo1 risk of running more regions per simulator)

 – .ut improving single system efficiency easier)

6arregions – *igh concurrency challenges over a larger area)

8/9/2019 Optimizing and Improving Opensimulator Performance

http://slidepdf.com/reader/full/optimizing-and-improving-opensimulator-performance 29/32

 

ThankyouE

Justin Clark-Casey

OS6# Consulting

http=::Nustincc)orghttp=::t1itter)com:Nustincc

 NustinccNustincc)org

9please see ne0t slides for references;

8/9/2019 Optimizing and Improving Opensimulator Performance

http://slidepdf.com/reader/full/optimizing-and-improving-opensimulator-performance 30/32

 

!eferences

B4irect Service

http=::opensimulator)org:1iki:4irectRServiceR!euests

B5raphing

https=::githu)com:Nustincc:opensimulator-tools:tree:master:analysis:opensimulator-stats-analyzer

Biperf

http=::soft1are)es)net:iperf:

BPCampot

http=::opensimulator)org:1iki:PCamp.ot

8/9/2019 Optimizing and Improving Opensimulator Performance

http://slidepdf.com/reader/full/optimizing-and-improving-opensimulator-performance 31/32

 

!eferences

BPerformance

http=::opensimulator)org:1iki:Performance

BSiege

http=::111)Noedog)org:siege-home:

BS!AS

https=::githu)com:coyled:sras

BStats

http=::opensimulator)org:1iki:Sho1Rstats

BTe0ture ?oad Test

https=::githu)com:Nustincc:opensimulator-tools:tree:master:test:te0ture-load-test

8/9/2019 Optimizing and Improving Opensimulator Performance

http://slidepdf.com/reader/full/optimizing-and-improving-opensimulator-performance 32/32

 

2 A