Commit Graph

403 Commits

Author SHA1 Message Date
Alexey Milovidov
37fb7e707c Queries are too fast 2020-12-20 12:01:51 +03:00
Alexey Milovidov
7340839d6d Update performance tests after speedup 2020-12-20 07:04:29 +03:00
Alexey Milovidov
6e0bb11fe2 Tests become too fast 2020-12-17 22:11:03 +03:00
Alexey Milovidov
0e0a66b03b Remove unsupported ciphers 2020-12-17 22:09:27 +03:00
Alexey Milovidov
ef064696e7 Add perf test 2020-12-13 00:17:37 +03:00
Azat Khuzhin
9b6b2b175f perf: merge custom_tld.xml/first_significant_subdomain.xml into url_hits.xml
v2: smaller table for *firstSignificantSubdomain* (max_threads=1)
2020-12-09 21:08:30 +03:00
Azat Khuzhin
8b6256dc4b Add performance test for custom TLD
And seems works with the same speed as default (that uses gperf):

- cutToFirstSignificantSubdomain

    SELECT cutToFirstSignificantSubdomain(URL)
    FROM datasets.hits
    SETTINGS max_threads = 1
    FORMAT Null
    SETTINGS max_threads = 1

    0 rows in set. Elapsed: 0.904 sec. Processed 8.87 million rows, 762.68 MB (9.82 million rows/s., 843.61 MB/s.)

- cutToFirstSignificantSubdomainCustom

    SELECT cutToFirstSignificantSubdomainCustom(URL, 'public_suffix_list')
    FROM datasets.hits
    SETTINGS max_threads = 1
    FORMAT Null
    SETTINGS max_threads = 1

    0 rows in set. Elapsed: 0.909 sec. Processed 8.87 million rows, 762.68 MB (9.76 million rows/s., 838.83 MB/s.)
2020-12-09 21:08:30 +03:00
Azat Khuzhin
68c4da1203 Use max_threads=2 for countMatches to keep it under 2 seconds
Although I don't like this idea.
2020-12-04 07:54:34 +03:00
Azat Khuzhin
cb68d5b5e7 Add performance test for countMatches() function 2020-12-01 22:26:07 +03:00
Alexander Kuzmenkov
5ad15e2018
Merge pull request #17109 from azat/perf-AggregatingMergeTree-INSERT
Improve performance of AggregatingMergeTree w/ SimpleAggregateFunction(String) in PK
2020-12-01 16:27:36 +03:00
Alexander Kuzmenkov
8fd0810142
Update aggregating_merge_tree_simple_aggregate_function_string.xml
`system stop merges` w/o table name has global effect, so the rest of the tests is affected. Also `optimize` is more suitable here so that the end result is the same every time.
2020-11-30 12:31:30 +03:00
Alexander Kuzmenkov
a3277b183d Adjust perf test thresholds 2020-11-27 15:08:42 +03:00
Nikolai Kochetov
9291bbb04b
Merge pull request #16804 from vdimir/ip-dict-no-trie
sorted-array based ip_dict
2020-11-26 19:26:06 +03:00
Alexander Kuzmenkov
15a0f14445
Merge pull request #15419 from myrrc/improvement/diff-types-in-avg-weighted
Allow different types in avgWeighted. Allow avg and avgWeighed to operate on extended integral types.
2020-11-26 17:16:48 +03:00
Nikolai Kochetov
729272391f
Merge branch 'master' into ip-dict-no-trie 2020-11-25 23:07:19 +03:00
Azat Khuzhin
688cb6b4d9 Update date_time_short perf test for toUnixTimestamp(Date()) 2020-11-25 21:17:11 +03:00
myrrc
420f2489a7 fixed decimal scales calc, updated the tests 2020-11-24 17:07:59 +03:00
myrrc
fbb0e6e6aa Merge remote-tracking branch 'upstream/master' into improvement/diff-types-in-avg-weighted 2020-11-24 16:04:17 +03:00
vdimir
52bc290616
Regenerate ya.make, add format null to ip_trie.xml 2020-11-24 11:20:11 +03:00
Azat Khuzhin
8931d3eb6f Do not use SET via <full_query> in perf tests
Since if the connection will be closed (by some reason), then the
setting will not be applied after transparent reconnect (since only
native clickhouse-client can do this, since it parses the query, but
perf tests uses python driver).

Just use inplace SETTINGS clause or <settings>.
2020-11-21 14:02:21 +03:00
Azat Khuzhin
a3116d5614 Tune aggregating_merge_tree_simple_aggregate_function_string to make it faster 2020-11-21 12:08:59 +03:00
Azat Khuzhin
35231662b3 Improve performance of AggregatingMergeTree w/ SimpleAggregateFunction(String)
While reading from AggregatingMergeTree with
SimpleAggregateFunction(String) in primary key and
optimize_aggregation_in_order perf top shows:

    Samples: 1M of event 'cycles', 4000 Hz, Event count (approx.): 287759760270 lost: 0/0 drop: 0/0
      Children      Self  Shared Object         Symbol
    +   12.64%    11.39%  clickhouse            [.] memcpy
    +    9.08%     0.23%  [unknown]             [.] 0000000000000000
    +    8.45%     8.40%  clickhouse            [.] ProfileEvents::increment    # <-- this, and in debug it has not 0.08x overhead, but 5.8x overhead
    +    7.68%     7.67%  clickhouse            [.] LZ4_compress_fast_extState
    +    5.29%     5.22%  clickhouse            [.] DB::IAggregateFunctionHelper<DB::AggregateFunctionNullUnary<true, true> >::addFree

The reason is obvious, ProfileEvents is atomic counters (and also they
are nested):

<details>

```
    Samples: 7M of event 'cycles', 4000 Hz, Event count (approx.): 450726149337
    ProfileEvents::increment  /usr/bin/clickhouse [Percent: local period]
    Percent│
           │
           │
           │    Disassembly of section .text:
           │
           │    00000000078d8900 <ProfileEvents::increment(unsigned long, unsigned long)@@Base>:
           │    ProfileEvents::increment(unsigned long, unsigned long):
      0.17 │      push  %rbp
      0.00 │      mov   %rsi,%rbp
      0.04 │      push  %rbx
      0.20 │      mov   %rdi,%rbx
      0.17 │      sub   $0x8,%rsp
      0.26 │    → callq DB::CurrentThread::getProfileEvents
           │    ProfileEvents::Counters::increment(unsigned long, unsigned long):
      0.00 │      lea   0x0(,%rbx,8),%rdi
      0.05 │      nop
           │    unsigned long std::__1::__cxx_atomic_fetch_add<unsigned long, unsigned long>(std::__1::__cxx_atomic_base_impl<unsigned long>*, unsigned long, std::__1::memory_order):
      1.02 │      mov   (%rax),%rdx
     97.04 │      lock  add   %rbp,(%rdx,%rdi,1)
           │    ProfileEvents::Counters::increment(unsigned long, unsigned long):
      0.21 │      mov   0x10(%rax),%rax
      0.04 │      test  %rax,%rax
      0.00 │    → jne   78d8920 <ProfileEvents::increment(unsigned long, unsigned long)@@Base+0x20>
           │    ProfileEvents::increment(unsigned long, unsigned long):
      0.38 │      add   $0x8,%rsp
      0.00 │      pop   %rbx
      0.04 │      pop   %rbp
      0.38 │    ← retq
```

</details>

These ProfileEvents was ArenaAllocChunks (it shows ~1.5M events per
second), and the reason is that the table has
SimpleAggregateFunction(String) in PK, which requires Arena.
But most of the time there Arena wasn't even used, so avoid this cost by
re-creating Arena only if it was "used" (i.e. has new chunks).

Another possibility is to avoid populating Arena::head in ctor, but this
will make the Arena code more complex, so for now this was preferred.

