Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1202500 - PHP cart apc.shm_size discrepancies
PHP cart apc.shm_size discrepancies
Status: CLOSED ERRATA
Product: OpenShift Container Platform
Classification: Red Hat
Component: Image (Show other bugs)
2.2.0
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Jason DeTiberus
libra bugs
:
Depends On: 1193193
Blocks:
  Show dependency treegraph
 
Reported: 2015-03-16 14:42 EDT by Brenton Leanhardt
Modified: 2015-04-06 13:06 EDT (History)
10 users (show)

See Also:
Fixed In Version: openshift-origin-cartridge-php-1.31.4.1-1.el6op
Doc Type: Bug Fix
Doc Text:
For applications using the PHP cartridge, previously the apc.shm_size value was calculated incorrectly. Memory was being divided by 16 instead of by 8. This bug fix updates the PHP cartridge, and as a result the apc.shm_size value is now calculated correctly. After applying this update, a cartridge upgrade is required.
Story Points: ---
Clone Of: 1193193
Environment:
Last Closed: 2015-04-06 13:06:41 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
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-2015:0779 normal SHIPPED_LIVE Red Hat OpenShift Enterprise 2.2.5 bug fix and enhancement update 2015-04-06 17:05:45 EDT

  None (edit)
Description Brenton Leanhardt 2015-03-16 14:42:07 EDT
+++ This bug was initially created as a clone of Bug #1193193 +++

Description of problem:
The php cartridges on various gear sizes are showing anomalous apc.shm_size values. For example, a large php-5.4 gear should show apc.shm_size => 256M, but instead shows apc.shm_size => 32M.

Version-Release number of selected component (if applicable):
devenv_5432 (ami-a8c48ec0)

How reproducible:
Always

Steps to Reproduce:
1. Create php-5.3 and php-5.4 carts with small, medium, and large gear sizes:
rhc app create ptest1 php-5.3 -g small
rhc app create ptest2 php-5.4 -g small
rhc app create ptest3 php-5.3 -g medium
rhc app create ptest4 php-5.4 -g medium
rhc app create ptest5 php-5.3 -g large
rhc app create ptest6 php-5.4 -g large
2. In the gear of each of the above apps, run:
php -i |grep apc.shm_size

Actual results:
5.3 small = 64M
5.4 small = 64M
5.3 medium = 128M
5.4 medium = 128M
5.3 large = 256M
5.4 large = 256M

Expected results:
5.3 small = 64M
5.4 small = 32M (Discrepancy)
5.3 medium = 64M (Discrepancy)
5.4 medium = 32M (Discrepancy)
5.3 large = 64M (Discrepancy)
5.4 large = 32M (Discrepancy)

Additional info:

--- Additional comment from Chris Ryan on 2015-02-16 15:16:23 EST ---

Apologies, the actual and expected results should be reversed.

--- Additional comment from Ben Parees on 2015-02-16 15:29:25 EST ---

Like your fuse bug, this is based on the OPENSHIFT_GEAR_MEMORY_MB env variable...can you check yours and confirm it has the correct value for your gear size?

since you're using a devenv, i don't think those values actually get setup correctly.  try it in prod.

--- Additional comment from Chris Ryan on 2015-02-16 16:50:36 EST ---

These are the values I'm seeing in prod:

5.3 small = 64M
5.4 small = 32M (Discrepancy)
5.3 medium = 128M
5.4 medium = 64M (Discrepancy)
5.3 large = 256M
5.4 large = 128M (Discrepancy)

--- Additional comment from Ben Parees on 2015-02-16 16:53:09 EST ---

can you correlate the OPENSHIFT_GEAR_MEMORY_MB variable in those gears?

--- Additional comment from Chris Ryan on 2015-02-16 16:55:53 EST ---

For OPENSHIFT_GEAR_MEMORY_MB, in prod, I'm showing the following values: 

5.3 small = 512
5.4 small = 512
5.3 medium = 1024
5.4 medium = 1024
5.3 large = 2048
5.4 large = 2048

--- Additional comment from Ben Parees on 2015-02-16 17:18:49 EST ---

Maciej can you take a look?  Seems like this was fixed previously, there's a rich history here:
https://bugzilla.redhat.com/show_bug.cgi?id=1162950

--- Additional comment from Maciej Szulik on 2015-02-23 10:15:58 EST ---

For some reason we're dividing the memory by 16 and not by 8 for php 5.4. 
Fixed in https://github.com/openshift/origin-server/pull/6082

--- Additional comment from openshift-github-bot on 2015-02-24 10:38:36 EST ---

Commits pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/87757ac3abc5d85cde222a8dc84c6a798cee9f6a
Bug 1193193 - Fixed apc.shm_size values for php-5.4

https://github.com/openshift/origin-server/commit/48b59118a599bbf1c47482ea84f4a69c891d8894
Merge pull request #6082 from soltysh/bug1193193

Merged by openshift-bot

--- Additional comment from madeshuai on 2015-02-26 05:52:34 EST ---

Test on int evn,the result is:
php-5.3 small    apc.shm_size => 64M => 64M
php-5.4 small    apc.shm_size => 64M => 64M
php-5.3 medium   apc.shm_size => 128M => 128M
php-5.4 medium   apc.shm_size => 128M => 128M
php-5.3 large    apc.shm_size => 256M => 256M
php-5.4 large    apc.shm_size => 256M => 256M
Comment 3 Gaoyun Pei 2015-03-17 03:42:12 EDT
Verify this bug with openshift-origin-cartridge-php-1.31.4.2-1.el6op.noarch

Checked php-5.3 and php-5.4 cartridge, apc.shm_size was setting as 1/8 of OPENSHIFT_GEAR_MEMORY_MB.

With memory_limit_in_bytes=1073741824 setting in  /etc/openshift/resource_limits.conf, create a php cartridge.
[php1-123.ose22-manual.com.cn 123-php1-1]\> env|grep OPENSHIFT_GEAR_MEMORY_MB
OPENSHIFT_GEAR_MEMORY_MB=1024
[php1-123.ose22-manual.com.cn 123-php1-1]\> php -i |grep apc.shm_size
apc.shm_size => 128M => 128M
Comment 5 errata-xmlrpc 2015-04-06 13:06:41 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-0779.html

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