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

build from source locally #3

Merged
merged 6 commits into from
Mar 14, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
reduce max-open-files for tikv & run prometheus as root
  • Loading branch information
tennix committed Jan 11, 2018
commit dbfd4593aebd7eb62c5f5a35b6f40700bc1f5e26
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ $ mysql -h 127.0.0.1 -P 4000 -u root
* config/tikv.toml is copied from [TiKV repo](https://github.com/pingcap/tikv/tree/master/etc)
* config/tidb.toml is copied from [TiDB repo](https://github.com/pingcap/tidb/tree/master/config)

If you find these configuration files outdated or mismatch with TiDB version, you can copy these files from their upstream repos and change their metrics addr with `pushgateway:9091`
If you find these configuration files outdated or mismatch with TiDB version, you can copy these files from their upstream repos and change their metrics addr with `pushgateway:9091`. Also `max-open-files` are configured to `1024` in tikv.toml to simplify quick start on Linux, because setting up ulimit on Linux with docker is quite tedious.

And config/*-dashboard.json are copied from [TiDB-Ansible repo](https://github.com/pingcap/tidb-ansible/tree/master/scripts)

Expand Down
19 changes: 19 additions & 0 deletions compose/templates/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ services:
- --initial-cluster={{- template "initial_cluster" $ }}
- --data-dir=/data/pd{{ . }}
- --config=/pd.toml
# sysctls:
# net.core.somaxconn: 32768
# ulimits:
# nofile:
# soft: 1000000
# hard: 1000000
restart: on-failure
{{- end }}

Expand Down Expand Up @@ -83,6 +89,12 @@ services:
{{- range until $pdSize }}
- "pd{{.}}"
{{- end }}
# sysctls:
# net.core.somaxconn: 32768
# ulimits:
# nofile:
# soft: 1000000
# hard: 1000000
restart: on-failure
{{- end }}

Expand Down Expand Up @@ -125,6 +137,12 @@ services:
{{- range until $tikvSize }}
- "tikv{{.}}"
{{- end }}
# sysctls:
# net.core.somaxconn: 32768
# ulimits:
# nofile:
# soft: 1000000
# hard: 1000000
restart: on-failure

{{- if .Values.tidbVision }}
Expand Down Expand Up @@ -163,6 +181,7 @@ services:
- /etc/localtime:/etc/localtime:ro
restart: on-failure
prometheus:
user: root
image: {{ $prometheusImage }}
command:
- --storage.tsdb.path=/data/prometheus
Expand Down
4 changes: 2 additions & 2 deletions config/tikv.toml
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ address = "pushgateway:9091"
# If max-open-files = -1, RocksDB will prefetch index and filter blocks into
# block cache at startup, so if your database has a large working set, it will
# take several minutes to open the db.
# max-open-files = 40960
max-open-files = 1024

# Max size of rocksdb's MANIFEST file.
# For detailed explanation please refer to https://github.com/facebook/rocksdb/wiki/MANIFEST
Expand Down Expand Up @@ -380,7 +380,7 @@ address = "pushgateway:9091"

[raftdb]
# max-sub-compactions = 1
# max-open-files = 40960
max-open-files = 1024
# max-manifest-file-size = "20MB"
# create-if-missing = true
# writable-file-max-buffer-size = "1MB"
Expand Down
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ services:
- /etc/localtime:/etc/localtime:ro
restart: on-failure
prometheus:
user: root
image: prom/prometheus:v2.0.0
command:
- --storage.tsdb.path=/data/prometheus
Expand Down