Pinned Loading
-
kafka-consumer-lag-reporter
kafka-consumer-lag-reporter PublicA standalone spring boot app for reporting kafka consumer group lag metrics to prometheus
Kotlin 1
-
-
Postgres Useful queries
Postgres Useful queries 1Size of all relations:
2SELECT nspname || '.' || relname AS "relation",
3pg_size_pretty(pg_relation_size(C.oid)) AS "size"
4FROM pg_class C
5LEFT JOIN pg_namespace N ON (N.oid = C.relnamespace)
-
Postgress autovacuum tuning
Postgress autovacuum tuning 1autovacuum_vacuum_cost_limit
2default = 200
3proposed=2000
4#To prevent excessive load on the DB due to the autovacuum, there is an I/O quota imposed by Postgres. So every read/write causes depletion of this quota and once it is exhausted the autovacuum sleeps for a fixed time. This configuration increases the quota limit, therefore increasing the amount of I/O that the vacuum can do. This has a default of 200. More details in references #7
5What we generally do is increasing the cost_limit parameter, e.g. to 1000 (or 2000), which increases the throughput by 5x (or 10x). You may of course tweak the other parameters (cost per page operation, sleep delay), but we do that only very rarely – changing the cost limit works well enough.
-
Kube commands
Kube commands 1Change log level on a pod running spring boot app:
23kubectl exec pod-id -- curl -X POST -d '{"configuredLevel":"TRACE"}' -H "Content-Type: application/json" http://localhost:8080/actuator/loggers/org.springframework
45Change log level on multiple pods
-
Kafka commands
Kafka commands 1Cosole consumer:
2bin/kafka-console-consumer.sh --bootstrap-server broker1:9092 --topic topic-name --from-beginning
345With timestamp
Something went wrong, please refresh the page to try again.
If the problem persists, check the GitHub status page or contact support.
If the problem persists, check the GitHub status page or contact support.