SlideShare uma empresa Scribd logo
1 de 17
Baixar para ler offline
Alta performance
                                com Lucene
                                               ROd
                                          Léo Nickel




Saturday, October 22, 2011
ROd

                             Desenvolvedor
                             especialista em
                             arquiteturas de alta
                             performance
                             relacionadas a
                             publicação e busca
                             de conteúdo


                                               @rzdrigo


   22/10/2011                                 2
Saturday, October 22, 2011
Léo Nickel

                 Desenvolvedor de
                             sistemas com
                    experiência de 6
              anos em aplicações
                              Java EE em
             telefonia, marketing
                         online e busca
                                 orgânica

          @leonardonickel


   22/10/2011                                    3
Saturday, October 22, 2011
LUCENE

       • Apache Top Level Project desde 02/2005

       • Orientado a documento

       • Schemaless

       • Instância única de IndexWriter por índice

       • Quebra da API entre:
             – 2.4 → 2.9
             – 3.1 → 3.2 (incompatibilidade entre índices)




   22/10/2011                                          4
Saturday, October 22, 2011
MOTIVAÇÃO

       • Substituição do motor de busca FAST SEARCH

       • Requisitos não funcionais

            - Baixa latência de indexação

            - Alta disponibilidade de busca

            - Sharding




   22/10/2011                                 5
Saturday, October 22, 2011
IMPLEMENTAÇÃO



   22/10/2011                6
Saturday, October 22, 2011
TIMELINE



                SERVIDOR LINUX 1
                             NFS PARAMS




                             24 QPS


   22/10/2011                             7
Saturday, October 22, 2011
TIMELINE



                              OTIMIZAÇÃO
                                COMPOUND FILE
                                  READ ONLY
                                FIELD SELECTOR
                             ESTRATÉGIA DE REOPEN



   22/10/2011                                       8
Saturday, October 22, 2011
TIMELINE



                SERVIDOR LINUX 1
                             NFS PARAMS




                             30 QPS


   22/10/2011                             9
Saturday, October 22, 2011
TIMELINE



                         DESKTOP LINUX
                             DISCO LOCAL




                             200 QPS


   22/10/2011                              10
Saturday, October 22, 2011
TIMELINE



                SERVIDOR LINUX 2
                             DISCO LOCAL




                             500 QPS


   22/10/2011                              11
Saturday, October 22, 2011
TIMELINE



                SERVIDOR LINUX 2
                             NFS DEFAULT + RO




                             450 QPS


   22/10/2011                                   12
Saturday, October 22, 2011
TIMELINE



                             QUESTÃO:

                    VÁRIOS SEARCHERS NO MESMO
                     NFS DEGRADA A PERFORMANCE?




   22/10/2011                               13
Saturday, October 22, 2011
TIMELINE



          SERVIDOR LINUX 1 e 2
                        CARGA: SERVIDOR LINUX 3 e 4




                              900 QPS


   22/10/2011                                         14
Saturday, October 22, 2011
EM PRODUÇÃO...



          SERVIDOR LINUX 1 e 2
                             NFS DEFAULT + RO




             27 → 413 → 962 QPS


   22/10/2011                                   15
Saturday, October 22, 2011
LIÇÕES APRENDIDAS

       • Otimização constante do índice

       • Configuração de File Descriptor no SO

       • Diferentes politicas de Sharding

       • Fieldable != Field

       • MultiReader com ExecutorServices
       • Evitar o uso de PrefixQuery

            - Validar se campo existe




   22/10/2011                                    16
Saturday, October 22, 2011
Obrigado =)
                    http://www.slideshare.net/rzdrigo/alta-
                            performance-com-lucene

                                ROd (rzaccara@uolinc.com)
                             Léo Nickel (lnickel@uolinc.com)
                                   @rzdrigo
                                   @leonardonickel




Saturday, October 22, 2011

Mais conteúdo relacionado

Destaque

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

Destaque (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Alta perfomance com Lucene

  • 1. Alta performance com Lucene ROd Léo Nickel Saturday, October 22, 2011
  • 2. ROd Desenvolvedor especialista em arquiteturas de alta performance relacionadas a publicação e busca de conteúdo @rzdrigo 22/10/2011 2 Saturday, October 22, 2011
  • 3. Léo Nickel Desenvolvedor de sistemas com experiência de 6 anos em aplicações Java EE em telefonia, marketing online e busca orgânica @leonardonickel 22/10/2011 3 Saturday, October 22, 2011
  • 4. LUCENE • Apache Top Level Project desde 02/2005 • Orientado a documento • Schemaless • Instância única de IndexWriter por índice • Quebra da API entre: – 2.4 → 2.9 – 3.1 → 3.2 (incompatibilidade entre índices) 22/10/2011 4 Saturday, October 22, 2011
  • 5. MOTIVAÇÃO • Substituição do motor de busca FAST SEARCH • Requisitos não funcionais - Baixa latência de indexação - Alta disponibilidade de busca - Sharding 22/10/2011 5 Saturday, October 22, 2011
  • 6. IMPLEMENTAÇÃO 22/10/2011 6 Saturday, October 22, 2011
  • 7. TIMELINE SERVIDOR LINUX 1 NFS PARAMS 24 QPS 22/10/2011 7 Saturday, October 22, 2011
  • 8. TIMELINE OTIMIZAÇÃO COMPOUND FILE READ ONLY FIELD SELECTOR ESTRATÉGIA DE REOPEN 22/10/2011 8 Saturday, October 22, 2011
  • 9. TIMELINE SERVIDOR LINUX 1 NFS PARAMS 30 QPS 22/10/2011 9 Saturday, October 22, 2011
  • 10. TIMELINE DESKTOP LINUX DISCO LOCAL 200 QPS 22/10/2011 10 Saturday, October 22, 2011
  • 11. TIMELINE SERVIDOR LINUX 2 DISCO LOCAL 500 QPS 22/10/2011 11 Saturday, October 22, 2011
  • 12. TIMELINE SERVIDOR LINUX 2 NFS DEFAULT + RO 450 QPS 22/10/2011 12 Saturday, October 22, 2011
  • 13. TIMELINE QUESTÃO: VÁRIOS SEARCHERS NO MESMO NFS DEGRADA A PERFORMANCE? 22/10/2011 13 Saturday, October 22, 2011
  • 14. TIMELINE SERVIDOR LINUX 1 e 2 CARGA: SERVIDOR LINUX 3 e 4 900 QPS 22/10/2011 14 Saturday, October 22, 2011
  • 15. EM PRODUÇÃO... SERVIDOR LINUX 1 e 2 NFS DEFAULT + RO 27 → 413 → 962 QPS 22/10/2011 15 Saturday, October 22, 2011
  • 16. LIÇÕES APRENDIDAS • Otimização constante do índice • Configuração de File Descriptor no SO • Diferentes politicas de Sharding • Fieldable != Field • MultiReader com ExecutorServices • Evitar o uso de PrefixQuery - Validar se campo existe 22/10/2011 16 Saturday, October 22, 2011
  • 17. Obrigado =) http://www.slideshare.net/rzdrigo/alta- performance-com-lucene ROd (rzaccara@uolinc.com) Léo Nickel (lnickel@uolinc.com) @rzdrigo @leonardonickel Saturday, October 22, 2011