Home Forums MapReduce Virtual Memory vs JVM heap space.

This topic contains 0 replies, has 1 voice, and was last updated by  Rupert Bailey 8 months, 3 weeks ago.

  • Creator
  • #51068

    Rupert Bailey

    Given the computation of a {map|reduce} process is done my a JVM allocated:

    1) java heap space
    allocated by mapred.child.java.opts or
    overridden by mapred.{map|red}.child.java.opts to have control process by type.
    denoted by minimum heap: -XmsNUMBER maximum heap: -XmxNUMBER
    2) virtual memory
    limited by mapred.child.ulimit or
    overridden by mapred.{map|reduce}.child.java.opts to have control process by type.
    this is a per process limit specified in kilobytes.

    Recommended to be allocated in the following proportions:
    mapred.child.ulimit > 2*mapred.child.java.opts
    o  0.25*mapred.child.java.opts < io.sort.mb < 0.5*mapred.child.java.opts

    Given the Job, it’s tasks and the task’s slots are based on allocated virtual memory:
    3) Task resources are based on an allotment of virtual memory by way of mapred.job.{map|reduce}.memory.mb
    4) Tasks are allocated slots which are themselves determined by allocated virtual memory mapred.cluster.{map|reduce}.memory.mb
    5) Jobs can allocate a number of slots to a task up to a limit of mapred.cluster.max.{map|reduce}.memory.mb

    I am not confident that I understand why you would have the values of 2,3,4,5 be different to each other, for example:
    In a reduce phase, if there were four 4 reduce tasks, I’d naturally want 4 reduce slots, and I’d assume I’d want those the size of my planned tasks allocation also – when would I want *more* than a task:slot ratio of 1:1? (excluding speculative execution to duplicate a task function say, on another node)
    – why do tasks and slots work on virtual memory, which includes disk space, when surely the RAM allocation for heap would be more determinant on task performance
    – how should consider my virtual memory vs my java heap when reviewing a job’s map and reduce phases and hence the disk space required vs physical memory required to nourish the JVM’s heap requirements (noting spil file size io.sort.mb should be about half the JVM’s heap)

    Thanks! (ps I am using HDP 1.3.2 but I think some of this might still apply to HDP 2.x using Yarn)


You must be logged in to reply to this topic.