Benchmark

zhenghaozNovember 20, 2022About 2 min

Benchmark

In this page, different database backends of Gorse are compared.

RESTful APIs

Before benchmark RESTful APIs, the develop environment should be set up first. Then, change working directory to server and run benchmark script:

cd server
bash bench_test.sh --cache redis --data mysql
  • The cache argument should be one of redis, mysql, postgres or mongodb.
  • The data argument should be one of clickhouse, mysql, postgres or mongodb.

The benchmark result (in milliseconds) is as follows:

Database[1]
InsertUser1.392.601.330.4517.974.030.41
PatchUser1.430.6710.560.4419.554.490.41
GetUser0.280.282.210.300.300.300.20
InsertUsers/101.482.211.471.0021.594.510.92
InsertUsers/1002.263.852.485.0117.977.524.95
InsertUsers/100017.5518.979.4151.1352.8440.6046.63
GetUsers/100.420.342.720.370.440.350.27
GetUsers/1000.810.613.020.830.900.690.63
GetUsers/10003.572.896.285.204.8110.233.85
DeleteUser11.762.2631.150.4512.272.400.37
InsertItem13.302.644.610.8938.128.701.22
PatchItem12.473.1824.691.3041.509.471.80
GetItem0.290.303.150.210.370.370.26
InsertItems/1010.722.985.021.0918.327.572.70
InsertItems/10011.425.196.834.5046.6715.0413.01
InsertItems/100038.7629.4020.5639.57454.2791.44101.66
GetItems/100.390.403.640.320.490.480.31
GetItems/1000.920.954.100.851.221.150.87
GetItems/10005.8413.9310.576.657.715.856.42
DeleteItem10.423.3927.151.0625.006.151.73
InsertCategory11.232.344.810.5721.024.920.71
DeleteCategory0.652.474.780.601.032.870.64
PutFeedback/1010.093.085.672.2831.268.332.65
PutFeedback/10016.628.598.1914.4353.5020.4817.79
PutFeedback/100056.3957.6421.36105.29185.60102.84148.21
InsertFeedback/1011.253.624.681.9332.907.962.63
InsertFeedback/10015.038.547.5011.4356.5016.5417.32
InsertFeedback/100062.5258.0223.98103.05152.69121.93153.70
GetFeedback/100.350.493.190.290.430.450.28
GetFeedback/1000.630.883.560.700.850.820.70
GetFeedback/10003.112.989.794.564.262.974.78
GetUserItemFeedback0.310.332.630.230.390.370.23
DeleteUserItemFeedback10.102.0012.800.2410.932.250.28
GetUserFeedback0.320.312.680.260.380.340.23
GetItemFeedback0.310.312.500.220.380.350.22
GetRecommendCache/100.260.290.310.270.680.630.44
GetRecommendCache/1000.500.480.600.493.051.301.25
GetRecommendCache/10002.482.483.202.67119.3313.808.25
RecommendFromOfflineCache/100.350.380.390.340.930.760.58
RecommendFromOfflineCache/1000.590.600.730.581.981.491.43
RecommendFromOfflineCache/10002.832.843.732.8714.695.117.89
RecommendFromLatest/100.690.713.200.611.471.230.91
RecommendFromLatest/1001.040.933.891.132.821.692.21
RecommendFromLatest/10004.613.5310.455.1420.445.459.37
RecommendFromItemBased/102.212.215.861.946.755.103.79
RecommendFromItemBased/1004.353.869.753.8721.5310.0810.81
RecommendFromItemBased/100023.6521.5936.0422.25183.7857.0259.73

  1. The first logo in the cell represents the database for data storage, and the second logo represents the database for cache storage. ↩︎

Loading...