Skip to content

Improve the insert performance in the server #75

@vaibhav-kaushal

Description

@vaibhav-kaushal

We are performing way too many allocations in the StartWritingLogs function in the server log writer file. We need to optimize that so that high bursts of incoming log traffic could be ingested. Things we can try:

  1. We can move the code in the BarkLogDao.InsertBatch function to the StartWritingLogs function - that should avoid the memory copy required for making the function call and the memory allocations happening inside the InsertBatch function.
  2. We can allocate a variable for large, medium and small batches. These should be arrays instead of slices so that the loop does not have to reallocate the slice on append.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions