Skip to content

joeywhelan/searchtest

Repository files navigation

Redis Search - Query Term Order + Vertical Scaling Test

Contents

  1. Summary
  2. Architecture
  3. Features
  4. Prerequisites
  5. Usage
  6. Results

Summary

This is a series of shell scripts for testing query speeds against varied queries and search threading. This is not intended to be a performance benchmark. This is test that can be run on a laptop to gain intuition on the effects of query term order and vertical scaling with Redis Search.

Architecture

architecture

Features

  • 3-node Redis Enterprise cluster
  • 2-shard RE DB w/Redis JSON + Search
  • Riot script for loading 10M JSON documents
  • Test script for memtier search queries for TAG at front of query and rear.
  • Scale script to enable Redis Search Vertical Scaling (6 threads)

Prerequisites

Usage

Build RE Cluster + Load DB

./start.sh

Test

./test.sh

Dynamically Enable Vertical Scaling

./scale.sh

Shut Down

./stop.sh

Results

Relative Sizes of Result Sets

> FT.SEARCH idx '@num:[1000 2000]' LIMIT 0 0
1) "111701"

> FT.SEARCH idx '@color:{grey}' LIMIT 0 0
1) "322113"

> FT.SEARCH idx '@quote:"little more than kin"' LIMIT 0 0
1) "556113"

Smallest to Largest Intersections - No Vertical Scaling

FT.SEARCH idx '@num:[1000 2000] @color:{grey} @quote:"little more than kin"' RETURN 1 quote LIMIT 0 10 DIALECT 4
ALL STATS
=====================================================================================================
Type            Ops/sec    Avg. Latency     p50 Latency     p99 Latency   p99.9 Latency       KB/sec 
-----------------------------------------------------------------------------------------------------
Ft.searchs        57.66       865.79200      1023.99900      1023.99900      1023.99900        56.14 
Totals            57.66       865.79200      1023.99900      1023.99900      1023.99900       112.28 

Largest to Smallest Intersections - No Vertical Scaling

FT.SEARCH idx '@quote:"little more than kin" @color:{grey} @num:[1000 2000]' RETURN 1 quote LIMIT 0 10 DIALECT 4
ALL STATS
=====================================================================================================
Type            Ops/sec    Avg. Latency     p50 Latency     p99 Latency   p99.9 Latency       KB/sec 
-----------------------------------------------------------------------------------------------------
Ft.searchs        54.37       600.06400       602.11100       602.11100       602.11100        52.94 
Totals            54.37       600.06400       602.11100       602.11100       602.11100       105.88  

TAG First - No Vertical Scaling

FT.SEARCH idx '@color:{grey} @num:[1000 2000] @quote:\"little more than kin\"' RETURN 1 quote LIMIT 0 10 DIALECT 4
ALL STATS
=====================================================================================================
Type            Ops/sec    Avg. Latency     p50 Latency     p99 Latency   p99.9 Latency       KB/sec 
-----------------------------------------------------------------------------------------------------
Ft.searchs        60.09       624.64000       626.68700       626.68700       626.68700        58.51 
Totals            60.09       624.64000       626.68700       626.68700       626.68700       117.02  

TAG Last - No Vertical Scaling

FT.SEARCH idx '@num:[1000 2000] @quote:\"little more than kin\" @color:{grey}' RETURN 1 quote LIMIT 0 10 DIALECT 4
ALL STATS
=====================================================================================================
Type            Ops/sec    Avg. Latency     p50 Latency     p99 Latency   p99.9 Latency       KB/sec 
-----------------------------------------------------------------------------------------------------
Ft.searchs        58.16       624.64000       626.68700       626.68700       626.68700        56.63 
Totals            58.16       624.64000       626.68700       626.68700       626.68700       113.25

Smallest to Largest Intersections - Vertical Scaling Enabled (6 threads)

FT.SEARCH idx '@num:[1000 2000] @color:{grey} @quote:"little more than kin"' RETURN 1 quote LIMIT 0 10 DIALECT 4
ALL STATS
=====================================================================================================
Type            Ops/sec    Avg. Latency     p50 Latency     p99 Latency   p99.9 Latency       KB/sec 
-----------------------------------------------------------------------------------------------------
Ft.searchs       306.78       322.97583       317.43900       561.15100       696.31900       302.89 
Totals           306.78       322.97583       317.43900       561.15100       696.31900       605.77 

Largest to Smallest Intersections - Vertical Scaling Enabled (6 threads)

FT.SEARCH idx '@quote:"little more than kin" @color:{grey} @num:[1000 2000]' RETURN 1 quote LIMIT 0 10 DIALECT 4
ALL STATS
=====================================================================================================
Type            Ops/sec    Avg. Latency     p50 Latency     p99 Latency   p99.9 Latency       KB/sec 
-----------------------------------------------------------------------------------------------------
Ft.searchs       314.13       326.85068       325.63100       692.22300       835.58300       310.14 
Totals           314.13       326.85068       325.63100       692.22300       835.58300       620.28 

TAG First - Vertical Scaling Enabled (6 threads)

FT.SEARCH idx '@color:{grey} @num:[1000 2000] @quote:\"little more than kin\"' RETURN 1 quote LIMIT 0 10 DIALECT 4
 ALL STATS
=====================================================================================================
Type            Ops/sec    Avg. Latency     p50 Latency     p99 Latency   p99.9 Latency       KB/sec 
-----------------------------------------------------------------------------------------------------
Ft.searchs       299.45       330.47184       323.58300       663.55100       749.56700       295.65 
Totals           299.45       330.47184       323.58300       663.55100       749.56700       591.29 

TAG Last - Vertical Scaling Enabled (6 threads)

FT.SEARCH idx '@num:[1000 2000] @quote:\"little more than kin\" @color:{grey}' RETURN 1 quote LIMIT 0 10 DIALECT 4
ALL STATS
=====================================================================================================
Type            Ops/sec    Avg. Latency     p50 Latency     p99 Latency   p99.9 Latency       KB/sec 
-----------------------------------------------------------------------------------------------------
Ft.searchs       301.93       329.74815       337.91900       622.59100       712.70300       298.10 
Totals           301.93       329.74815       337.91900       622.59100       712.70300       596.19 

Releases

No releases published

Packages

No packages published