hundreds-father-404
05/24/2021, 11:46 PM--pantsd-max-memory-usage
, two questions:
* We default to 1 GiB - instead, should we detect total size of memory on machine and change default dynamically?
* the option takes bytes, rather than kb. That makes it harder to reason about, and ulimit
uses kb. I think we should prob even be using mbhundreds-father-404
05/24/2021, 11:46 PMfast-nail-55400
05/25/2021, 12:02 AMfast-nail-55400
05/25/2021, 12:03 AM--pants-max-memory-usage=512MB
for examplehundreds-father-404
05/25/2021, 12:04 AMhundreds-father-404
05/25/2021, 1:11 AM{gb,mb,kb,b}
(capitalization doesn't matter)hundreds-father-404
05/25/2021, 1:17 AMhundreds-father-404
05/25/2021, 1:28 AMhundreds-father-404
05/26/2021, 12:55 AMfast-nail-55400
05/26/2021, 1:53 PMhundreds-father-404
05/27/2021, 5:12 PM--pantsd-max-memory-usage
includes memory used for the current run + memory from prior memoizationfast-nail-55400
05/27/2021, 5:22 PMhundreds-father-404
05/27/2021, 5:26 PMpsutil
to inspect the Pantsd process's memory consumption - I don't know how to get more granular than thatfast-nail-55400
05/27/2021, 5:27 PMhundreds-father-404
05/27/2021, 5:28 PM--no-pantsd
does memoize within the current run, only the process dies after the run completes. All Pantsd does is keeps that process long-livingfast-nail-55400
05/27/2021, 5:29 PMhundreds-father-404
05/27/2021, 5:30 PMbut it is [pantsd memoization] a single data structure?hm @average-vr-56795, do you know the answer to that?
average-vr-56795
05/27/2021, 6:41 PMHashMap
of `NodeKey`s (https://github.com/pantsbuild/pants/blob/aa8e55c6ef610fa1ca1ac5fd8dc40fcb2d278ad0/src/rust/engine/src/nodes.rs#L1142-L1154) and a bunch of graph metadata.
But there's a lot of structure to the contents (because it's a graph, and nodes refer to each other), so we couldn't just pop out the most recently used ones (well, we could, but we should probably do so through a dependency-aware traversal if we wanted to)... There's also an element of versioning in each entry...average-vr-56795
05/27/2021, 6:42 PMaverage-vr-56795
05/27/2021, 6:44 PMhundreds-father-404
05/27/2021, 6:44 PMaverage-vr-56795
05/27/2021, 6:45 PMaverage-vr-56795
05/27/2021, 6:45 PMhundreds-father-404
05/27/2021, 6:46 PMaverage-vr-56795
05/27/2021, 6:46 PMaverage-vr-56795
05/27/2021, 6:47 PMfast-nail-55400
05/27/2021, 6:47 PMfast-nail-55400
05/27/2021, 6:48 PMaverage-vr-56795
05/27/2021, 6:48 PMaverage-vr-56795
05/27/2021, 6:49 PMengine::Value
is just a pointer, right? It points to some memory owned by the Python runtime?hundreds-father-404
05/27/2021, 6:55 PMengine::Value
is an Arc
around any FFI value, so it's not particularly clear what that refers to. Could be for example a FrozenDict
representing env
///
/// We wrap PyObject (which cannot be cloned without acquiring the GIL) in an Arc in order to avoid
/// accessing the Gil in many cases.
///
#[derive(Clone)]
pub struct Value(Arc<PyObject>);
I was going to look into if it makes sense to remove that abstraction with PyO3, which claims better support for references of Python objects, whereas Rust-CPython takes ownershi