Skip to content

kolide_program_icons* performance issues #2490

@RebeccaMahany

Description

@RebeccaMahany

We've noticed that the kolide_program_icons table frequently uses a large amount of memory, and often CPU. Currently, for cpuprofiles in performance flares generated thus far by the v1.28.4 launcher release, 3 of the top 5 functions within launcher point to this area of the codebase:

github.com/kolide/launcher/pkg/osquery/table.generateUninstallerProgramIcons		found in 533 samples across 7078 cpuprofiles		5179 total seconds
github.com/kolide/launcher/pkg/osquery/table.parseIcoFile		found in 534 samples across 7078 cpuprofiles		6274 total seconds
github.com/kolide/launcher/pkg/osquery/table.generateProgramIconChecksums		found in 534 samples across 7078 cpuprofiles		6806 total seconds

We attempted to solve at least the memory usage issue in #2401 by adding the kolide_program_icon_checksums table -- however, switching to using the checksums table had no discernible effect.

Next, we can try confirming that the package we use for ico parsing is our best option. We currently use https://pkg.go.dev/github.com/mat/besticon/ico for our icon parsing. We should try benchmarking it against the following options:

Completing this issue may have the side effect of solving #2271 as well.

Metadata

Metadata

Assignees

Labels

performancePerformance improvements for the agent

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions