paritytech / rust-rocksdb

rust wrapper for rocksdb
Apache License 2.0
15 stars 23 forks source link

Parallel compilation of rocksdb #5

Closed nipunn1313 closed 8 years ago

nipunn1313 commented 8 years ago

gcc-rs just added support for parallel compilation as a feature. The feature pulls in rayon as a dependency and then parallel compiles. Rocksdb is a sufficiently large compilation that this seems worth it. Cuts it down from 220 seconds to around 70 seconds on my machine (2 cores, 4 with hyperthreading).

nipunn1313 commented 8 years ago

Ping to @arkpar

arkpar commented 8 years ago

Is there a way to override and disable that? We had an issue with some machines running out of memory back when rocksdb-rs was parallel-compiled with make

arkpar commented 8 years ago

See https://github.com/arkpar/rust-rocksdb/issues/3 for reference

nipunn1313 commented 8 years ago

Yep! acrichton added a NUM_JOBS environment variable parameter to gcc-rs https://github.com/alexcrichton/gcc-rs

So NUM_JOBS=1 cargo build will limit parallelism.