Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v0.19.0 patch: Added receive benchmark; Fixed Receiver excessive mem usage introduced in 0.17 #3943

Merged
merged 7 commits into from
Mar 20, 2021

Commits on Mar 19, 2021

  1. Added receive benchmark, baseline.

    ```
    goos: linux
    goarch: amd64
    pkg: github.com/thanos-io/thanos/pkg/receive
    BenchmarkHandlerReceiveHTTP
    BenchmarkHandlerReceiveHTTP/typical_labels_under_1KB,_500_of_them.
    BenchmarkHandlerReceiveHTTP/typical_labels_under_1KB,_500_of_them./OK
    BenchmarkHandlerReceiveHTTP/typical_labels_under_1KB,_500_of_them./OK-12      	   22260	   1550152 ns/op	 1380340 B/op	    6093 allocs/op
    BenchmarkHandlerReceiveHTTP/typical_labels_under_1KB,_500_of_them./conflict_errors
    BenchmarkHandlerReceiveHTTP/typical_labels_under_1KB,_500_of_them./conflict_errors-12         	    6619	   6430408 ns/op	 4522487 B/op	   26118 allocs/op
    BenchmarkHandlerReceiveHTTP/typical_labels_under_1KB,_5000_of_them.
    BenchmarkHandlerReceiveHTTP/typical_labels_under_1KB,_5000_of_them./OK
    BenchmarkHandlerReceiveHTTP/typical_labels_under_1KB,_5000_of_them./OK-12                     	    2695	  17208794 ns/op	15072963 B/op	   60441 allocs/op
    BenchmarkHandlerReceiveHTTP/typical_labels_under_1KB,_5000_of_them./conflict_errors
    BenchmarkHandlerReceiveHTTP/typical_labels_under_1KB,_5000_of_them./conflict_errors-12        	     474	  72533286 ns/op	46396932 B/op	  260141 allocs/op
    BenchmarkHandlerReceiveHTTP/extremely_large_label_value_10MB,_10_of_them
    BenchmarkHandlerReceiveHTTP/extremely_large_label_value_10MB,_10_of_them/OK
    BenchmarkHandlerReceiveHTTP/extremely_large_label_value_10MB,_10_of_them/OK-12                	     270	 137050518 ns/op	226595379 B/op	     132 allocs/op
    BenchmarkHandlerReceiveHTTP/extremely_large_label_value_10MB,_10_of_them/conflict_errors
    BenchmarkHandlerReceiveHTTP/extremely_large_label_value_10MB,_10_of_them/conflict_errors-12   	      21	1616025443 ns/op	698724321 B/op	     408 allocs/op
    PASS
    
    Process finished with exit code 0
    ```
    
    
    Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
    bwplotka committed Mar 19, 2021
    Configuration menu
    Copy the full SHA
    d78f379 View commit details
    Browse the repository at this point in the history

Commits on Mar 20, 2021

  1. Copy labels.

    ```
    GOROOT=/home/bwplotka/.gvm/gos/go1.15 #gosetup
    GOPATH=/home/bwplotka/Repos/thanosgopath #gosetup
    /home/bwplotka/.gvm/gos/go1.15/bin/go test -c -o /tmp/___BenchmarkHandlerReceiveHTTP_in_github_com_thanos_io_thanos_pkg_receive github.com/thanos-io/thanos/pkg/receive #gosetup
    /tmp/___BenchmarkHandlerReceiveHTTP_in_github_com_thanos_io_thanos_pkg_receive -test.v -test.bench ^\QBenchmarkHandlerReceiveHTTP\E$ -test.run ^$ -test.benchmem -test.benchtime=30s
    goos: linux
    goarch: amd64
    pkg: github.com/thanos-io/thanos/pkg/receive
    BenchmarkHandlerReceiveHTTP
    BenchmarkHandlerReceiveHTTP/typical_labels_under_1KB,_500_of_them
    BenchmarkHandlerReceiveHTTP/typical_labels_under_1KB,_500_of_them/OK
    BenchmarkHandlerReceiveHTTP/typical_labels_under_1KB,_500_of_them/OK-12      	   25887	   1537262 ns/op	 1380023 B/op	    6092 allocs/op
    BenchmarkHandlerReceiveHTTP/typical_labels_under_1KB,_500_of_them/conflict_errors
    BenchmarkHandlerReceiveHTTP/typical_labels_under_1KB,_500_of_them/conflict_errors-12         	    4237	   7547968 ns/op	 4522583 B/op	   26118 allocs/op
    BenchmarkHandlerReceiveHTTP/typical_labels_under_1KB,_5000_of_them
    BenchmarkHandlerReceiveHTTP/typical_labels_under_1KB,_5000_of_them/OK
    BenchmarkHandlerReceiveHTTP/typical_labels_under_1KB,_5000_of_them/OK-12                     	    2205	  16513380 ns/op	15071092 B/op	   60420 allocs/op
    BenchmarkHandlerReceiveHTTP/typical_labels_under_1KB,_5000_of_them/conflict_errors
    BenchmarkHandlerReceiveHTTP/typical_labels_under_1KB,_5000_of_them/conflict_errors-12        	     525	  67278233 ns/op	46396645 B/op	  260141 allocs/op
    BenchmarkHandlerReceiveHTTP/extremely_large_label_value_10MB,_10_of_them
    BenchmarkHandlerReceiveHTTP/extremely_large_label_value_10MB,_10_of_them/OK
    BenchmarkHandlerReceiveHTTP/extremely_large_label_value_10MB,_10_of_them/OK-12               	     285	 148049189 ns/op	226596168 B/op	     132 allocs/op
    BenchmarkHandlerReceiveHTTP/extremely_large_label_value_10MB,_10_of_them/conflict_errors
    BenchmarkHandlerReceiveHTTP/extremely_large_label_value_10MB,_10_of_them/conflict_errors-12  	      20	1731361499 ns/op	698722550 B/op	     401 allocs/op
    PASS
    
    Process finished with exit code 0
    
    ```
    
    Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
    bwplotka committed Mar 20, 2021
    Configuration menu
    Copy the full SHA
    2fbe81c View commit details
    Browse the repository at this point in the history
  2. Addded bench.,

    Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
    bwplotka committed Mar 20, 2021
    Configuration menu
    Copy the full SHA
    ad1cc66 View commit details
    Browse the repository at this point in the history
  3. Fix.

    Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
    bwplotka committed Mar 20, 2021
    Configuration menu
    Copy the full SHA
    ca9272e View commit details
    Browse the repository at this point in the history
  4. Improved API.

    Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
    bwplotka committed Mar 20, 2021
    Configuration menu
    Copy the full SHA
    2bb1edb View commit details
    Browse the repository at this point in the history
  5. Changelog.

    Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
    bwplotka committed Mar 20, 2021
    Configuration menu
    Copy the full SHA
    968d6be View commit details
    Browse the repository at this point in the history
  6. Addressed Lucas comments.

    Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
    bwplotka committed Mar 20, 2021
    Configuration menu
    Copy the full SHA
    05adb56 View commit details
    Browse the repository at this point in the history