[prev in list] [next in list] [prev in thread] [next in thread] 

List:       helix-server-cvs
Subject:    [Server-cvs] engine/core/pub shregion.h,1.4,1.5
From:       dcollins () helixcommunity ! org
Date:       2010-02-28 16:38:59
Message-ID: 201002281639.o1SGd5R6027721 () mailer ! progressive-comp ! com
[Download RAW message or body]

Update of /cvsroot/server/engine/core/pub
In directory cvs01.internal.helixcommunity.org:/tmp/cvs-serv21387/pub

Modified Files:
	shregion.h 
Log Message:
Synopsis
========
Fix PR 258800: Need to set the memory default to more than 256MB on startup

Branches: SERVER_14_0_RN, SERVER_CURRENT_RN (HEAD)
Reviewer: Jamie


Description
===========

This adds a routine to try to pick the size of the shared memory segment
based on how much memory the system has.  This is used only if the user
did *not* specify a -m flag, instead of defaulting to 256MB.

Note that the OS may or may not decide to give us as much as we've
requested.  This size is just where we start requesting, working down
from there.

If the user specified a -m command-line flag, start with that (though
still detect and report the physical RAM anyhow.)

Otherwise, determine the size of physical RAM.  Use the smaller of this
or 2GB, multiplied by 0.8, as our initial request size.  The multiplier
is so that we don't request all memory.  We need to leave some room for
memory-mapped I/O blocks and other things outside the shared region.
The value of the multiplier is a historical best-guess, a rule-of-thumb,
opinions vary about it being 0.75 to 0.8, I think 0.8 is ok for a default.
If people care they can pick what they want and use -m.

One small change I made is that for DEBUG builds it will continue to
default to 256MB (or really, 320MB * 0.8 :-)  I don't know about you,
but debugging 2GB core files is not something I care to do more than
I really have to.  Normally 256MB will suffice for the majority of dev
work with debug builds.  Let me know if this is ok or not.


Files Affected
==============
server/engine/core/shregion.cpp
server/engine/core/pub/shregion.h


Testing Performed
=================

Unit Tests:
- N/A

Integration Tests:
- Ran the server with and without a -m flag on each platform.

Leak Tests:
- N/A

Performance Tests:
- N/A

Platforms Tested: linux-rhel4-i686, win32-i386-vc7, sunos-5.10-sparc-server
Build verified: linux-rhel4-i686, win32-i386-vc7, sunos-5.10-sparc-server


QA Hints
========
* Use -m for functional testing if you weren't already.


Index: shregion.h
===================================================================
RCS file: /cvsroot/server/engine/core/pub/shregion.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- shregion.h	10 Aug 2005 15:44:14 -0000	1.4
+++ shregion.h	28 Feb 2010 16:38:57 -0000	1.5
@@ -49,6 +49,7 @@
     BYTE*		region() { return m_region; }
     UINT32		GetFirstHeapSize() ;
     UINT32		GetSecondHeapSize() { return m_second_heap_size; }
+    UINT32              PickStartSize();
 #if defined _OSF1
     UINT64		size() { return m_size; }
 #else


_______________________________________________
Server-cvs mailing list
Server-cvs@helixcommunity.org
http://lists.helixcommunity.org/mailman/listinfo/server-cvs
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic