Skip to content

Releases: raulk/go-watchdog

Release 1.3.0

12 Jul 10:39
9c5e371
Compare
Choose a tag to compare

v1.2.0

13 Dec 12:26
60d0a53
Compare
Choose a tag to compare
  • introduce the possibility of receiving a callback before forced GC runs; this gives the application the opportunity to shed resources to be collected on imminent GC.
  • introduce the possibility of customizing the funciton that runs on forced GC; this enables the application to more aggressively return memory to the OS by setting it to debug.FreeOSMemory.

Thanks to @marten-seemann for the contributions!

v1.1.0

30 Nov 10:32
4f154e8
Compare
Choose a tag to compare

go-watchdog now supports multiple GC notifees. The global NotifyGC variable is deprecated, and has been replaced with a RegisterNotifee function. NotifyGC is still invoked if non-nil, but it will be removed entirely in future releases.

Thanks to @marten-seemann for this feature.

v1.0.1

20 Jan 17:52
c1e393b
Compare
Choose a tag to compare

This contains minor adjustments:

  • minimum GOGC on heap watchdog to prevent GC overscheduling.
  • write heap profiles instead of heap dumps.
  • minor logging adjustments.

v1.0.0

20 Jan 12:38
8022773
Compare
Choose a tag to compare

This release introduces major changes.

Refactors

  • HeapDriven and SystemDriven are now distinct run modes.
  • Policies are now stateless, pure, and simplified. Policies now return a single value: the next utilization at which GC should run. The watchdog honours that target differently depending on the run mode.
  • The HeapDriven watchdog now adjusts GOGC dynamically, based on the policy's target, thus delegating the scheduling of GC to the runtime. This results in a higher reliability, that is not to quick memory bursts within sampling periods.
  • The SystemDriven watchdog remains a polling watchdog.
  • The emergency and silence features of the watermark policy have been removed.

cgroup-driven watchdog

A new cgroup-driven watchdog has been implemented. This watchdog discovers the memory limit from the cgroup of the process (derived from /proc/self/cgroup), or from the root cgroup path if the PID == 1 (which indicates that the process is running in a container). It uses the cgroup stats to obtain the current usage.

automatic heapdump capture

A heapdump will be captured when the usage trespasses a configured threshold. Staying above the threshold won't trigger another heapdump. If the usage goes down, then back up, that is considered another "episode" to be captured in a heapdump. The behaviour is controlled by the Heapdump* global variables.

immune to panics

If a panic occurs in the watchdog, it will be swallowed and the watchdog will be disarmed.

v0.0.1

02 Dec 16:37
Compare
Choose a tag to compare

initial release