Open jameshcorbett opened 4 months ago
To get this going, here's the JGF specification website: https://jsongraphformat.info/
We're currently using JGF v1, and I don't think we necessarily want to switch to v2 unless there's a material win for doing so. The main things that I can think of (@milroy I'm pretty sure I'm missing at least one of your suggestions, please correct me) that we've discussed are:
we send a lot of default data over the wire. Here's a vertex in flux JGF:
{
"id": "2",
"metadata": {
"type": "node",
"basename": "node",
"name": "node0",
"id": 0,
"uniq_id": 2,
"rank": -1,
"exclusive": false,
"unit": "",
"size": 1,
"paths": {
"containment": "/tiny0/rack0/node0"
}
}
},
Just off top of my head:
{type}{id}
With just that, we could send this as essentially equivalent:
{
"id": "2",
"metadata": {
"type": "node",
}
},
Edges are a bit harder, but since we're using a bidirectional graph finally we should be able to remove the value of the name object, and containment would be the default, so we could take these:
{
"source": "2",
"target": "4",
"metadata": {
"name": {
"containment": "contains"
}
}
},
{
"source": "1",
"target": "5",
"metadata": {
"name": {
"power": "supplies_to"
}
}
},
and make them
{
"source": "2",
"target": "4",
},
{
"source": "1",
"target": "5",
"metadata": {
"type": "power"
}
},
All of that is still JGF compatible
[
// [source, target, (optional) type]
[2,4],
[1,5,"power"]
]
Or even switch to a stream of json objects like some other formats use so we can do the same to vertices and process them without having to build the whole object in memory, but this will break any and all JGF parsers.
CC: @garlick, @grondo
As I understand it I'm on the hook to try out elcap-sized JGF and see what the performance is like, which I intend to do as soon as I get some pressing rabbit issues out of the way.
OK so on a representative system:
Before the changes introduced by #1293 and #1297, JGF was 8458557 bytes. After the changes in those two PRs, it dropped to 2122574 bytes. If the path
field of vertices could be dropped in all cases (currently it has to be supplied in all cases), that would shrink it to 1298046 bytes. That makes it around 1/7 the original size. Not bad.
If #1299 goes in, the last obvious work I'm aware of will be to drop each vertex's .metadata.paths.containment
which in theory should be simple, however I'm not quite sure how to actually implement it. Also, there is some code that fetches all the paths to SSD vertices in JGF in order to be able to mark the vertices as UP
or DOWN
via set-status
RPCs so that would need some sort of replacement.
On Hetchy, JGF for jobs appears to be around 15K per node.
JGF is verbose, and Rabbit-y JGF on elcap systems can become very large. We discussed offline several ways to shrink JGF, both while maintaining the same format and compatibility with the standard (which?) and breaking the standard to achieve greater reductions in size.
Performance tests are necessary to see just how bad the problems are, so we can decide how radical of changes we need to make.