Skip to content

Instantly share code, notes, and snippets.

@gdi
Created June 26, 2009 14:04
Show Gist options
  • Save gdi/136493 to your computer and use it in GitHub Desktop.
Save gdi/136493 to your computer and use it in GitHub Desktop.
There is a spreadsheet of a bigger comparo here: http://spreadsheets.google.com/pub?key=rWBwk7nwt6RKn0zyq6RrCDA&output=html
Benchmarking ttserver with 2888750 email records
!!! Correction: pk_only queries had bad times in the earlier revision
!!! "Tuned Indexes" means I manually set the bnum to 2x the key count; all indices are set to "large"
Tokyo Tyrant Socket / No Indexes / Untuned Queries
user system total real
find record by pk 0.000000 0.000000 0.000000 ( 0.000592)
find by message_id 0.000000 0.000000 0.000000 ( 33.591279)
find all by domain 26.490000 1.820000 28.310000 ( 68.206572)
pk_only message id 0.000000 0.000000 0.000000 ( 31.324625)
pk_only domains 2.580000 0.020000 2.600000 ( 33.737567)
pk/ruby find message_id 0.000000 0.000000 0.000000 ( 30.989929)
Tokyo Tyrant Socket / Indexes / Untuned Queries
user system total real
find record by pk 0.000000 0.000000 0.000000 ( 0.000331)
find by message_id 0.010000 0.000000 0.010000 ( 35.719075)
find all by domain 27.020000 1.780000 28.800000 ( 70.409088)
pk_only message id 0.000000 0.000000 0.000000 ( 32.982269)
pk_only domains 2.630000 0.020000 2.650000 ( 34.891360)
pk/ruby find message_id 0.010000 0.000000 0.010000 ( 32.647223)
Tokyo Tyrant Socket / Indexes / Tuned Queries
user system total real
find record by pk 0.000000 0.000000 0.000000 ( 0.000335)
find by message_id 0.000000 0.000000 0.000000 ( 0.000512)
find by domain 27.730000 1.760000 29.490000 ( 38.673547)
pk_only message id 0.000000 0.000000 0.000000 ( 0.000322)
pk_only domains 2.670000 0.020000 2.690000 ( 2.756444)
pk/ruby find message_id 0.000000 0.000000 0.000000 ( 0.000622)
Tokyo Tyrant Socket / Tuned Indexes / Tuned Queries
user system total real
find record by pk 0.000000 0.000000 0.000000 ( 0.000327)
find by message_id 0.000000 0.000000 0.000000 ( 0.000484)
find by domain 33.560000 2.340000 35.900000 ( 75.235977)
pk_only message id 0.000000 0.010000 0.010000 ( 0.000322)
pk_only domains 2.720000 0.010000 2.730000 ( 2.804476)
pk/ruby find message_id 0.000000 0.000000 0.000000 ( 0.000600)
the end
### policy_id matching results on the fastest prior ttserver configuration ###
Tokyo Tyrant Socket / Indexes / Tuned Queries
user system total real
find by policy_id 31.030000 2.120000 33.150000 ( 44.635230)
pk_only policy_id 2.270000 0.020000 2.290000 ( 2.463710)
clever rb/lget trick 30.850000 2.020000 32.870000 ( 43.694337)
gdis-imac-2:tokyo_performance drat$ ruby query_benchmark.rb
Benchmarking ttserver with 2888750 email records
Tokyo Tyrant Socket / Indexes / Tuned Queries
user system total real
find by policy_id 34.380000 2.440000 36.820000 ( 86.736063)
pk_only policy_id 3.520000 0.030000 3.550000 ( 3.805862)
clever rb/lget trick 32.450000 1.940000 34.390000 ( 45.550296)
gdis-imac-2:tokyo_performance drat$ ruby query_benchmark.rb
Benchmarking ttserver with 2888750 email records
Tokyo Tyrant Socket / Indexes / Tuned Queries
user system total real
find by policy_id 30.770000 2.080000 32.850000 ( 44.432258)
pk_only policy_id 3.480000 0.020000 3.500000 ( 3.710269)
clever rb/lget trick 32.380000 1.930000 34.310000 ( 45.155202)
gdis-imac-2:tokyo_performance drat$ ruby query_benchmark.rb
Benchmarking ttserver with 2888750 email records
Tokyo Tyrant Socket / Indexes / Tuned Queries
user system total real
find by policy_id 30.850000 2.090000 32.940000 ( 44.537879)
pk_only policy_id 3.510000 0.030000 3.540000 ( 3.759563)
clever rb/lget trick 32.630000 1.970000 34.600000 ( 46.489997)
gdis-imac-2:tokyo_performance drat$ ruby query_benchmark.rb
Benchmarking ttserver with 2888750 email records
Tokyo Tyrant Socket / Indexes / Tuned Queries
user system total real
find by policy_id 30.820000 2.070000 32.890000 ( 43.820164)
pk_only policy_id 3.490000 0.030000 3.520000 ( 3.763322)
clever rb/lget trick 32.370000 1.930000 34.300000 ( 45.113439)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment