pistolero on Nostr: #[0] Two things: if Postgres and BEAM are competing for RAM, that can be an issue. ...
erramenos :verifiedpedophile: (npub1awh…4ll9) Two things: if Postgres and BEAM are competing for RAM, that can be an issue. Try zram swap and give Postgres less memory. The other option is sometimes less Postgres latency means the bottleneck moves: get nginx to log response times (time to upstream headers is the relevant one), measure that, and also poll Postgres for which queries are consuming time (`select state,pid,CURRENT_TIMESTAMP-query_start, datname, query from pg_stat_activity where state <> 'idle' order by CURRENT_TIMESTAMP-query_start DESC;`).
Published at
2023-04-02 00:19:13Event JSON
{
"id": "8ca1206ed1f241bff48074bd17aa4c6594a0bdb69989f2aadfa421e78fe44d31",
"pubkey": "c5cf39149caebda4cdd61771c51f6ba91ef5645919004e5c4998a4ea69f00512",
"created_at": 1680394753,
"kind": 1,
"tags": [
[
"p",
"ebae7d823eb57c17ea0bfd5cb4db54077d7a435d6d0dc4e586e7ee608d2b293f",
"wss://relay.mostr.pub"
],
[
"e",
"51a5ef1139745871966a2e6d31a11b02aeb2462986d7d8725fd7b90446a1f8b8",
"wss://relay.mostr.pub",
"reply"
],
[
"mostr",
"https://freespeechextremist.com/objects/34b47008-7094-40d3-bf88-5a4d6ad2d477"
]
],
"content": "#[0] Two things: if Postgres and BEAM are competing for RAM, that can be an issue. Try zram swap and give Postgres less memory. The other option is sometimes less Postgres latency means the bottleneck moves: get nginx to log response times (time to upstream headers is the relevant one), measure that, and also poll Postgres for which queries are consuming time (`select state,pid,CURRENT_TIMESTAMP-query_start, datname, query from pg_stat_activity where state \u003c\u003e 'idle' order by CURRENT_TIMESTAMP-query_start DESC;`).",
"sig": "069c05bf6a43af27f18a31d55449be7d6bea9007e2bcc8ff16528a47909bdc8396a2dbfcfd43407e8b61eac417c13ec15021320a02eca0129535bb024496973b"
}