vere: use 40G mapsize only on macOS, 60G otherwise
Per discussion in urbit/urbit#2344, there doesn't seem to be any problem
in raising the default LMDB mapsize on non-mac operating systems.
@@ -41,11 +41,16 @@ MDB_env* u3_lmdb_init(const char* log_path)
return 0;
}
- // TODO: Start with forty gigabytes for the maximum event log size. We'll
- // need to do something more sophisticated for real in the long term, though.
+ // TODO: Start with forty gigabytes on macOS and sixty otherwise for the
+ // maximum event log size. We'll need to do something more sophisticated for
+ // real in the long term, though.
//
- const size_t forty_gigabytes = 42949672960;
- ret_w = mdb_env_set_mapsize(env, forty_gigabytes);
+#ifdef U3_OS_osx
+ const size_t lmdb_mapsize = 42949672960;
+#else
+ const size_t lmdb_mapsize = 64424509440;;
+#endif
+ ret_w = mdb_env_set_mapsize(env, lmdb_mapsize);
if (ret_w != 0) {
u3l_log("lmdb: failed to set database size: %s\n", mdb_strerror(ret_w));
return 0;
