MapReduce Forum

Virtual Memory vs JVM heap space.

  • #51068
    Rupert Bailey

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

    1) java heap space
    allocated by or
    overridden by mapred.{map|red} 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} 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*
    o  0.25* < io.sort.mb < 0.5*

    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)


to create new topics or reply. | New User Registration

You must be to reply to this topic. | Create Account

Support from the Experts

A HDP Support Subscription connects you experts with deep experience running Apache Hadoop in production, at-scale on the most demanding workloads.

Enterprise Support »

Become HDP Certified

Real world training designed by the core architects of Hadoop. Scenario-based training courses are available in-classroom or online from anywhere in the world

Training »

Hortonworks Data Platform
The Hortonworks Data Platform is a 100% open source distribution of Apache Hadoop that is truly enterprise grade having been built, tested and hardened with enterprise rigor.
Get started with Sandbox
Hortonworks Sandbox is a self-contained virtual machine with Apache Hadoop pre-configured alongside a set of hands-on, step-by-step Hadoop tutorials.
Modern Data Architecture
Tackle the challenges of big data. Hadoop integrates with existing EDW, RDBMS and MPP systems to deliver lower cost, higher capacity infrastructure.