SlideShare ist ein Scribd-Unternehmen logo
1 von 17
Downloaden Sie, um offline zu lesen
Real time indexes in Sphinx
            Search 1.10


This presentation about new feature of Sphinx
Search 1.10 - Real Time indexes
About Me
●   Yaroslav Vorozhko
●   Web developer at Ivinco
●   Specialized at search engines and high load
    systems
●   E-mail: yaroslav@ivinco.com
The problem of plain indexes
●   New data required to update entire index
●   Index merge in main + delta scheme
●   Depend on indexer tool
●   Not simple to manage
Real Time indexes
●   What is RT index
●   Index update on the fly
●   Support of mysql protocol with SphinxQL
Testing Environment
●   Testing read-write index
●   Testing read-only index
Index schema comparation
●   HDD usage

                            HDD usage - Plain vs RT indexes
         9

         8

         7

         6

         5
                                                                          Plain index
    GB




         4                                                                Real time index


         3

         2

         1

         0
         10,000   100,000                         1,000,000   2,000,000
                                Indexed records
Index schema comparation
●   Single query performance

                                      SphinxAPI performance for single query
                      0.25




                       0.2
    Query time sec.




                      0.15

                                                                                             Plain index
                                                                                             Real time index
                       0.1




                      0.05




                        0
                             10,000     100,000                      1,000,000   2,000,000
                                                  Records in index
Index schema comparation
●   Multy query performance

                                      SphinxAPI performance for multi query
                      0.05

                      0.05

                      0.04

                      0.04
    Query time sec.




                      0.03

                      0.03                                                                   Plain index
                                                                                             Real time index
                      0.02

                      0.02

                      0.01

                      0.01

                        0
                             10,000     100,000                      1,000,000   2,000,000
                                                  Records in index
Index schema comparation
●   Single query performance with loads

                                     SphinxAPI performance for single query and insert loads
                       0.2                                                                        0.2

                      0.18                                                                        0.18

                      0.16                                                                        0.16

                      0.14                                                                        0.14
    Query time sec.




                      0.12                                                                        0.12
                                                                                                         RT binlog off
                                                                                                         RT binlog 0
                       0.1                                                                        0.1
                                                                                                         RT binlog 1
                                                                                                         RT binlog 2
                      0.08                                                                        0.08
                                                                                                         Plain index
                      0.06                                                                        0.06

                      0.04                                                                        0.04

                      0.02                                                                        0.02

                        0                                                                         0
                             10000             100000                      1000000      2000000
                                                        Records in index
Demonstration
●   Easy to create an index
    index rt
    {
          type = rt
          path = /usr/local/sphinx/data/rt
          rt_field = title
          rt_field = content
          rt_attr_uint = gid
    }
Demonstration
●   Easy to CRUD
    mysql -h 127.0.0.1 -P 9306
    INSERT INTO rt VALUES ....
    SELECT * FROM rt;
    DELETE FROM rt WHERE id=2;
    REPLACE INTO rt VALUES ....
●   SphinxAPI support
Migration
●   Simple and easy using existing tools
    mysqldump -uroot blog users > users_dump.sql
    mysql -P9306 < users_dump.sql
Migration
●   Custom script as replace of ”source” block
●   Support all ”source” settings
        –   Connection settings
        –   SQL query among with Pre and Post SQL
        –   SQL Range queries
●   Support fill index from scratch
●   Support index update
Migration
●   Support of mixed indexes
    index distributed
    {
           type = distributed
           local = plain_main_index
           local = real_time_increment_index
    }
Problem with LjSeek migration
●   Huge memory usage
●   Low search speed
Questions




Questions ?
References
●   Sphinx Search http://sphinxsearch.com/
●   Migration from plain to real time indexes script
    https://launchpad.net/migrate-sphinx-plain-
    indexes-into-real-time-indexes
●   Ivinco blog – is good resource about Sphinx
    Search http://www.ivinco.com/blog/
●   My blog – also good resource about Sphinx
    Search on russian language
    http://pro100pro.com/

Weitere ähnliche Inhalte

Mehr von Ontico

Готовим тестовое окружение, или сколько тестовых инстансов вам нужно / Алекса...
Готовим тестовое окружение, или сколько тестовых инстансов вам нужно / Алекса...Готовим тестовое окружение, или сколько тестовых инстансов вам нужно / Алекса...
Готовим тестовое окружение, или сколько тестовых инстансов вам нужно / Алекса...
Ontico
 

Mehr von Ontico (20)

One-cloud — система управления дата-центром в Одноклассниках / Олег Анастасье...
One-cloud — система управления дата-центром в Одноклассниках / Олег Анастасье...One-cloud — система управления дата-центром в Одноклассниках / Олег Анастасье...
One-cloud — система управления дата-центром в Одноклассниках / Олег Анастасье...
 
Масштабируя DNS / Артем Гавриченков (Qrator Labs)
Масштабируя DNS / Артем Гавриченков (Qrator Labs)Масштабируя DNS / Артем Гавриченков (Qrator Labs)
Масштабируя DNS / Артем Гавриченков (Qrator Labs)
 
Создание BigData-платформы для ФГУП Почта России / Андрей Бащенко (Luxoft)
Создание BigData-платформы для ФГУП Почта России / Андрей Бащенко (Luxoft)Создание BigData-платформы для ФГУП Почта России / Андрей Бащенко (Luxoft)
Создание BigData-платформы для ФГУП Почта России / Андрей Бащенко (Luxoft)
 
Готовим тестовое окружение, или сколько тестовых инстансов вам нужно / Алекса...
Готовим тестовое окружение, или сколько тестовых инстансов вам нужно / Алекса...Готовим тестовое окружение, или сколько тестовых инстансов вам нужно / Алекса...
Готовим тестовое окружение, или сколько тестовых инстансов вам нужно / Алекса...
 
Новые технологии репликации данных в PostgreSQL / Александр Алексеев (Postgre...
Новые технологии репликации данных в PostgreSQL / Александр Алексеев (Postgre...Новые технологии репликации данных в PostgreSQL / Александр Алексеев (Postgre...
Новые технологии репликации данных в PostgreSQL / Александр Алексеев (Postgre...
 
PostgreSQL Configuration for Humans / Alvaro Hernandez (OnGres)
PostgreSQL Configuration for Humans / Alvaro Hernandez (OnGres)PostgreSQL Configuration for Humans / Alvaro Hernandez (OnGres)
PostgreSQL Configuration for Humans / Alvaro Hernandez (OnGres)
 
Inexpensive Datamasking for MySQL with ProxySQL — Data Anonymization for Deve...
Inexpensive Datamasking for MySQL with ProxySQL — Data Anonymization for Deve...Inexpensive Datamasking for MySQL with ProxySQL — Data Anonymization for Deve...
Inexpensive Datamasking for MySQL with ProxySQL — Data Anonymization for Deve...
 
Опыт разработки модуля межсетевого экранирования для MySQL / Олег Брославский...
Опыт разработки модуля межсетевого экранирования для MySQL / Олег Брославский...Опыт разработки модуля межсетевого экранирования для MySQL / Олег Брославский...
Опыт разработки модуля межсетевого экранирования для MySQL / Олег Брославский...
 
ProxySQL Use Case Scenarios / Alkin Tezuysal (Percona)
ProxySQL Use Case Scenarios / Alkin Tezuysal (Percona)ProxySQL Use Case Scenarios / Alkin Tezuysal (Percona)
ProxySQL Use Case Scenarios / Alkin Tezuysal (Percona)
 
MySQL Replication — Advanced Features / Петр Зайцев (Percona)
MySQL Replication — Advanced Features / Петр Зайцев (Percona)MySQL Replication — Advanced Features / Петр Зайцев (Percona)
MySQL Replication — Advanced Features / Петр Зайцев (Percona)
 
Внутренний open-source. Как разрабатывать мобильное приложение большим количе...
Внутренний open-source. Как разрабатывать мобильное приложение большим количе...Внутренний open-source. Как разрабатывать мобильное приложение большим количе...
Внутренний open-source. Как разрабатывать мобильное приложение большим количе...
 
Подробно о том, как Causal Consistency реализовано в MongoDB / Михаил Тюленев...
Подробно о том, как Causal Consistency реализовано в MongoDB / Михаил Тюленев...Подробно о том, как Causal Consistency реализовано в MongoDB / Михаил Тюленев...
Подробно о том, как Causal Consistency реализовано в MongoDB / Михаил Тюленев...
 
Балансировка на скорости проводов. Без ASIC, без ограничений. Решения NFWare ...
Балансировка на скорости проводов. Без ASIC, без ограничений. Решения NFWare ...Балансировка на скорости проводов. Без ASIC, без ограничений. Решения NFWare ...
Балансировка на скорости проводов. Без ASIC, без ограничений. Решения NFWare ...
 
Перехват трафика — мифы и реальность / Евгений Усков (Qrator Labs)
Перехват трафика — мифы и реальность / Евгений Усков (Qrator Labs)Перехват трафика — мифы и реальность / Евгений Усков (Qrator Labs)
Перехват трафика — мифы и реальность / Евгений Усков (Qrator Labs)
 
И тогда наверняка вдруг запляшут облака! / Алексей Сушков (ПЕТЕР-СЕРВИС)
И тогда наверняка вдруг запляшут облака! / Алексей Сушков (ПЕТЕР-СЕРВИС)И тогда наверняка вдруг запляшут облака! / Алексей Сушков (ПЕТЕР-СЕРВИС)
И тогда наверняка вдруг запляшут облака! / Алексей Сушков (ПЕТЕР-СЕРВИС)
 
Как мы заставили Druid работать в Одноклассниках / Юрий Невиницин (OK.RU)
Как мы заставили Druid работать в Одноклассниках / Юрий Невиницин (OK.RU)Как мы заставили Druid работать в Одноклассниках / Юрий Невиницин (OK.RU)
Как мы заставили Druid работать в Одноклассниках / Юрий Невиницин (OK.RU)
 
Разгоняем ASP.NET Core / Илья Вербицкий (WebStoating s.r.o.)
Разгоняем ASP.NET Core / Илья Вербицкий (WebStoating s.r.o.)Разгоняем ASP.NET Core / Илья Вербицкий (WebStoating s.r.o.)
Разгоняем ASP.NET Core / Илья Вербицкий (WebStoating s.r.o.)
 
100500 способов кэширования в Oracle Database или как достичь максимальной ск...
100500 способов кэширования в Oracle Database или как достичь максимальной ск...100500 способов кэширования в Oracle Database или как достичь максимальной ск...
100500 способов кэширования в Oracle Database или как достичь максимальной ск...
 
Apache Ignite Persistence: зачем Persistence для In-Memory, и как он работает...
Apache Ignite Persistence: зачем Persistence для In-Memory, и как он работает...Apache Ignite Persistence: зачем Persistence для In-Memory, и как он работает...
Apache Ignite Persistence: зачем Persistence для In-Memory, и как он работает...
 
Механизмы мониторинга баз данных: взгляд изнутри / Дмитрий Еманов (Firebird P...
Механизмы мониторинга баз данных: взгляд изнутри / Дмитрий Еманов (Firebird P...Механизмы мониторинга баз данных: взгляд изнутри / Дмитрий Еманов (Firebird P...
Механизмы мониторинга баз данных: взгляд изнутри / Дмитрий Еманов (Firebird P...
 

Kürzlich hochgeladen

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Kürzlich hochgeladen (20)

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 

Real-time индексы (Ярослав Ворожко)

  • 1. Real time indexes in Sphinx Search 1.10 This presentation about new feature of Sphinx Search 1.10 - Real Time indexes
  • 2. About Me ● Yaroslav Vorozhko ● Web developer at Ivinco ● Specialized at search engines and high load systems ● E-mail: yaroslav@ivinco.com
  • 3. The problem of plain indexes ● New data required to update entire index ● Index merge in main + delta scheme ● Depend on indexer tool ● Not simple to manage
  • 4. Real Time indexes ● What is RT index ● Index update on the fly ● Support of mysql protocol with SphinxQL
  • 5. Testing Environment ● Testing read-write index ● Testing read-only index
  • 6. Index schema comparation ● HDD usage HDD usage - Plain vs RT indexes 9 8 7 6 5 Plain index GB 4 Real time index 3 2 1 0 10,000 100,000 1,000,000 2,000,000 Indexed records
  • 7. Index schema comparation ● Single query performance SphinxAPI performance for single query 0.25 0.2 Query time sec. 0.15 Plain index Real time index 0.1 0.05 0 10,000 100,000 1,000,000 2,000,000 Records in index
  • 8. Index schema comparation ● Multy query performance SphinxAPI performance for multi query 0.05 0.05 0.04 0.04 Query time sec. 0.03 0.03 Plain index Real time index 0.02 0.02 0.01 0.01 0 10,000 100,000 1,000,000 2,000,000 Records in index
  • 9. Index schema comparation ● Single query performance with loads SphinxAPI performance for single query and insert loads 0.2 0.2 0.18 0.18 0.16 0.16 0.14 0.14 Query time sec. 0.12 0.12 RT binlog off RT binlog 0 0.1 0.1 RT binlog 1 RT binlog 2 0.08 0.08 Plain index 0.06 0.06 0.04 0.04 0.02 0.02 0 0 10000 100000 1000000 2000000 Records in index
  • 10. Demonstration ● Easy to create an index index rt { type = rt path = /usr/local/sphinx/data/rt rt_field = title rt_field = content rt_attr_uint = gid }
  • 11. Demonstration ● Easy to CRUD mysql -h 127.0.0.1 -P 9306 INSERT INTO rt VALUES .... SELECT * FROM rt; DELETE FROM rt WHERE id=2; REPLACE INTO rt VALUES .... ● SphinxAPI support
  • 12. Migration ● Simple and easy using existing tools mysqldump -uroot blog users > users_dump.sql mysql -P9306 < users_dump.sql
  • 13. Migration ● Custom script as replace of ”source” block ● Support all ”source” settings – Connection settings – SQL query among with Pre and Post SQL – SQL Range queries ● Support fill index from scratch ● Support index update
  • 14. Migration ● Support of mixed indexes index distributed { type = distributed local = plain_main_index local = real_time_increment_index }
  • 15. Problem with LjSeek migration ● Huge memory usage ● Low search speed
  • 17. References ● Sphinx Search http://sphinxsearch.com/ ● Migration from plain to real time indexes script https://launchpad.net/migrate-sphinx-plain- indexes-into-real-time-indexes ● Ivinco blog – is good resource about Sphinx Search http://www.ivinco.com/blog/ ● My blog – also good resource about Sphinx Search on russian language http://pro100pro.com/