Skip to content

Repo indexer is a memory hog #4807

Closed
Closed
@mvrhov

Description

@mvrhov
  • Gitea version (or commit ref): 1.5.0
  • Git version: 2.18
  • Operating system: Ubuntu Xenial
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

Description

If one enables repo indexer to be able to search for a code the Gitea becomes a real memory hog.

This is the excerpt from the Dashboard with repo indexer on:
This of course goes on and on.. until the OS kills the app due to OOM

Server Uptime    6 minutes, 18 seconds
Current Goroutines    31
Current Memory Usage    1.4GB
Total Memory Allocated    23GB
Memory Obtained    1.8GB
Pointer Lookup Times    10848
Memory Allocations    184233578
Memory Frees    175630887
Current Heap Usage    1.4GB
Heap Memory Obtained    1.7GB
Heap Memory Idle    276MB
Heap Memory In Use    1.4GB
Heap Memory Released    0B
Heap Objects    8602691

The same but with repo indexer turned off:

Server Uptime    6 minutes, 20 seconds
Current Goroutines    26
Current Memory Usage    20MB
Total Memory Allocated    140MB
Memory Obtained    69MB
Pointer Lookup Times    822
Memory Allocations    482121
Memory Frees    298375
Current Heap Usage    20MB
Heap Memory Obtained    62MB
Heap Memory Idle    38MB
Heap Memory In Use    25MB
Heap Memory Released    0B
Heap Objects    183746

There is ~ 50 repos which totals approximately ~500MB in size

Metadata

Metadata

Assignees

No one assigned

    Labels

    issue/confirmedIssue has been reviewed and confirmed to be present or accepted to be implementedtype/enhancementAn improvement of existing functionality

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions