Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Support
    • Submit feedback
  • Sign in / Register
GHC
GHC
  • Project
    • Project
    • Details
    • Activity
    • Releases
    • Cycle Analytics
    • Insights
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
    • Locked Files
  • Issues 3,631
    • Issues 3,631
    • List
    • Boards
    • Labels
    • Milestones
  • Merge Requests 203
    • Merge Requests 203
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Security & Compliance
    • Security & Compliance
    • Dependency List
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Glasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #17134

Closed
Open
Opened Aug 29, 2019 by Andrew Martin@andrewthad
  • Report abuse
  • New issue
Report abuse New issue

MADV_HUGEPAGE on nursery

Motivation

An application compiled by GHC will use the nursery frequently. Not only that, it will touch almost every address in the nursery, and it should never be swapped out to disk. Consequently, it is an excellent candidate for hugepages. This is true whether the nursery is the tiny default 1MB or the 128MB monster that people use when trying to get better performance on many-core hosts.

Proposal

Add an RTS flag --nursery-advise-hugepage. This flag, when set, would cause the runtime to advise operating systems that support transparent hugepages that the nursery is a good candidate:

madvise(nursery_ptr, nursery_size, MADV_HUGEPAGE);

I'd like to try this out when I have some time, but I wanted to write this down here in case I forget about it. I suspect that the benchmarks likely to benefit from this would be things with larger nurseries (that don't fit in cache). It also would have to be something that runs for a while. I don't know how long the kernel takes to decide to use hugepages.

Related issues

  • Discussion
  • Designs
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
1
Labels
feature request
Assign labels
  • View project labels
Reference: ghc/ghc#17134