+ All Categories
Home > Technology > Alfresco Day Roma 2015: Full Stack Load Testing

Alfresco Day Roma 2015: Full Stack Load Testing

Date post: 13-Feb-2017
Category:
Upload: alfresco-software
View: 643 times
Download: 1 times
Share this document with a friend
30
Full Stack Load Testing Load Testing On Alfresco 5.1
Transcript
Page 1: Alfresco Day Roma 2015: Full Stack Load Testing

Full Stack Load Testing Load Testing On Alfresco 5.1

Page 2: Alfresco Day Roma 2015: Full Stack Load Testing

Derek Hulley Alfresco Founding Engineer

Page 3: Alfresco Day Roma 2015: Full Stack Load Testing

Introduction

•  Resource Limits

•  Load Test Accuracy

•  Load Test Software

Introduction

Page 4: Alfresco Day Roma 2015: Full Stack Load Testing

Resource Limitations

Page 5: Alfresco Day Roma 2015: Full Stack Load Testing

Limiting Factors •  Some Basic Server Limitations

–  Memory consumption –  CPU usage –  IOPS / Bandwidth / IO

•  Other Server Limitations –  Monitoring (getting at logs, charts, monitors, etc) –  Backups –  CRON jobs

•  Features –  Supported file types –  Auditing –  Jodconverter –  Clustering

Resources

Page 6: Alfresco Day Roma 2015: Full Stack Load Testing

Moving Parts

Resources

Caches  

Page 7: Alfresco Day Roma 2015: Full Stack Load Testing

Start with a guess and try it out in anger Alfresco  and  

Share  20%  

Transforma4ons  

10%  

SOLR  30%  

Database  30%  

Content  5%  

Load  Balancer  5%  

Resource  Guess  0  

Alfresco  and  Share   Transforma2ons   SOLR  

Database   Content   Load  Balancer  

Resources

Monitor all Run for days Resolve Issues Repeat Adjust resources

Page 8: Alfresco Day Roma 2015: Full Stack Load Testing

Focuse.g. SOLR

Resources

Alfresco  and  Share  20%  

Transforma4ons  

10%  

SOLR  30%  

Database  30%  

Content  5%  

Load  Balancer  5%  

Resource  Guess  0  

Alfresco  and  Share   Transforma2ons   SOLR  

Database   Content   Load  Balancer  

Page 9: Alfresco Day Roma 2015: Full Stack Load Testing

Resource Focus Example: SOLR •  CPU: underused

•  Memory: underused

•  IO: underused

•  Network: Keep and eye on this!

Resources

Page 10: Alfresco Day Roma 2015: Full Stack Load Testing

Reduce spend and iterate …

Resources

Alfresco  and  Share  23%  

Transforma4ons  

12%  SOLR  18%  

Database  35%  

Content  6%  

Load  Balancer  6%  

Resource  Guess  2  

Alfresco  and  Share   Transforma2ons   SOLR  

Database   Content   Load  Balancer  

Page 11: Alfresco Day Roma 2015: Full Stack Load Testing

Load Test Accuracy

Page 12: Alfresco Day Roma 2015: Full Stack Load Testing

Load Test Risk Factors: Scale

•  Increases Cost –  Your Time –  Getting the data in does not normally produce results

•  Bulk Loading –  Different hardware for this phase? –  Simulate bulk loading as accurately as necessary

•  Number of Documents –  Easier to account for with experience –  Data storage costs –  Backup/Restore procedures

•  Users and Groups –  LDAP sync –  Complex Group Hierarchy –  Site Group Permissions –  Mass-authentication

Load Test Accuracy

Page 13: Alfresco Day Roma 2015: Full Stack Load Testing

Load Test Risk Factors: Documents •  Document Types

–  Image thumbnail generation –  Text to PDF for preview –  Document library listings (many transformations a.s.a.p)

•  Document Size –  Network and IO costs and limits –  CPU used for streaming –  PDF to text memory consumption –  External converters

•  More CPU or more infrastructure

Load Test Accuracy

Page 14: Alfresco Day Roma 2015: Full Stack Load Testing

Load Test Risk Factors: API Usage Profile •  Load Profile

–  Burst load –  Trickle load

•  Data Structure –  Paging –  Sorting –  Permissions

•  The Internet –  CMIS across the Atlantic –  Southern hemisphere client apps

Load Test Accuracy

Page 15: Alfresco Day Roma 2015: Full Stack Load Testing

Load Test Risk Factors: UI Complexity •  Share APIs

–  /private •  Upload File

–  Stream binary –  Then all of these at once:

•  Register user activity •  Generate thumbnail •  Generate PDF preview and display •  Get and display document metadata •  Get and display document version history

•  Replay Doom (You Only Live Once)

Load Test Accuracy

Page 16: Alfresco Day Roma 2015: Full Stack Load Testing

Load Test Risk Factors: UI Complexity Load Test Accuracy

Page 17: Alfresco Day Roma 2015: Full Stack Load Testing

Load Test Risk Factors: UI Complexity •  Page-Object Pattern: Browsers do what they do

Login Event Processor Login Page Dashboard Page Browser

processEvent loginAs

Send keystrokes

Login button click DashboardPage

Tim

ed

render Wait For: Activities

Wait For: My Sites

Wait For: My Sites

Wait For: My Sites

Wait For: My Docs

Wait For: etc

Increasing Complexity

Server

x100

Load Test Accuracy

Page 18: Alfresco Day Roma 2015: Full Stack Load Testing

Load Test Software Alfresco Benchmark Server and Tests

Page 19: Alfresco Day Roma 2015: Full Stack Load Testing

References •  Martin Bergljung’s walkthrough •  Alfresco Wiki: Benchmark_Testing_with_Alfresco •  GitHub: AlfrescoBenchmark

Test Software

Page 20: Alfresco Day Roma 2015: Full Stack Load Testing

Alfresco Benchmark Suite

Test Software

Benchmark  Server  

Tomcat  7  

Rest  API  

MongoDB  Config  Data  

Services  

MongoDB  Test  Data  

UI  

Benchmark  Driver  (xN)  Benchmark  Driver  (xN)  Benchmark  Driver  

Tomcat  7   Extras  (Selenium)  

Servers  /  APIs   Servers  /  APIs  

Load  Balancer  

Servers  /  APIs  

Test  

Services  

Rest  API  

Page 21: Alfresco Day Roma 2015: Full Stack Load Testing

Load Tests: /tests/ent-signup •  Create users •  User base reused

–  Prerequisite for other tests

Test Software

Page 22: Alfresco Day Roma 2015: Full Stack Load Testing

Load Tests: /tests/dataload •  Reuse user base •  Create

–  Sites –  Site Members

•  Site data –  Folders –  Files uploaded using CMIS or

Test Software

Page 23: Alfresco Day Roma 2015: Full Stack Load Testing

Load Tests: /tests/dataload •  AlfrescoBenchmark/alfresco-text-gen

•  Text data generated in server •  Option to push data

into ContentStore

Test Software

Page 24: Alfresco Day Roma 2015: Full Stack Load Testing

Load Tests: GitHub benchmark-cmis •  Burst load •  Easy to extend

Test Software

Page 25: Alfresco Day Roma 2015: Full Stack Load Testing

Load Tests: FTP sample files vs spoofing •  FTP server

–  A few thousand samples –  Use for Share tests

•  Transformations •  Text extractions •  Renditions

•  Spoofing –  Stress SOLR –  document library size

•  Search: searchterms.txt

Test Software

Page 26: Alfresco Day Roma 2015: Full Stack Load Testing

Share Load Testing: /tests/share •  Concurrent Users:

–  A new user logs in every N seconds –  The user logs out after spending Y seconds –  Number of concurrent users C = Y/N

•  Selenium Driver Overload –  Use Windows –  5s to start a browser on EC2 m3.2xlarge –  Up to 40 browsers per load driver on EC2 m3.2xlarge –  Drivers required D = max( 5s/N, C/40) –  m3.2xlarge Windows à spot price of $0.3/hour –  500 concurrent user à20 drivers à $6/hour

Test Software

Page 27: Alfresco Day Roma 2015: Full Stack Load Testing

Summary

Page 28: Alfresco Day Roma 2015: Full Stack Load Testing

Summary •  Build up load testing software and skills •  Design tests around existing tools

–  Understand risks and where to extend or introduce new tests •  Iterate

Summ

ary

Page 29: Alfresco Day Roma 2015: Full Stack Load Testing

Questions

Page 30: Alfresco Day Roma 2015: Full Stack Load Testing

Thank you!

Condividi su

#AlfrescoDayRoma


Recommended