SlideShare a Scribd company logo
Stress Testing and Analysing
MapServer Performance
Seth Girvin, Compass Informatics
• Used by 30 Local Authorities to manage local roads
• MapServer accessed through browser and desktop
• Built using MapServer, OpenLayers, GeoExt, ExtJS, .NET and SQL Server
Background: Ireland’s Pavement Management System
Why test performance?
It seems a little slower in the
new version?
What are your hardware
requirements for the new
hosting?
Would moving to Linux
speed things up?
One of my map layers isn’t
loading!
Why isn’t my A0
map printing?
Measure Usage: Import web server log files into a database
• Over 2 years of data
• Over 2 million requests
• Over 1 million MapServer requests
Review of logs:
• Avoid premature optimisation
• Most requests are for a few layers
• GetLegendGraphic called for each layer at each scale
Usage Review
• Over 700 distinct IP
addresses (users) in
2016
• Currently around 60
users a day
• Python code not a UI or XML - easy to customise and extend if you know
Python
• Each user is a lightweight process (not thread) so can simulate 100s of users
(using the gevent library)
• MIT license
“Locust is an easy-to-use, distributed, user load testing tool. Intended for
load testing web sites (or other systems) and figuring out how many
concurrent users a system can handle.”
http://locust.io/
Simulating Real Users
Modelling Users with Locust
from locust import HttpLocust, TaskSet, task
class OWSTaskSet(TaskSet):
def on_start(self):
self.layer = 'MyLayer'
self.app = "/cgi-bin/mapserv?"
def get_response(self, name, params):
with self.client.get(self.app, params=params, verify=False,
name=name, catch_response=True) as response:
if response.headers['content-type'] == 'application/vnd.ogc.se_xml':
# if MapServer returns an error then log this with Locust
response.failure(response.content)
@task(1)
def get_wfs_featurecount(self):
"""
Only supported by WFS 1.1.0 not 1.0.0
"""
params = {'SERVICE': 'WFS', 'VERSION': '1.1.0',
'REQUEST': 'GetFeature', 'resultType': 'hits'}
params["TYPENAME"] = self.layer
self.get_response("GetFeature_%s" % self.layer, params)
class OWSUser(HttpLocust):
task_set = OWSTaskSet
min_wait = 5000 # minimum time between user requests
max_wait = 15000 # maximum time
Then add task set to a user:
Add tasks and weightings:
TODO – ADD UI PICTURE
CHECK – MEASURED IN MS?
SELECT [date], DATEPART(HOUR, [time]), count(c_ip)
FROM pms
WHERE cs_uri_stem = '/mapserver/'
GROUP BY [date], DATEPART(HOUR, TIME), c_ip
ORDER BY count(c_ip) DESC
Getting the heaviest load on the server
Formula for concurrent users:
Hourly Sessions x Average Session Duration (in seconds) / 3,600
Monday 6th June 2016 at 2pm:
• 12,428 MapServer requests
• 19 concurrent users
When does MapServer fall down?
…cannot watch more than 1024 sockets
Time to experiment!
MapServer versus Lorem Ipsum
OGR versus Native Driver
http://mapserver.org/input/vector/mssql.htmlhttp://www.gdal.org/drv_mssqlspatial.html
• Processor: Intel(R) Xeon(R) CPU E5-2640 v3 @ 2.60GHz
• Memory: 8 GB
Windows versus Ubuntu
• Monitor and review usage
• Optimise only what is necessary
• Don’t assume - measure
Key Points
sgirvin@compass.ie
Questions?
• http://mapserver.org/
• http://locust.io/
• http://bit.ly/2bxboRm (Gist)

More Related Content

What's hot

Powershell For Developers
Powershell For DevelopersPowershell For Developers
Powershell For Developers
Ido Flatow
 
Automating Your Microsoft Azure Environment (DevLink 2014)
Automating Your Microsoft Azure Environment (DevLink 2014)Automating Your Microsoft Azure Environment (DevLink 2014)
Automating Your Microsoft Azure Environment (DevLink 2014)
Michael Collier
 
Azure functions
Azure functionsAzure functions
Azure functions
EducationTamil
 
Deep Dive into AWS ECS and Spot Instances at Scale
Deep Dive into AWS ECS and Spot Instances at ScaleDeep Dive into AWS ECS and Spot Instances at Scale
Deep Dive into AWS ECS and Spot Instances at Scale
Pahud Hsieh
 
Container Orchestration with Amazon ECS
Container Orchestration with Amazon ECSContainer Orchestration with Amazon ECS
Container Orchestration with Amazon ECS
Amazon Web Services
 
Embracing HTTP in the era of API’s
Embracing HTTP in the era of API’sEmbracing HTTP in the era of API’s
Embracing HTTP in the era of API’s
Visug
 
Massimo Bonanni - Workflow as code with Azure Durable Functions - Codemotion ...
Massimo Bonanni - Workflow as code with Azure Durable Functions - Codemotion ...Massimo Bonanni - Workflow as code with Azure Durable Functions - Codemotion ...
Massimo Bonanni - Workflow as code with Azure Durable Functions - Codemotion ...
Codemotion
 
Qui Quaerit, Reperit. AWS Elasticsearch in Action
Qui Quaerit, Reperit. AWS Elasticsearch in ActionQui Quaerit, Reperit. AWS Elasticsearch in Action
Qui Quaerit, Reperit. AWS Elasticsearch in Action
GlobalLogic Ukraine
 
Desired state-configuration-ravikanth-august-2013-vtc india
Desired state-configuration-ravikanth-august-2013-vtc indiaDesired state-configuration-ravikanth-august-2013-vtc india
Desired state-configuration-ravikanth-august-2013-vtc india
Ravikanth Chaganti
 
Introduction to Elastic Beanstalk
Introduction to Elastic BeanstalkIntroduction to Elastic Beanstalk
Introduction to Elastic Beanstalk
Wolfgang Schell
 
Managing state in Angular 1.x with Redux
Managing state in Angular 1.x with ReduxManaging state in Angular 1.x with Redux
Managing state in Angular 1.x with Redux
500Tech
 
Amazon Web Services lection 5
Amazon Web Services lection 5  Amazon Web Services lection 5
Amazon Web Services lection 5
Binary Studio
 
What's New for the Windows Azure Developer? Lots! (July 2013)
What's New for the Windows Azure Developer?  Lots! (July 2013)What's New for the Windows Azure Developer?  Lots! (July 2013)
What's New for the Windows Azure Developer? Lots! (July 2013)
Michael Collier
 
Automating your Infrastructure Deployment with AWS CloudFormation and AWS Ops...
Automating your Infrastructure Deployment with AWS CloudFormation and AWS Ops...Automating your Infrastructure Deployment with AWS CloudFormation and AWS Ops...
Automating your Infrastructure Deployment with AWS CloudFormation and AWS Ops...
Amazon Web Services
 
Amazon Web Services lection 2
Amazon Web Services lection 2Amazon Web Services lection 2
Amazon Web Services lection 2
Binary Studio
 
Understand AWS OpsWorks - A DevOps Tool from AWS
Understand AWS OpsWorks - A DevOps Tool from AWSUnderstand AWS OpsWorks - A DevOps Tool from AWS
Understand AWS OpsWorks - A DevOps Tool from AWS
devopsjourney
 
Introduction to akka actors with java 8
Introduction to akka actors with java 8Introduction to akka actors with java 8
Introduction to akka actors with java 8
Johan Andrén
 
Programming Azure Active Directory (DevLink 2014)
Programming Azure Active Directory (DevLink 2014)Programming Azure Active Directory (DevLink 2014)
Programming Azure Active Directory (DevLink 2014)
Michael Collier
 
Welcome to Web Services
Welcome to Web ServicesWelcome to Web Services
Welcome to Web Services
Shivinder Kaur
 
Walk-through: Amazon ECS
Walk-through: Amazon ECSWalk-through: Amazon ECS
Walk-through: Amazon ECS
Knoldus Inc.
 

What's hot (20)

Powershell For Developers
Powershell For DevelopersPowershell For Developers
Powershell For Developers
 
