Skip to content

Excessive GC CPU pressure caused by unwanted heap memory #281

@nithu1991

Description

@nithu1991

Your environment.

  • Version: v0.1.37
  • Browser: no browser

What did you do?

payload := make([]byte, 2)

p.payload = append(payload, p.payload[:len(p.payload)-paddingLength]...)

cause excessive memory allocation, and add GC Pressure

Pprof heap shows

2561.99kB 22.72%  22.72%  510.99kB 4.53%  github.com/pion/interceptor/pkg/nack.(*packetManager).NewPacket

What did you expect?

A reduction in unwanted heap memory creation.

What happened?

Spike in CPU while GC

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions