Bug 477204 - RequestMemory = ImageSize has unit error
Summary: RequestMemory = ImageSize has unit error
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: grid
Version: 1.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: 1.1
: ---
Assignee: Matthew Farrellee
QA Contact: Jeff Needle
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-12-19 17:01 UTC by Matthew Farrellee
Modified: 2009-02-04 16:05 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-02-04 16:05:59 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2009:0036 0 normal SHIPPED_LIVE Red Hat Enterprise MRG Grid 1.1 Release 2009-02-04 16:03:49 UTC

Description Matthew Farrellee 2008-12-19 17:01:02 UTC
The units on ImageSize is KiB and RequestMemory is MiB.

The default for RequestMemory should be, if it even makes sense: ImageSize / 1024

ImageSize can easily be <<1024

Comment 1 Matthew Farrellee 2009-01-06 20:22:14 UTC
Resolved upstream, to be included as a patch in 7.2.0-2

commit 53ea7a2ce3643daba6db4aa67de5947a5e393281
Author: Matthew Farrellee <matt>
Date:   Tue Jan 6 13:58:37 2009 -0600

    Fixed default RequestMemory = ImageSize -> ceiling(ImageSize/1024.0)
    
    The RequestMemory units are MiB, it is compared directly to a slot's
    Memory attribute which is MiB. The ImageSize is in KiB. The old code
    was broken such that a 22KiB ImageSize would use up 22MiB on a
    slot. Not so bad, but if the ImageSize (calculate initially from
    executable size) were say 20MiB it would mean a request for 20GiB of
    slot Memory -> failure.

diff --git a/src/condor_submit.V6/submit.cpp b/src/condor_submit.V6/submit.cpp
index dadfb8b..51bbd4d 100644
--- a/src/condor_submit.V6/submit.cpp
+++ b/src/condor_submit.V6/submit.cpp
@@ -2114,7 +2114,7 @@ SetImageSize()
                buffer.sprintf("%s = %s", ATTR_REQUEST_MEMORY, tmp);
                free(tmp);
        } else {
-               buffer.sprintf("%s = %s", ATTR_REQUEST_MEMORY, ATTR_IMAGE_SIZE);
+               buffer.sprintf("%s = ceiling(%s/1024.0)", ATTR_REQUEST_MEMORY, A
        }
        InsertJobExpr(buffer);

Comment 4 errata-xmlrpc 2009-02-04 16:05:59 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2009-0036.html


Note You need to log in before you can comment on or make changes to this bug.