Automating Your Microsoft Azure Environment (DevLink 2014)
Automating Your Microsoft Azure Environment (DevLink 2014)Automating Your Microsoft Azure Environment (DevLink 2014)
Automating Your Microsoft Azure Environment (DevLink 2014)
 
Azure functions
Azure functionsAzure functions
Azure functions
 
Deep Dive into AWS ECS and Spot Instances at Scale
Deep Dive into AWS ECS and Spot Instances at ScaleDeep Dive into AWS ECS and Spot Instances at Scale
Deep Dive into AWS ECS and Spot Instances at Scale
 
Container Orchestration with Amazon ECS
Container Orchestration with Amazon ECSContainer Orchestration with Amazon ECS
Container Orchestration with Amazon ECS
 
Embracing HTTP in the era of API’s
Embracing HTTP in the era of API’sEmbracing HTTP in the era of API’s
Embracing HTTP in the era of API’s
 
Massimo Bonanni - Workflow as code with Azure Durable Functions - Codemotion ...
Massimo Bonanni - Workflow as code with Azure Durable Functions - Codemotion ...Massimo Bonanni - Workflow as code with Azure Durable Functions - Codemotion ...
Massimo Bonanni - Workflow as code with Azure Durable Functions - Codemotion ...
 
Qui Quaerit, Reperit. AWS Elasticsearch in Action
Qui Quaerit, Reperit. AWS Elasticsearch in ActionQui Quaerit, Reperit. AWS Elasticsearch in Action
Qui Quaerit, Reperit. AWS Elasticsearch in Action
 
Desired state-configuration-ravikanth-august-2013-vtc india
Desired state-configuration-ravikanth-august-2013-vtc indiaDesired state-configuration-ravikanth-august-2013-vtc india
Desired state-configuration-ravikanth-august-2013-vtc india
 
Introduction to Elastic Beanstalk
Introduction to Elastic BeanstalkIntroduction to Elastic Beanstalk
Introduction to Elastic Beanstalk
 
Managing state in Angular 1.x with Redux
Managing state in Angular 1.x with ReduxManaging state in Angular 1.x with Redux
Managing state in Angular 1.x with Redux
 
Amazon Web Services lection 5
Amazon Web Services lection 5  Amazon Web Services lection 5
Amazon Web Services lection 5
 
What's New for the Windows Azure Developer? Lots! (July 2013)
What's New for the Windows Azure Developer?  Lots! (July 2013)What's New for the Windows Azure Developer?  Lots! (July 2013)
What's New for the Windows Azure Developer? Lots! (July 2013)
 
Automating your Infrastructure Deployment with AWS CloudFormation and AWS Ops...
Automating your Infrastructure Deployment with AWS CloudFormation and AWS Ops...Automating your Infrastructure Deployment with AWS CloudFormation and AWS Ops...
Automating your Infrastructure Deployment with AWS CloudFormation and AWS Ops...
 
Amazon Web Services lection 2
Amazon Web Services lection 2Amazon Web Services lection 2
Amazon Web Services lection 2
 
Understand AWS OpsWorks - A DevOps Tool from AWS
Understand AWS OpsWorks - A DevOps Tool from AWSUnderstand AWS OpsWorks - A DevOps Tool from AWS
Understand AWS OpsWorks - A DevOps Tool from AWS
 
Introduction to akka actors with java 8
Introduction to akka actors with java 8Introduction to akka actors with java 8
Introduction to akka actors with java 8
 
Programming Azure Active Directory (DevLink 2014)
Programming Azure Active Directory (DevLink 2014)Programming Azure Active Directory (DevLink 2014)
Programming Azure Active Directory (DevLink 2014)
 
Welcome to Web Services
Welcome to Web ServicesWelcome to Web Services
Welcome to Web Services
 
Walk-through: Amazon ECS
Walk-through: Amazon ECSWalk-through: Amazon ECS
Walk-through: Amazon ECS
 

Similar to Stress Testing and Analysing MapServer Performance

Monitoring Weave Cloud with Prometheus
Monitoring Weave Cloud with PrometheusMonitoring Weave Cloud with Prometheus
Monitoring Weave Cloud with Prometheus
Weaveworks
 
One App, Many Clients: Converting an APEX Application to Multi-Tenant
One App, Many Clients: Converting an APEX Application to Multi-TenantOne App, Many Clients: Converting an APEX Application to Multi-Tenant
One App, Many Clients: Converting an APEX Application to Multi-Tenant
Jeffrey Kemp
 
Building Web Apps with Express
Building Web Apps with ExpressBuilding Web Apps with Express
Building Web Apps with Express
Aaron Stannard
 
Apache Samza 1.0 - What's New, What's Next
Apache Samza 1.0 - What's New, What's NextApache Samza 1.0 - What's New, What's Next
Apache Samza 1.0 - What's New, What's Next
Prateek Maheshwari
 
540slidesofnodejsbackendhopeitworkforu.pdf
540slidesofnodejsbackendhopeitworkforu.pdf540slidesofnodejsbackendhopeitworkforu.pdf
540slidesofnodejsbackendhopeitworkforu.pdf
hamzadamani7
 
Node js introduction
Node js introductionNode js introduction
Node js introduction
Alex Su
 
Hadoop cluster performance profiler
Hadoop cluster performance profilerHadoop cluster performance profiler
Hadoop cluster performance profiler
Ihor Bobak
 
Node Interactive: Node.js Performance and Highly Scalable Micro-Services
Node Interactive: Node.js Performance and Highly Scalable Micro-ServicesNode Interactive: Node.js Performance and Highly Scalable Micro-Services
Node Interactive: Node.js Performance and Highly Scalable Micro-Services
Chris Bailey
 
Writing robust Node.js applications
Writing robust Node.js applicationsWriting robust Node.js applications
Writing robust Node.js applications
Tom Croucher
 
Intro to node and mongodb 1
Intro to node and mongodb   1Intro to node and mongodb   1
Intro to node and mongodb 1
Mohammad Qureshi
 
How to Contribute to Apache Usergrid
How to Contribute to Apache UsergridHow to Contribute to Apache Usergrid
How to Contribute to Apache Usergrid
David M. Johnson
 
Velocity 2018 preetha appan final
Velocity 2018   preetha appan finalVelocity 2018   preetha appan final
Velocity 2018 preetha appan final
preethaappan
 
Intro To webOS
Intro To webOSIntro To webOS
Intro To webOS
fpatton
 
Yaroslav Nedashkovsky "How to manage hundreds of pipelines for processing da...
Yaroslav Nedashkovsky  "How to manage hundreds of pipelines for processing da...Yaroslav Nedashkovsky  "How to manage hundreds of pipelines for processing da...
Yaroslav Nedashkovsky "How to manage hundreds of pipelines for processing da...
Lviv Startup Club
 
VMworld 2013: Performance Management of Business Critical Applications using ...
VMworld 2013: Performance Management of Business Critical Applications using ...VMworld 2013: Performance Management of Business Critical Applications using ...
VMworld 2013: Performance Management of Business Critical Applications using ...
VMworld
 
Java Web Programming on Google Cloud Platform [1/3] : Google App Engine
Java Web Programming on Google Cloud Platform [1/3] : Google App EngineJava Web Programming on Google Cloud Platform [1/3] : Google App Engine
Java Web Programming on Google Cloud Platform [1/3] : Google App Engine
IMC Institute
 
VMworld 2013: Architecting VMware Horizon Workspace for Scale and Performance
VMworld 2013: Architecting VMware Horizon Workspace for Scale and PerformanceVMworld 2013: Architecting VMware Horizon Workspace for Scale and Performance
VMworld 2013: Architecting VMware Horizon Workspace for Scale and Performance
VMworld
 
DjangoCon 2010 Scaling Disqus
DjangoCon 2010 Scaling DisqusDjangoCon 2010 Scaling Disqus
DjangoCon 2010 Scaling Disqus
zeeg
 
Universal JavaScript
Universal JavaScriptUniversal JavaScript
Universal JavaScript
名辰 洪
 
On-boarding with JanusGraph Performance
On-boarding with JanusGraph PerformanceOn-boarding with JanusGraph Performance
On-boarding with JanusGraph Performance
Chin Huang
 

Similar to Stress Testing and Analysing MapServer Performance (20)

Monitoring Weave Cloud with Prometheus
Monitoring Weave Cloud with PrometheusMonitoring Weave Cloud with Prometheus
Monitoring Weave Cloud with Prometheus
 
One App, Many Clients: Converting an APEX Application to Multi-Tenant
One App, Many Clients: Converting an APEX Application to Multi-TenantOne App, Many Clients: Converting an APEX Application to Multi-Tenant
One App, Many Clients: Converting an APEX Application to Multi-Tenant
 
Building Web Apps with Express
Building Web Apps with ExpressBuilding Web Apps with Express
Building Web Apps with Express
 
Apache Samza 1.0 - What's New, What's Next
Apache Samza 1.0 - What's New, What's NextApache Samza 1.0 - What's New, What's Next
Apache Samza 1.0 - What's New, What's Next
 
540slidesofnodejsbackendhopeitworkforu.pdf
540slidesofnodejsbackendhopeitworkforu.pdf540slidesofnodejsbackendhopeitworkforu.pdf
540slidesofnodejsbackendhopeitworkforu.pdf
 
Node js introduction
Node js introductionNode js introduction
Node js introduction
 
Hadoop cluster performance profiler
Hadoop cluster performance profilerHadoop cluster performance profiler
Hadoop cluster performance profiler
 
Node Interactive: Node.js Performance and Highly Scalable Micro-Services
Node Interactive: Node.js Performance and Highly Scalable Micro-ServicesNode Interactive: Node.js Performance and Highly Scalable Micro-Services
Node Interactive: Node.js Performance and Highly Scalable Micro-Services
 
Writing robust Node.js applications
Writing robust Node.js applicationsWriting robust Node.js applications
Writing robust Node.js applications
 
Intro to node and mongodb 1
Intro to node and mongodb   1Intro to node and mongodb   1
Intro to node and mongodb 1
 
How to Contribute to Apache Usergrid
How to Contribute to Apache UsergridHow to Contribute to Apache Usergrid
How to Contribute to Apache Usergrid
 
Velocity 2018 preetha appan final
Velocity 2018   preetha appan finalVelocity 2018   preetha appan final
Velocity 2018 preetha appan final
 
Intro To webOS
Intro To webOSIntro To webOS
Intro To webOS
 
Yaroslav Nedashkovsky "How to manage hundreds of pipelines for processing da...
Yaroslav Nedashkovsky  "How to manage hundreds of pipelines for processing da...Yaroslav Nedashkovsky  "How to manage hundreds of pipelines for processing da...
Yaroslav Nedashkovsky "How to manage hundreds of pipelines for processing da...
 
VMworld 2013: Performance Management of Business Critical Applications using ...
VMworld 2013: Performance Management of Business Critical Applications using ...VMworld 2013: Performance Management of Business Critical Applications using ...
VMworld 2013: Performance Management of Business Critical Applications using ...
 
Java Web Programming on Google Cloud Platform [1/3] : Google App Engine
Java Web Programming on Google Cloud Platform [1/3] : Google App EngineJava Web Programming on Google Cloud Platform [1/3] : Google App Engine
Java Web Programming on Google Cloud Platform [1/3] : Google App Engine
 
VMworld 2013: Architecting VMware Horizon Workspace for Scale and Performance
VMworld 2013: Architecting VMware Horizon Workspace for Scale and PerformanceVMworld 2013: Architecting VMware Horizon Workspace for Scale and Performance
VMworld 2013: Architecting VMware Horizon Workspace for Scale and Performance
 
DjangoCon 2010 Scaling Disqus
DjangoCon 2010 Scaling DisqusDjangoCon 2010 Scaling Disqus
DjangoCon 2010 Scaling Disqus
 
Universal JavaScript
Universal JavaScriptUniversal JavaScript
Universal JavaScript
 
On-boarding with JanusGraph Performance
On-boarding with JanusGraph PerformanceOn-boarding with JanusGraph Performance
On-boarding with JanusGraph Performance
 

Recently uploaded

Enhanced Screen Flows UI/UX using SLDS with Tom Kitt
Enhanced Screen Flows UI/UX using SLDS with Tom KittEnhanced Screen Flows UI/UX using SLDS with Tom Kitt
Enhanced Screen Flows UI/UX using SLDS with Tom Kitt
Peter Caitens
 
Webinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for EmbeddedWebinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for Embedded
ICS
 
How Can Hiring A Mobile App Development Company Help Your Business Grow?
How Can Hiring A Mobile App Development Company Help Your Business Grow?How Can Hiring A Mobile App Development Company Help Your Business Grow?
How Can Hiring A Mobile App Development Company Help Your Business Grow?
ToXSL Technologies
 
Migration From CH 1.0 to CH 2.0 and Mule 4.6 & Java 17 Upgrade.pptx
Migration From CH 1.0 to CH 2.0 and  Mule 4.6 & Java 17 Upgrade.pptxMigration From CH 1.0 to CH 2.0 and  Mule 4.6 & Java 17 Upgrade.pptx
Migration From CH 1.0 to CH 2.0 and Mule 4.6 & Java 17 Upgrade.pptx
ervikas4
 
Kubernetes at Scale: Going Multi-Cluster with Istio
Kubernetes at Scale:  Going Multi-Cluster  with IstioKubernetes at Scale:  Going Multi-Cluster  with Istio
Kubernetes at Scale: Going Multi-Cluster with Istio
Severalnines
 
DECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSIS
DECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSISDECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSIS
DECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSIS
Tier1 app
 
The Key to Digital Success_ A Comprehensive Guide to Continuous Testing Integ...
The Key to Digital Success_ A Comprehensive Guide to Continuous Testing Integ...The Key to Digital Success_ A Comprehensive Guide to Continuous Testing Integ...
The Key to Digital Success_ A Comprehensive Guide to Continuous Testing Integ...
kalichargn70th171
 
ppt on the brain chip neuralink.pptx
ppt  on   the brain  chip neuralink.pptxppt  on   the brain  chip neuralink.pptx
ppt on the brain chip neuralink.pptx
Reetu63
 
Using Query Store in Azure PostgreSQL to Understand Query Performance
Using Query Store in Azure PostgreSQL to Understand Query PerformanceUsing Query Store in Azure PostgreSQL to Understand Query Performance
Using Query Store in Azure PostgreSQL to Understand Query Performance
Grant Fritchey
 
一比一原版(sdsu毕业证书)圣地亚哥州立大学毕业证如何办理
一比一原版(sdsu毕业证书)圣地亚哥州立大学毕业证如何办理一比一原版(sdsu毕业证书)圣地亚哥州立大学毕业证如何办理
一比一原版(sdsu毕业证书)圣地亚哥州立大学毕业证如何办理
kgyxske
 
Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)
Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)
Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)
safelyiotech
 
Why Apache Kafka Clusters Are Like Galaxies (And Other Cosmic Kafka Quandarie...
Why Apache Kafka Clusters Are Like Galaxies (And Other Cosmic Kafka Quandarie...Why Apache Kafka Clusters Are Like Galaxies (And Other Cosmic Kafka Quandarie...
Why Apache Kafka Clusters Are Like Galaxies (And Other Cosmic Kafka Quandarie...
Paul Brebner
 
Energy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina JonuziEnergy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina Jonuzi
Green Software Development
 
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CDKuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
rodomar2
 
Unveiling the Advantages of Agile Software Development.pdf
Unveiling the Advantages of Agile Software Development.pdfUnveiling the Advantages of Agile Software Development.pdf
Unveiling the Advantages of Agile Software Development.pdf
brainerhub1
 
Enums On Steroids - let's look at sealed classes !
Enums On Steroids - let's look at sealed classes !Enums On Steroids - let's look at sealed classes !
Enums On Steroids - let's look at sealed classes !
Marcin Chrost
 
Project Management: The Role of Project Dashboards.pdf
Project Management: The Role of Project Dashboards.pdfProject Management: The Role of Project Dashboards.pdf
Project Management: The Role of Project Dashboards.pdf
Karya Keeper
 
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
XfilesPro
 
INTRODUCTION TO AI CLASSICAL THEORY TARGETED EXAMPLES
INTRODUCTION TO AI CLASSICAL THEORY TARGETED EXAMPLESINTRODUCTION TO AI CLASSICAL THEORY TARGETED EXAMPLES
INTRODUCTION TO AI CLASSICAL THEORY TARGETED EXAMPLES
anfaltahir1010
 
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, FactsALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
Green Software Development
 

Recently uploaded (20)

Enhanced Screen Flows UI/UX using SLDS with Tom Kitt
Enhanced Screen Flows UI/UX using SLDS with Tom KittEnhanced Screen Flows UI/UX using SLDS with Tom Kitt
Enhanced Screen Flows UI/UX using SLDS with Tom Kitt
 
Webinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for EmbeddedWebinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for Embedded
 
How Can Hiring A Mobile App Development Company Help Your Business Grow?
How Can Hiring A Mobile App Development Company Help Your Business Grow?How Can Hiring A Mobile App Development Company Help Your Business Grow?
How Can Hiring A Mobile App Development Company Help Your Business Grow?
 
Migration From CH 1.0 to CH 2.0 and Mule 4.6 & Java 17 Upgrade.pptx
Migration From CH 1.0 to CH 2.0 and  Mule 4.6 & Java 17 Upgrade.pptxMigration From CH 1.0 to CH 2.0 and  Mule 4.6 & Java 17 Upgrade.pptx
Migration From CH 1.0 to CH 2.0 and Mule 4.6 & Java 17 Upgrade.pptx
 
Kubernetes at Scale: Going Multi-Cluster with Istio
Kubernetes at Scale:  Going Multi-Cluster  with IstioKubernetes at Scale:  Going Multi-Cluster  with Istio
Kubernetes at Scale: Going Multi-Cluster with Istio
 
DECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSIS
DECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSISDECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSIS
DECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSIS
 
The Key to Digital Success_ A Comprehensive Guide to Continuous Testing Integ...
The Key to Digital Success_ A Comprehensive Guide to Continuous Testing Integ...The Key to Digital Success_ A Comprehensive Guide to Continuous Testing Integ...
The Key to Digital Success_ A Comprehensive Guide to Continuous Testing Integ...
 
ppt on the brain chip neuralink.pptx
ppt  on   the brain  chip neuralink.pptxppt  on   the brain  chip neuralink.pptx
ppt on the brain chip neuralink.pptx
 
Using Query Store in Azure PostgreSQL to Understand Query Performance
Using Query Store in Azure PostgreSQL to Understand Query PerformanceUsing Query Store in Azure PostgreSQL to Understand Query Performance
Using Query Store in Azure PostgreSQL to Understand Query Performance
 
一比一原版(sdsu毕业证书)圣地亚哥州立大学毕业证如何办理
一比一原版(sdsu毕业证书)圣地亚哥州立大学毕业证如何办理一比一原版(sdsu毕业证书)圣地亚哥州立大学毕业证如何办理
一比一原版(sdsu毕业证书)圣地亚哥州立大学毕业证如何办理
 
Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)
Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)
Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)
 
Why Apache Kafka Clusters Are Like Galaxies (And Other Cosmic Kafka Quandarie...
Why Apache Kafka Clusters Are Like Galaxies (And Other Cosmic Kafka Quandarie...Why Apache Kafka Clusters Are Like Galaxies (And Other Cosmic Kafka Quandarie...
Why Apache Kafka Clusters Are Like Galaxies (And Other Cosmic Kafka Quandarie...
 
Energy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina JonuziEnergy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina Jonuzi
 
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CDKuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
 
Unveiling the Advantages of Agile Software Development.pdf
Unveiling the Advantages of Agile Software Development.pdfUnveiling the Advantages of Agile Software Development.pdf
Unveiling the Advantages of Agile Software Development.pdf
 
Enums On Steroids - let's look at sealed classes !
Enums On Steroids - let's look at sealed classes !Enums On Steroids - let's look at sealed classes !
Enums On Steroids - let's look at sealed classes !
 
Project Management: The Role of Project Dashboards.pdf
Project Management: The Role of Project Dashboards.pdfProject Management: The Role of Project Dashboards.pdf
Project Management: The Role of Project Dashboards.pdf
 
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
 
INTRODUCTION TO AI CLASSICAL THEORY TARGETED EXAMPLES
INTRODUCTION TO AI CLASSICAL THEORY TARGETED EXAMPLESINTRODUCTION TO AI CLASSICAL THEORY TARGETED EXAMPLES
INTRODUCTION TO AI CLASSICAL THEORY TARGETED EXAMPLES
 
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, FactsALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
 

Stress Testing and Analysing MapServer Performance

  • 1. Stress Testing and Analysing MapServer Performance Seth Girvin, Compass Informatics
  • 2. • Used by 30 Local Authorities to manage local roads • MapServer accessed through browser and desktop • Built using MapServer, OpenLayers, GeoExt, ExtJS, .NET and SQL Server Background: Ireland’s Pavement Management System
  • 3. Why test performance? It seems a little slower in the new version? What are your hardware requirements for the new hosting? Would moving to Linux speed things up? One of my map layers isn’t loading! Why isn’t my A0 map printing?
  • 4. Measure Usage: Import web server log files into a database • Over 2 years of data • Over 2 million requests • Over 1 million MapServer requests
  • 5. Review of logs: • Avoid premature optimisation • Most requests are for a few layers • GetLegendGraphic called for each layer at each scale Usage Review • Over 700 distinct IP addresses (users) in 2016 • Currently around 60 users a day
  • 6. • Python code not a UI or XML - easy to customise and extend if you know Python • Each user is a lightweight process (not thread) so can simulate 100s of users (using the gevent library) • MIT license “Locust is an easy-to-use, distributed, user load testing tool. Intended for load testing web sites (or other systems) and figuring out how many concurrent users a system can handle.” http://locust.io/ Simulating Real Users
  • 7. Modelling Users with Locust from locust import HttpLocust, TaskSet, task class OWSTaskSet(TaskSet): def on_start(self): self.layer = 'MyLayer' self.app = "/cgi-bin/mapserv?" def get_response(self, name, params): with self.client.get(self.app, params=params, verify=False, name=name, catch_response=True) as response: if response.headers['content-type'] == 'application/vnd.ogc.se_xml': # if MapServer returns an error then log this with Locust response.failure(response.content)
  • 8. @task(1) def get_wfs_featurecount(self): """ Only supported by WFS 1.1.0 not 1.0.0 """ params = {'SERVICE': 'WFS', 'VERSION': '1.1.0', 'REQUEST': 'GetFeature', 'resultType': 'hits'} params["TYPENAME"] = self.layer self.get_response("GetFeature_%s" % self.layer, params) class OWSUser(HttpLocust): task_set = OWSTaskSet min_wait = 5000 # minimum time between user requests max_wait = 15000 # maximum time Then add task set to a user: Add tasks and weightings:
  • 9. TODO – ADD UI PICTURE CHECK – MEASURED IN MS?
  • 10. SELECT [date], DATEPART(HOUR, [time]), count(c_ip) FROM pms WHERE cs_uri_stem = '/mapserver/' GROUP BY [date], DATEPART(HOUR, TIME), c_ip ORDER BY count(c_ip) DESC Getting the heaviest load on the server Formula for concurrent users: Hourly Sessions x Average Session Duration (in seconds) / 3,600 Monday 6th June 2016 at 2pm: • 12,428 MapServer requests • 19 concurrent users
  • 11. When does MapServer fall down? …cannot watch more than 1024 sockets
  • 14.
  • 15. OGR versus Native Driver http://mapserver.org/input/vector/mssql.htmlhttp://www.gdal.org/drv_mssqlspatial.html
  • 16.
  • 17. • Processor: Intel(R) Xeon(R) CPU E5-2640 v3 @ 2.60GHz • Memory: 8 GB Windows versus Ubuntu
  • 18.
  • 19. • Monitor and review usage • Optimise only what is necessary • Don’t assume - measure Key Points