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

[CH] libch.so too large needed to be reduced #2248

Closed
zhanglistar opened this issue Jul 7, 2023 · 3 comments · Fixed by #2269
Closed

[CH] libch.so too large needed to be reduced #2248

zhanglistar opened this issue Jul 7, 2023 · 3 comments · Fixed by #2269

Comments

@zhanglistar
Copy link
Contributor

As title.

@zhanglistar zhanglistar changed the title [CH] So too large needed to be reduced [CH] libch.so too large needed to be reduced Jul 7, 2023
@zhanglistar
Copy link
Contributor Author

zhanglistar commented Jul 7, 2023

  1. strip 1.7G->348M

  2. gc sections -- useless and make compiling and linking time longer.
    -ffunction-sections, -fdata-sections -- useless.

  3. use Oz flag instead of O3, but it maybe hurt performance a little, check,
    https://clang.llvm.org/docs/CommandGuide/clang.html#cmdoption-o0
    1.7G->1012MB, do not use until to prove there is no performance regression.

  4. Not compiling third party libs, decreasing objects from 10000>8400, size: 1.7G->1.5G, after strip 300MB, 3 blocks of hdfs.

@taiyang-li
Copy link
Contributor

taiyang-li commented Jul 10, 2023

some build options could be closed

  • ENABLE_BCRYPT: related to CH client authentication, useless for us.
  • ENABLE_ULID: depended by function ULIDStringToDateTime and generateULID
  • ENABLE_OPENSSL_DYNAMIC/ENABLE_OPENSSL: used by clickhouse-server for opensslconf
  • ENABLE_RUST: include skim(for cmd line history) and blake3(for ch function blake3)
  • ENABLE_ODBC: used by clickhouse-odbc-bridge
  • ENABLE_NURAFT: clickhouse-keeper
  • ENABLE_SQLITE: sqlite storage
  • ENABLE_LIBPQXX: postgresql storage
  • ENABLE_ROCKSDB: rocksdb storage
  • ENABLE_LDAP: ldap authentication
  • ENABLE_NATS: nats storage
  • ENABLE_AMQPCPP: amqp storage
  • ENABLE_KAFKA: kafka storage
  • ENABLE_MYSQL: mysql storage
  • ENABLE_MSGPACK: msgpack format
  • ENABLE_CAPNP: can'n proto format
  • ENABLE_AVRO: avro format, iceberg storage
  • USE_REPLXX: clickhouse-client
  • ENABLE_YAML_CPP: support yaml as config file
  • ENABLE_RAPIDJSON: rapid json parser
  • ENABLE_GRPC: grpc server protocol
  • ENABLE_SENTRY: send crash report to clickhouse inc.
  • ENABLE_CASSANDRA: cassadra storage
  • ENABLE_AZURE_BLOB_STORAGE: azure remote storage

@zhanglistar
Copy link
Contributor Author

After strip:
FILE SIZE VM SIZE


69.9% 239Mi 69.0% 239Mi .text
12.2% 41.7Mi 12.0% 41.7Mi .rodata
6.2% 21.1Mi 6.1% 21.1Mi .rela.dyn
5.8% 20.0Mi 5.7% 20.0Mi .eh_frame
2.4% 8.32Mi 2.4% 8.32Mi .data.rel.ro
2.1% 7.14Mi 2.1% 7.14Mi .gcc_except_table
0.0% 0 1.3% 4.67Mi .bss
0.9% 3.22Mi 0.9% 3.22Mi .eh_frame_hdr
0.5% 1.60Mi 0.5% 1.60Mi .data
0.0% 13.3Ki 0.0% 8.50Ki .init_array
0.0% 13.0Ki 0.0% 13.0Ki .dynsym
0.0% 10.4Ki 0.0% 10.4Ki .rela.plt
0.0% 10.1Ki 0.0% 10.1Ki .dynstr
0.0% 6.92Ki 0.0% 6.92Ki .plt
0.0% 6.70Ki 0.0% 6.70Ki .tdata
0.0% 5.79Ki 0.0% 3.38Ki [15 Others]
0.0% 0 0.0% 4.80Ki .tbss
0.0% 3.48Ki 0.0% 3.48Ki .got.plt
0.0% 2.36Ki 0.0% 2.36Ki malloc_hook
0.0% 2.15Ki 0.0% 2.15Ki .got
0.0% 2.07Ki 0.0% 2.07Ki [LOAD #1 [R]]
100.0% 343Mi 100.0% 347Mi TOTAL

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants