Bug 477204 - RequestMemory = ImageSize has unit error
RequestMemory = ImageSize has unit error
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: grid (Show other bugs)
All Linux
medium Severity medium
: 1.1
: ---
Assigned To: Matthew Farrellee
Jeff Needle
Depends On:
  Show dependency treegraph
Reported: 2008-12-19 12:01 EST by Matthew Farrellee
Modified: 2009-02-04 11:05 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-02-04 11:05:59 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2009:0036 normal SHIPPED_LIVE Red Hat Enterprise MRG Grid 1.1 Release 2009-02-04 11:03:49 EST

  None (edit)
Description Matthew Farrellee 2008-12-19 12:01:02 EST
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 15:22:14 EST
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);
        } else {
-               buffer.sprintf("%s = %s", ATTR_REQUEST_MEMORY, ATTR_IMAGE_SIZE);
+               buffer.sprintf("%s = ceiling(%s/1024.0)", ATTR_REQUEST_MEMORY, A
Comment 4 errata-xmlrpc 2009-02-04 11:05:59 EST
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.


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