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

Fix memory accounting via HTTP interface #11840

Merged
merged 5 commits into from Jun 23, 2020

Commits on Jun 21, 2020

  1. Fix memory accounting via HTTP interface

    function perf_test()
    {
        time yes '127.1:8123/?wait_end_of_query=1' | head -n10000 | xargs -P10000 curl -s -d 'select 1' | grep -x -c 1
    }
    function server()
    {
        local limit=$1 && shift
        clickhouse-server "$@" -- --max_server_memory_usage=$limit
    }
    
    perf_test:
    
    - before this patch with 1G  limit: succeed only ~800  queries
    - after  this patch with 1G  limit: succeed      ~8000 queries
    
    - before this patch with 10G limit: succeed only ~3000  queries
    - after  this patch with 10G limit: succeed      ~10000 queries
    
    Fixes: ClickHouse#11153
    azat committed Jun 21, 2020
    Copy the full SHA
    8449601 View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    bffd4cf View commit details
    Browse the repository at this point in the history
  3. Copy the full SHA
    c758567 View commit details
    Browse the repository at this point in the history

Commits on Jun 22, 2020

  1. Tune 01238_http_memory_tracking to make it more optimal

    w/o the patch the test fails with, since it succeed only 512 queries.
    azat committed Jun 22, 2020
    Copy the full SHA
    9744c99 View commit details
    Browse the repository at this point in the history
  2. Fix 01091_num_threads flaps (by adding unique identifier to the queries)

    Actually there were two issues:
    - missing \n, so it picked the wrong query anway
    - no unique identifier, hence it may works incorrectly (and actually,
      event clickhouse-test script executes 'SELECT 1' query)
    azat committed Jun 22, 2020
    Copy the full SHA
    267a6c8 View commit details
    Browse the repository at this point in the history