More Related Content Similar to Perfomance tuning on Go 2.0 Similar to Perfomance tuning on Go 2.0 (20) Perfomance tuning on Go 2.04. Pipeline Stage-2 Unit Test Stage-3 Acceptance Test Stage-1 Compile Run Unit Test Suite - 1 Accetance Test Suite - 1 Compile Job Run Unit Test Suite - 2 Acceptance Test Suite – 2 Run Unit Test Suite - 3 35. Transaction rollbacks == Incorrect cached dataIgnore cache puts in transactionsInvalidate caches on transaction commit only 37. Fast deep-cloning of cached objectsJava Deep Cloning Library: http://robust-it.co.uk/clone/index.php 40. Lock on interned stringsFine granularityProfiler supportAlso used as cache keys 47. Thread 1 Stage (Building) Job – 1 (Completed) Stage (Building) Stage (Building) Job – 2 (Building) Job – 1 (Completed) Job – 1 (Building) Thread 2 Job – 2 (Cmpleted) Job – 2 (Building) Stage (Building) Job – 1 (Building) Job – 2 (Completed) 50. Use a large databaseUse the query analyzer to find missing indexes 51. Views are great… sometimes10x-20x faster for “TOP n” queriesDepends on database implementation 52. Query selectivity is important 200 ms Pipelines (20,000 rows) Stages (70,000 rows) BuildStateTransitions (4,000,000 rows) 55. Single JRuby runtime + Rails multi-threaded mode Much lower memory footprintBut completely uncharted territory 57. Rails nested partials Mysterious lock contention10 concurrent requests take 90 secs to completeStill a mystery! 61. Fragment cachingGenerate a cache-key that incorprates all fields that are needed to uniquely identify that object’s current stateLRU cache will evict it on state change 65. How we got from that to thisINSERT IMAGE Threads after performance tuning Editor's Notes Top 5 points Just pushed the bottleneck to the other end of the queueIncreased complexity Otherwise last thread winsVersion field with retries Very responsive community SHOW STOPPER