synapse icon indicating copy to clipboard operation
synapse copied to clipboard

Integrate the rust state compressor with Synapse.

Open Azrenbeth opened this issue 4 years ago • 10 comments

Add config options to control the run of the automatic tool from the state compressor

Azrenbeth avatar Sep 20 '21 15:09 Azrenbeth

@Azrenbeth I've pushed a couple of commits that attempt to reuse the postgres connection parameters from an existing connection. I haven't had a chance to test it though

erikjohnston avatar Sep 24 '21 13:09 erikjohnston

@Azrenbeth I've pushed a couple of commits that attempt to reuse the postgres connection parameters from an existing connection. I haven't had a chance to test it though

That should now be working again!

Azrenbeth avatar Sep 27 '21 16:09 Azrenbeth

It looks like we also block shutdown until the compression run has finished, which isn't ideal

erikjohnston avatar Sep 28 '21 16:09 erikjohnston

It looks like we also block shutdown until the compression run has finished, which isn't ideal

Is there a way to interupt it? There shouldn't be any problem if the compressor gets stopped mid way through.

Azrenbeth avatar Sep 28 '21 16:09 Azrenbeth

It looks like we also block shutdown until the compression run has finished, which isn't ideal

Is there a way to interupt it? There shouldn't be any problem if the compressor gets stopped mid way through.

There should be a way of doing it, you can mark threads as a "daemon" so they don't block shutdown, but can't remember quite how to do it off the top of my head

erikjohnston avatar Sep 28 '21 16:09 erikjohnston

It looks like we also block shutdown until the compression run has finished, which isn't ideal

Is there a way to interupt it? There shouldn't be any problem if the compressor gets stopped mid way through.

There should be a way of doing it, you can mark threads as a "daemon" so they don't block shutdown, but can't remember quite how to do it off the top of my head

Ran out of time to work out how Twisted shuts down, but we'd want it to stop the compressor, not let it keep running after Synapse stops (to prevent accidentally having two compressor runs happen simultaneously)

Azrenbeth avatar Sep 28 '21 16:09 Azrenbeth

We need to figure out exactly what to do here, as things stands this makes our CPU metrics useless. One thing we could do is run it in a child process?

erikjohnston avatar Nov 11 '21 16:11 erikjohnston

We need to figure out exactly what to do here, as things stands this makes our CPU metrics useless. One thing we could do is run it in a child process?

That sounds sensible. Is there any reason not to?

anoadragon453 avatar Nov 17 '21 11:11 anoadragon453

We need to figure out exactly what to do here, as things stands this makes our CPU metrics useless. One thing we could do is run it in a child process?

That sounds sensible. Is there any reason not to?

I don't think so, just time.

erikjohnston avatar Nov 17 '21 11:11 erikjohnston

We need to figure out exactly what to do here, as things stands this makes our CPU metrics useless. One thing we could do is run it in a child process?

As a clarification for future context: the issue is that it would frequently spike over 100% cpu, so you could no longer tell how close the python code was to saturating the cpu. In other words, we'd like it to be separate from the normal CPU metrics.

reivilibre avatar Aug 05 '22 10:08 reivilibre