Skip to content

Bulk loader uses too much memory #3017

@codexnull

Description

@codexnull

The bulk loader's memory usage can grow beyond the size of physical RAM and cause swap space to be used. As the image below shows, memory usage grows monotonically during the map phase, is flat during the reduce phase, and is all finally released at exit.

image

The system does not appear to thrash, though, which suggests the memory is just being held by the process without it actively being accessed. Still, a big enough load may cause it to grow greater than RAM + swap and cause system instability or crashes.

Note the system was idle other than for dgraph. I did not test what would happen if concurrent processes had significant memory demands as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/bulk-loaderIssues related to bulk loading.area/performancePerformance related issues.investigateRequires further investigationkind/enhancementSomething could be better.status/acceptedWe accept to investigate/work on it.status/needs-attentionThis issue needs more eyes on it, more investigation might be required before accepting/rejecting it

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions