Solr Power FTW
   Robby Morgan
What Will I Cover?

● Who I am

● Why/how we use SOLR

● Can SOLR handle 20K queries per second?

● Lessons learned: large scale multi data center deployment

● Conclusion
Robby Morgan

● Software Engineering Lead

● 3 yrs experience w/
  Solr @ Bazaarvoice

● Jack of all trades, master of some :)
Bazaarvoice

● Bazaarvoice is a software as a service
  company powering User Generated Content
  such as ratings and reviews
  on thousands of web sites


● 5 billion page views per month

● 230 billion impressions

● 75 million UGC
SOLR Case Study
SOLR Case Study
Life Before SOLR

● Indexes for sorting and filtering

● Aggregate tables for stats

● Nightly jobs

● Bugs...
Enter SOLR

● Index content and product catalog
● De-normalization
● Filtering, faceting/stats and sorting
● Index every 15 minutes (20 seconds NRT)
SOLR usage @ Bazaarvoice

   Documents         250 MM

   Index size        200 GB

   QPS, avg          2,350

   QPS, max          10,200

   Response time, avg 12 ms

   Servers           6+20
SOLR Cloud @ Bazaarvoice

● Multiple cores (100+ per server)

● Re-balance indexes across cores and servers
   ○ Automatic
   ○ Manual

● Deployment map stored in MySQL
   ○ Host - Core - Partition
   ○ Statistics

● Partition lifecycle
Scaling reads - Replication
Replication - Multiple Data Centers
Lessons: SOLR Performance

● SOLR loves RAM!
                                     SOLR

● Simulate and measure
   ○ Same config, same hardware

● Get the most out of one instance
Lessons: Cross-DC Replication

Chatty if using multiple cores

Relay
 ● Core auto-warming disabled
 ● Connection wait and read timeouts increased
 ● Replication poll interval increased (15 min)
 ● Compression enabled
...
<str name="httpConnTimeout">20000</str>
<str name="httpReadTimeout">65000</str>
<str name="pollInterval">00:15:00</str>
<str name="compression">internal</str>
...
Performance Tuning

 ● Heap size
 ● Cache sizing
 ● Auto-warming
 ● Stored fields
 ● Merge factor
 ● Commit frequency
 ● Optimize frequency
Process: Simulate and measure
 ● Replay logs
 ● Analyze metrics
 ● Monitor GC
Performance Tuning - GC

# Java memory usage settings
# Force the NewSize to be larger than the JVM typically allocates.
# In practice, the JVM has been allocating an extremely small Young generation
which objects to be prematurely promoted to the Tenured generation
JAVA_MEM_OPTS="-Xms27g -Xmx27g -XX:NewRatio=8"

# -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps --> Turn on GC Logging
# -XX:+UseConcMarkSweepGC        --> Use the concurrent collector
# -XX:+CMSIncrementalMode        --> Incremental mode for the concurrent collector
# -XX:+CMSIncrementalPacing      --> Let the JVM adjust the amount of incremental
collection

JAVA_GC_OPTS="-verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:
+UseConcMarkSweepGC -XX:+UseParNewGC -XX:CMSInitiatingOccupancyFraction=55 -XX:
ParallelGCThreads=8 -XX:SurvivorRatio=4"
Lessons: Schema Changes

● Re-indexing is time consuming for large indexes

● Process:

  1. Full re-index off-line prior to the release
  2. Incremental indexing after the release

● Bottleneck: reading from MySQL

● Goal: Transparent on-line re-indexing
Conclusion - SOLR Strengths

● Not only full-text search

● Lightning fast given enough RAM

● Good scale out support
  including multi-data center

● Great community, wide range of use cases
Conclusion - SOLR's Gaps

● Not fully elastic

● Real time takes work

● Secondary data store = sync overhead, inconsistencies

● Schema changes
Questions




            robby.morgan@
            bazaarvoice.com

        developer.bazaarvoice.com

More Related Content

PDF
Austin bdug 2011_01_27_small_and_big_data
PDF
The Dark Side Of Go -- Go runtime related problems in TiDB in production
PPTX
KDB+ Lite
PDF
刘诚忠:Running cloudera impala on postgre sql
PPTX
Scylla Summit 2018: Kiwi.com Migration to Scylla - The Why, the How, the Fail...
PPTX
Scylla Summit 2022: New AWS Instances Perfect for ScyllaDB
PPTX
ScyllaDB's Avi Kivity on UDF, UDA, and the Future
PDF
Presto Summit 2018 - 10 - Qubole
Austin bdug 2011_01_27_small_and_big_data
The Dark Side Of Go -- Go runtime related problems in TiDB in production
KDB+ Lite
刘诚忠:Running cloudera impala on postgre sql
Scylla Summit 2018: Kiwi.com Migration to Scylla - The Why, the How, the Fail...
Scylla Summit 2022: New AWS Instances Perfect for ScyllaDB
ScyllaDB's Avi Kivity on UDF, UDA, and the Future
Presto Summit 2018 - 10 - Qubole

What's hot (20)

PDF
21st Athens Big Data Meetup - 1st Talk - Fast and simple data exploration wit...
KEY
MongoDB SF Ruby
PDF
Presto talk @ Global AI conference 2018 Boston
PDF
10 EZ Steps to SOLR Domination - Berlin Buzzwords 2012
PDF
TiDB DevCon 2020 Opening Keynote
PDF
Xldb2011 tue 1120_youtube_datawarehouse
PPTX
Aerospike - fast and furious caching @ Burgasconf 2016
PDF
Monitoring with Clickhouse
PDF
Hadoop con2016 - Implement Real-time Centralized logging System by Elastic Stack
PPTX
MongoDB vs Scylla: Production Experience from Both Dev & Ops Standpoint at Nu...
PDF
Presto Summit 2018 - 04 - Netflix Containers
PPTX
Cost Effective Presto on AWS with Spot Nodes - Strata SF 2019
PPTX
Amazon Web Services lection 4
PDF
Scaling Up with PHP and AWS
PPTX
2013 DATA @ NFLX (Tableau User Group)
PDF
Presentation at SF Kubernetes Meetup (10/30/18), Introducing TiDB/TiKV
PPTX
Open source big data landscape and possible ITS applications
PPTX
Scylla Summit 2018: Cassandra and ScyllaDB at Yahoo! Japan
PPTX
Data- How Does It Work-
PDF
Small intro to Big Data - Old version
21st Athens Big Data Meetup - 1st Talk - Fast and simple data exploration wit...
MongoDB SF Ruby
Presto talk @ Global AI conference 2018 Boston
10 EZ Steps to SOLR Domination - Berlin Buzzwords 2012
TiDB DevCon 2020 Opening Keynote
Xldb2011 tue 1120_youtube_datawarehouse
Aerospike - fast and furious caching @ Burgasconf 2016
Monitoring with Clickhouse
Hadoop con2016 - Implement Real-time Centralized logging System by Elastic Stack
MongoDB vs Scylla: Production Experience from Both Dev & Ops Standpoint at Nu...
Presto Summit 2018 - 04 - Netflix Containers
Cost Effective Presto on AWS with Spot Nodes - Strata SF 2019
Amazon Web Services lection 4
Scaling Up with PHP and AWS
2013 DATA @ NFLX (Tableau User Group)
Presentation at SF Kubernetes Meetup (10/30/18), Introducing TiDB/TiKV
Open source big data landscape and possible ITS applications
Scylla Summit 2018: Cassandra and ScyllaDB at Yahoo! Japan
Data- How Does It Work-
Small intro to Big Data - Old version
Ad

Similar to SOLR Power FTW: short version (20)

PDF
Solr Power FTW: Powering NoSQL the World Over
PPTX
Building a Large Scale SEO/SEM Application with Apache Solr
PDF
High Performance Solr and JVM Tuning Strategies used for MapQuest’s Search Ah...
PDF
Solr @ eBay Kleinanzeigen
KEY
ApacheCon Europe 2012 -Big Search 4 Big Data
KEY
Solr 101
PDF
Building a Large Scale SEO/SEM Application with Apache Solr: Presented by Rah...
KEY
Big Search with Big Data Principles
PDF
BP-1 Performance and Scalability
PDF
High Performance Solr
PPTX
MyHeritage backend group - build to scale
PPTX
Apache Solr - search for everyone!
PPT
Faceted Search – the 120 Million Documents Story
PDF
Apache Solr - An Experience Report
ODP
Solr features
PPTX
Benchmarking Solr Performance at Scale
PPTX
Native Code, Off-Heap Data & JSON Facet API for Solr (Heliosearch)
PDF
Living with garbage
PDF
Solr Troubleshooting - Treemap Approach: Presented by Alexandre Rafolovitch, ...
Solr Power FTW: Powering NoSQL the World Over
Building a Large Scale SEO/SEM Application with Apache Solr
High Performance Solr and JVM Tuning Strategies used for MapQuest’s Search Ah...
Solr @ eBay Kleinanzeigen
ApacheCon Europe 2012 -Big Search 4 Big Data
Solr 101
Building a Large Scale SEO/SEM Application with Apache Solr: Presented by Rah...
Big Search with Big Data Principles
BP-1 Performance and Scalability
High Performance Solr
MyHeritage backend group - build to scale
Apache Solr - search for everyone!
Faceted Search – the 120 Million Documents Story
Apache Solr - An Experience Report
Solr features
Benchmarking Solr Performance at Scale
Native Code, Off-Heap Data & JSON Facet API for Solr (Heliosearch)
Living with garbage
Solr Troubleshooting - Treemap Approach: Presented by Alexandre Rafolovitch, ...
Ad

Recently uploaded (20)

PDF
Early detection and classification of bone marrow changes in lumbar vertebrae...
PPTX
AI-driven Assurance Across Your End-to-end Network With ThousandEyes
PDF
Transform-Your-Streaming-Platform-with-AI-Driven-Quality-Engineering.pdf
PPT
Galois Field Theory of Risk: A Perspective, Protocol, and Mathematical Backgr...
PPTX
Configure Apache Mutual Authentication
PDF
Improvisation in detection of pomegranate leaf disease using transfer learni...
PPTX
Internet of Everything -Basic concepts details
PDF
“A New Era of 3D Sensing: Transforming Industries and Creating Opportunities,...
PDF
Transform-Your-Supply-Chain-with-AI-Driven-Quality-Engineering.pdf
PDF
INTERSPEECH 2025 「Recent Advances and Future Directions in Voice Conversion」
PPTX
Training Program for knowledge in solar cell and solar industry
PDF
5-Ways-AI-is-Revolutionizing-Telecom-Quality-Engineering.pdf
PDF
Co-training pseudo-labeling for text classification with support vector machi...
PPTX
Build Your First AI Agent with UiPath.pptx
PPTX
future_of_ai_comprehensive_20250822032121.pptx
PDF
Rapid Prototyping: A lecture on prototyping techniques for interface design
PDF
Produktkatalog für HOBO Datenlogger, Wetterstationen, Sensoren, Software und ...
PPTX
Module 1 Introduction to Web Programming .pptx
PDF
sbt 2.0: go big (Scala Days 2025 edition)
DOCX
search engine optimization ppt fir known well about this
Early detection and classification of bone marrow changes in lumbar vertebrae...
AI-driven Assurance Across Your End-to-end Network With ThousandEyes
Transform-Your-Streaming-Platform-with-AI-Driven-Quality-Engineering.pdf
Galois Field Theory of Risk: A Perspective, Protocol, and Mathematical Backgr...
Configure Apache Mutual Authentication
Improvisation in detection of pomegranate leaf disease using transfer learni...
Internet of Everything -Basic concepts details
“A New Era of 3D Sensing: Transforming Industries and Creating Opportunities,...
Transform-Your-Supply-Chain-with-AI-Driven-Quality-Engineering.pdf
INTERSPEECH 2025 「Recent Advances and Future Directions in Voice Conversion」
Training Program for knowledge in solar cell and solar industry
5-Ways-AI-is-Revolutionizing-Telecom-Quality-Engineering.pdf
Co-training pseudo-labeling for text classification with support vector machi...
Build Your First AI Agent with UiPath.pptx
future_of_ai_comprehensive_20250822032121.pptx
Rapid Prototyping: A lecture on prototyping techniques for interface design
Produktkatalog für HOBO Datenlogger, Wetterstationen, Sensoren, Software und ...
Module 1 Introduction to Web Programming .pptx
sbt 2.0: go big (Scala Days 2025 edition)
search engine optimization ppt fir known well about this

SOLR Power FTW: short version

  • 1. Solr Power FTW Robby Morgan
  • 2. What Will I Cover? ● Who I am ● Why/how we use SOLR ● Can SOLR handle 20K queries per second? ● Lessons learned: large scale multi data center deployment ● Conclusion
  • 3. Robby Morgan ● Software Engineering Lead ● 3 yrs experience w/ Solr @ Bazaarvoice ● Jack of all trades, master of some :)
  • 4. Bazaarvoice ● Bazaarvoice is a software as a service company powering User Generated Content such as ratings and reviews on thousands of web sites ● 5 billion page views per month ● 230 billion impressions ● 75 million UGC
  • 7. Life Before SOLR ● Indexes for sorting and filtering ● Aggregate tables for stats ● Nightly jobs ● Bugs...
  • 8. Enter SOLR ● Index content and product catalog ● De-normalization ● Filtering, faceting/stats and sorting ● Index every 15 minutes (20 seconds NRT)
  • 9. SOLR usage @ Bazaarvoice Documents 250 MM Index size 200 GB QPS, avg 2,350 QPS, max 10,200 Response time, avg 12 ms Servers 6+20
  • 10. SOLR Cloud @ Bazaarvoice ● Multiple cores (100+ per server) ● Re-balance indexes across cores and servers ○ Automatic ○ Manual ● Deployment map stored in MySQL ○ Host - Core - Partition ○ Statistics ● Partition lifecycle
  • 11. Scaling reads - Replication
  • 12. Replication - Multiple Data Centers
  • 13. Lessons: SOLR Performance ● SOLR loves RAM! SOLR ● Simulate and measure ○ Same config, same hardware ● Get the most out of one instance
  • 14. Lessons: Cross-DC Replication Chatty if using multiple cores Relay ● Core auto-warming disabled ● Connection wait and read timeouts increased ● Replication poll interval increased (15 min) ● Compression enabled ... <str name="httpConnTimeout">20000</str> <str name="httpReadTimeout">65000</str> <str name="pollInterval">00:15:00</str> <str name="compression">internal</str> ...
  • 15. Performance Tuning ● Heap size ● Cache sizing ● Auto-warming ● Stored fields ● Merge factor ● Commit frequency ● Optimize frequency Process: Simulate and measure ● Replay logs ● Analyze metrics ● Monitor GC
  • 16. Performance Tuning - GC # Java memory usage settings # Force the NewSize to be larger than the JVM typically allocates. # In practice, the JVM has been allocating an extremely small Young generation which objects to be prematurely promoted to the Tenured generation JAVA_MEM_OPTS="-Xms27g -Xmx27g -XX:NewRatio=8" # -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps --> Turn on GC Logging # -XX:+UseConcMarkSweepGC --> Use the concurrent collector # -XX:+CMSIncrementalMode --> Incremental mode for the concurrent collector # -XX:+CMSIncrementalPacing --> Let the JVM adjust the amount of incremental collection JAVA_GC_OPTS="-verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX: +UseConcMarkSweepGC -XX:+UseParNewGC -XX:CMSInitiatingOccupancyFraction=55 -XX: ParallelGCThreads=8 -XX:SurvivorRatio=4"
  • 17. Lessons: Schema Changes ● Re-indexing is time consuming for large indexes ● Process: 1. Full re-index off-line prior to the release 2. Incremental indexing after the release ● Bottleneck: reading from MySQL ● Goal: Transparent on-line re-indexing
  • 18. Conclusion - SOLR Strengths ● Not only full-text search ● Lightning fast given enough RAM ● Good scale out support including multi-data center ● Great community, wide range of use cases
  • 19. Conclusion - SOLR's Gaps ● Not fully elastic ● Real time takes work ● Secondary data store = sync overhead, inconsistencies ● Schema changes
  • 20. Questions robby.morgan@ bazaarvoice.com developer.bazaarvoice.com