Skip to content

naiveBuildDirectory / (*localDirectory).Link performance problems #228

Description

@Links2004

Hi,

our bb-worker currently spends more time handling the files inputs then executing any actions.
example:

Image

all the input file are already in the local cache, but the Linking seams to take for ever.
after some debugging using pprof we noticed that most of the time spend is spent within the garbage collection:

Image

looks like that the linking of files creates a lot of objects, on example I found is here:
https://github.com/buildbarn/bb-storage/blob/3991d6ebefb4cfc7c1956caaba5a28d1b2eca927/pkg/filesystem/local_directory_unix.go#L401

is there anything we can do to optimize the Linking / GetFile code path to not use that many objects and as a result get faster?

we tried to increase the inputDownloadConcurrency but this is basically only result in more and longer garbage collection runs.
setting GOGC=off did only delay the problem until the memory is full, so it look like some code need optimizing to reduce copies and object creation.

Markus Sattler, Mercedes-Benz Tech Innovation GmbH

Provider Information

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions