gc

package
v1.4.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 21, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(ctx context.Context, cfg config.Config)

Run periodically forces Go's garbage collector and tries to return freed pages back to the OS. ---------------------------------------------- Why is this needed?

This service is a high-load in-memory cache. Once the cache reaches its target size (e.g., 10-20 million keys), the heap stabilizes at a large size — for example, 18 GB. By default, Go's GC will only run a full collection if the heap grows by GOGC% (default 100%). This means the next GC cycle could be delayed until the heap doubles again (e.g., 36 GB).

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL