Skip to content

Commit

Permalink
[Docs] Jemalloc troubleshooting. (#2998)
Browse files Browse the repository at this point in the history
* [Docs] Jemalloc troubleshooting.

* fix fmt

* Update documentation/src/trouble_shooting.md

Co-authored-by: David Himmelstrup <[email protected]>

* Update documentation/src/trouble_shooting.md

Co-authored-by: David Himmelstrup <[email protected]>

* more precise instructions

---------

Co-authored-by: David Himmelstrup <[email protected]>
  • Loading branch information
ruseinov and lemmih authored Jun 16, 2023
1 parent 4f77cf1 commit 53cbf32
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions documentation/src/trouble_shooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,20 @@ By default, Forest will use large database files (roughly 1GiB each). Lowering
the size of these files lets RocksDB use less memory but runs the risk of
hitting the open-files limit. If you do hit this limit, either increase the file
size or use `ulimit` to increase the open-files limit.

#### Jemalloc issues on Apple Silicon macs

Forest is compiled with `jemalloc` as a default allocator. If you are having
problems running or compiling Forest, use this checklist:

1. Make sure you are using an arm64 version of homebrew; this could be a problem
one inherits when migrating from an Intel Mac to Apple Silicon:
[Stackoverflow example](https://stackoverflow.com/a/68443301).
2. Make sure your default host is set to `aarch64-apple-darwin` via
`rustup set default-host aarch64-apple-darwin`.
3. This could result in various errors related to the fact that you still have
some of the libraries symlinked to `/usr/local/lib` from an intel Homebrew
installation. The easiest fix for this is:
- Remove the libraries in question from `/usr/local/lib`.
- Add `export LIBRARY_PATH=/opt/homebrew/lib` to your bash profile.
- Source the new bash profile.

0 comments on commit 53cbf32

Please sign in to comment.