Skip to content

--update-map-files whitelist/blacklist to prevent very large or unwanted maps from syncing #300

Open
@fatchan

Description

@fatchan

Hi, I recently encountered an issue related to the update-map-files option.

I have been using the update-map-files to keep several small (<1MB) map files synced to disk. This works well. However, I recently added a much larger map file of ~30MB to HAProxy. Now, the dataplaneapi memory, cpu and disk utilization increased significantly because it frequently tries to:

  1. read the entire map file
  2. check for any changes
  3. sort it
  4. write to disk

I don't even need or want this map file to be synced, and it is never changed during runtime. So this is a huge waste of resources for me.

I have "solved" the issue in my case by patching dataplaneapi with a simple if statement to exclude the name of the large map file and to not call Sync() on it. But obviously, this is very inconvenient, and not at all flexible.

To fix this in a better way, I propose an option to blacklist or whitelist map files.

Thoughts?

Kind regards.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions