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

feature: add warning for executor cache config #831

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
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
7 changes: 7 additions & 0 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include <fstream>
#include <iomanip>
#include <sys/time.h>
#include <sys/sysinfo.h>
#include "goldilocks_base_field.hpp"
#include "utils.hpp"
#include "config.hpp"
Expand Down Expand Up @@ -574,6 +575,12 @@ int main(int argc, char **argv)
ExecutorServer *pExecutorServer = NULL;
if (config.runExecutorServer)
{
struct sysinfo sysInfo;
// If configured executor is using more than 50% of available system memory, output warning.
if ( (config.dbProgramCacheSize + config.dbMTCacheSize) > (0.5 * sysInfo.totalram / 1048576) )
{
zklog.warning("Available system memory may not be enough for the configured option. Try reducing the dbMTCacheSize, or dbProgramCacheSize in case of OOM...");
}
pExecutorServer = new ExecutorServer(fr, prover, config);
zkassert(pExecutorServer != NULL);
zklog.info("Launching executor server thread...");
Expand Down
Loading