Coder Social home page Coder Social logo

steveyen / bleve-bench Goto Github PK

View Code? Open in Web Editor NEW

This project forked from blevesearch/bleve-bench

0.0 3.0 0.0 1.54 MB

A utility for benchmarking bleve performance under various configurations and workloads.

Makefile 0.85% Go 70.75% HTML 3.44% Python 12.86% Shell 12.10%

bleve-bench's Introduction

bleve-bench

A utility for benchmarking bleve performance under various configurations and workloads.

The bleve-bench utility works by reading wikipedia articles from a previously generated file with a single article per line. This minimizes time spent reading articles.

The tool performs a number of operations in a given level, and then prints out summary statistics about the performance in this level. For example, with batch size 100 and level size 1000, it will:

  1. Load documents individually
  2. Load batches of until end of level
  3. Run term search for "water"
  4. Run <qrepeat - 1> term searches for "water"
  5. Print one CSV row for this level

The total execution time can be a useful metric, but this is not an attempt to load as many articles as possible as fast as possible. Rather this tool is useful for seeing how the performance changes over time as the number of documents indexed grows.

Output Format

elapsed,docs,avg_single_doc_ms,avg_batched_doc_ms,query_water_matches,first_query_water_ms,avg_repeated5_query_water_ms

Running

This will download the wikipedia dataset if you don't have it. Then it will build the linefile utility. Then it will run the linefile utility on the wikipedia dataset. NOTE: the download is large and may take a long time (this only happens the first time)

	make wikilinefile

Build

	go build 

To build it with support for some optional C-based storage engines

	go build -tags 'leveldb forestdb'

Run the benchmark with all defaults:

	./bleve-bench

Usage

	Usage of ./bleve-bench:
	  -batch=100: batch size
	  -config="": configuration file to use
	  -count=100000: total number of documents to process
	  -cpuprofile="": write cpu profile to file
	  -level=1000: report level
	  -memprofile="": write memory profile every level
	  -qrepeat=5: query repeat
	  -source="tmp/enwiki.txt": wikipedia line file
	  -target="bench.bleve": target index filename

Examples

Load 100000 articles, with all the defaults.

	./bleve-bench

Load 3000 articles using the leveldb backend and dump a cpu-profile at the end.

	./bleve-bench -config configs/leveldb.json -count 3000 -cpuprofile=leveldb.profile

Load 3000 articles using the leveldb backend and dump a memory profile after every level.

	./bleve-bench -config configs/leveldb.json -count 3000 -memprofile=leveldb-mem.profile

Conclusions

What kind of conclusions can we draw from this utility? Here is a chart produced using this utility to load 100k wikipedia documents into bleve using the LevelDB backend.

This shows several important things:

  1. Indexing in a batch is faster than indexing individually.
  2. Indexing performance remained consistent as we added more and more documents.
  3. Term query time increases nearly linearly with respect to the number of documents matching the term. The query behavior becomes more erratic and changes slope around 50k documents.
  4. The first query seems to perform better than the average of running the query five times. This is surprising and warrants further exploration.

Here is the same test run with the BoltDB backend.

This too shows several important things:

  1. Indexing individual documents is considerably more expensive than a batch.
  2. But both perform somewhat consistently through the test.
  3. Query performance appears both more consistent and faster with BoltDB compared to LevelDB.

bleve-bench's People

Contributors

mschoch avatar steveyen avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.