Skip to content

Cherry pick #11840 to 20.5: Fix memory accounting via HTTP interface#11961

Merged
abyss7 merged 6 commits intobackport/20.5/11840from
cherrypick/20.5/b4475086abbceff19401bbc5b99b1716934b2827
Jun 25, 2020
Merged

Cherry pick #11840 to 20.5: Fix memory accounting via HTTP interface#11961
abyss7 merged 6 commits intobackport/20.5/11840from
cherrypick/20.5/b4475086abbceff19401bbc5b99b1716934b2827

Conversation

@abyss7
Copy link
Copy Markdown
Contributor

@abyss7 abyss7 commented Jun 25, 2020

Original pull-request #11840

azat and others added 6 commits June 21, 2020 17:27
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: #11153
w/o the patch the test fails with, since it succeed only 512 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)
Fix memory accounting via HTTP interface
@abyss7 abyss7 added do not test disable testing on pull request pr-cherrypick Cherry-pick of merge-commit before backporting. Do not use manually - automated use only! labels Jun 25, 2020
@abyss7 abyss7 merged commit a1891d0 into backport/20.5/11840 Jun 25, 2020
@abyss7 abyss7 deleted the cherrypick/20.5/b4475086abbceff19401bbc5b99b1716934b2827 branch June 25, 2020 20:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do not test disable testing on pull request pr-cherrypick Cherry-pick of merge-commit before backporting. Do not use manually - automated use only!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants