0xtools icon indicating copy to clipboard operation
0xtools copied to clipboard

make psn-embedded sqlite use a /tmp file instead of an in-memory DB

Open tanelpoder opened this issue 6 months ago • 3 comments

Currently sqlite uses only memory to keep track of thread samples.

This could take a noticeable amount of memory, especially when sampling all thread states, at high frequency and for a long time.

When initializing a sqlite DB/connection, configure it to use a /tmp file instead of RAM. We could make it conditional, a'la if psn is executed to sample for more than N seconds (60 seconds?), then use a file-backed sqlite DB, otherwise RAM.

tanelpoder avatar Aug 05 '24 07:08 tanelpoder