Skip to content

Server queries in multi-graph regime with full loading to RAM#569

Open
karasikov wants to merge 6 commits intomasterfrom
mk/server
Open

Server queries in multi-graph regime with full loading to RAM#569
karasikov wants to merge 6 commits intomasterfrom
mk/server

Conversation

@karasikov
Copy link
Member

@karasikov karasikov commented Nov 21, 2025

Support requests with flag "in_ram": true, which means the graph would be fully loaded to RAM before querying.

Copy link
Contributor

@adamant-pwn adamant-pwn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good overall. Some minor comments.

WITH_MMAP = set_bit;
}

bool with_mmap(bool set_bit) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's only use set_mmap for setting it then? Otherwise it's counter-intuitive that set_bit = true enables it, but set_bit = false doesn't disable it.

// fprintf(stderr, "\t --cache-size [INT] \tnumber of uncompressed rows to store in the cache [0]\n");
fprintf(stderr, "\n\t --num-top-labels [INT] \tmaximum number of top labels per query by default [10'000]\n");
fprintf(stderr, "\t --no-coord-mapping \t\tquery without mapping coords to sequence headers even if the .seq index exists [off]\n");
fprintf(stderr, "\t --mem-cap-gb [FLOAT] \tmemory in GB available for the server to load graphs for queries into RAM [1]\n");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should it be higher, like 4+ GB, given typical index sizes?

exit(1);
}
logger->info("[Server] All graphs were loaded (with mmap). Ready to serve queries.");
utils::set_mmap(false);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a bit confused on what it tries to do, right after saying "all graphs loaded with mmap".

" Make sure they're on a fast disk.");
utils::with_mmap(true);
}
loaded_with_mmap = true;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's put it inside the if above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants