Memory Mapping segments from druid.segmentCache.locations


I have question on how Druid Historical process memory-maps segment files located on its disk. Say, if I have druid.server.maxSize to be 1TB and the total segment files located under my segmentCache location tunes out to be 300GB, and my available memory [Total memory minus Historical JVM heap & direct memory] is 35GB.

  1. Will the entire 35GB be used for memory mapping?

  2. Based on what, does Druid load/unload memory mapped files? In this case, which segment files totalling 35GB are memory mapped? And how are they chosen?