Also as a long-term solution it worth looking at implementing them via
RCU (to move the extra overhead out from the write code path into read
side).
2020-11-19 23:06:12 +03:00
vdimir
36544a45b7
Merge remote-tracking branch 'upstream/master' into ip-dict-no-trie 2020-11-19 18:56:24 +03:00
alesapin
cdceafdd89 Trying to make read_in_order_many_parts more stable 2020-11-19 13:25:39 +03:00
myrrc
dbc5284b73 replaced Memory by MergeTree in the test to get perftests 2020-11-18 12:51:02 +03:00
vdimir
6dcb38db3f
Minor changes in IP dictionary 2020-11-16 21:08:31 +03:00
Alexander Kuzmenkov
b0e660651a cleanup 2020-11-16 19:09:58 +03:00
vdimir
5e0e22301b
Slightly improve ip_dict loading performance, handle v4 to v6 masks in prepossessing, add more tests 2020-11-15 18:55:34 +03:00
vdimir
ca8e4b1607
Minor fixes of ip dict 2020-11-14 20:03:13 +03:00
myrrc
b1c0089b78 Merge remote-tracking branch 'upstream/master' into improvement/diff-types-in-avg-weighted 2020-11-14 16:50:04 +03:00
Alexander Kuzmenkov
e4dd68039e fix 2020-11-13 08:00:43 +03:00
myrrc
a8d8dd7d3e Merge remote-tracking branch 'upstream/master' into improvement/diff-types-in-avg-weighted 2020-11-12 14:50:59 +03:00
Alexander Kuzmenkov
0d10a4990e fix 2020-11-12 11:27:33 +03:00
Alexander Kuzmenkov
91f88c79f9 Merge remote-tracking branch 'origin/master' into HEAD 2020-11-12 11:20:09 +03:00
Alexey Milovidov
f1d721fa74 Marked some perf test queries as short 2020-11-11 19:58:31 +03:00
Alexander Kuzmenkov
f31d7869ac Merge remote-tracking branch 'origin/master' into HEAD 2020-11-11 14:51:35 +03:00
Alexander Kuzmenkov
906b338a1d fixes 2020-11-11 14:51:21 +03:00
Danila Kutenin
c36e6fe378 Fix tests finally 2020-11-10 18:22:59 +03:00
Danila Kutenin
c0308a5d85 Fix tests, I cannot count number of zeros sometimes 2020-11-10 18:21:39 +03:00
Danila Kutenin
847fa9ca3c Merge 2020-11-10 18:15:26 +03:00
Danila Kutenin
8504efde77 Merge 2020-11-10 18:12:49 +03:00
Danila Kutenin
2057198779 Fix performance tests that became very fast 2020-11-10 17:58:05 +03:00
myrrc
e460248624 Merge remote-tracking branch 'upstream/master' into improvement/diff-types-in-avg-weighted 2020-11-10 14:54:24 +03:00
Alexander Kuzmenkov
84fb76bad4 fixes 2020-11-10 07:19:43 +03:00
Alexander Kuzmenkov
030419db90 Try 12 threads max in perf test.
This will allow us to use more machines, not only Gold 6320.
2020-11-09 19:14:05 +03:00
alexey-milovidov
e47ed55d32
Merge pull request #14977 from achimbab/indexOf_bloomfilter
Fix indexOf() to use BloomFilter
2020-11-09 17:58:42 +03:00
alexey-milovidov
2994499680
Update bloom_filter_select.xml 2020-11-09 17:58:27 +03:00
Alexey Milovidov
ff906369ea Adjust time for perf test 2020-11-08 23:22:50 +03:00
vdimir
81671ceb39
Add tests/performance/ip_trie.xml [wip] 2020-11-08 21:32:22 +03:00
Alexey Milovidov
f07988eec7 Remove perf test of sumbur hash, because we do not care 2020-11-08 21:17:30 +03:00