Jump to content
 English      
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
     Forums advanced search
HP.com Home
IT Resource Center Forums > HP-UX > system administration

How to limit the amount of used physical memory?

» 

IT Resource Center

» Login
» Register
» My profile
» Search knowledge base
» Forums
» Patch database
» Download drivers, software and firmware
» Warranty check
» Support Case Manager
» Software Update Manager
» Training and Education
» More maintenance and support options
» Online help
» Site map

Member icons
 
 HP moderator  HP moderator
 Expert in this area  Expert in this area
Member status
ITRC Pro ITRC Pro
250 points
ITRC Graduate ITRC Graduate
500 points
ITRC Wizard ITRC Wizard
1000 points
ITRC Royalty ITRC Royalty
2500 points
ITRC Pharaoh ITRC Pharaoh
7500 points
Olympian Olympian
20000 points
1-Star Olympian 1-Star Olympian
40000 points
2-Star Olympian 2-Star Olympian
80000 points
»  How to earn points
»  Support forums FAQs
Question status
Magical answer Magical answer
Message with a response that solved the author's question
Favorites status
Add to my favorites Add to my favorites
Delete from my favorites Delete from my favorites
This thread has been closed Thread closed
 

Content starts here
   Create a new message    Receive e-mail notification if a new reply is posted  Reply to this message
Author Subject: How to limit the amount of used physical memory?      Add to my favorites
Olivier ROBERT
Apr 11, 2003 17:23:12 GMT   

Dear forum readers,

We are running an application on an HP-UX 11.00 system, on which we need to run performance tests with different amounts of system memory. Of course, we can add and remove DIMMs as it comes necessary, but that is time-consuming. Eventually, I am pretty sure it is possible to do a far easier job adb'ing /stand/vmunix, and modifying some kernel parameter, or maybe at the ISL prompt, passing some parameter to "hpux". Hence , I put as many DIMMs as I may need, and then tell HP-UX to use only part of the available physical memory.

I'm pretty sure it is possible, but how?

Thanks for your help!

Olivier
Note: If you are the author of this question and wish to assign points to any of the answers, please login first.For more information on assigning points ,click here


Sort Answers By: Date or Points
Zafar A. Mohammed This member has accumulated 500 or more points
Apr 11, 2003 17:37:02 GMT  4 pts

Check this:
http://docs.hp.com/hpux/onlinedocs/939/KCParms/KCparams.OverviewAll.html

Thanks
Zafar
Pete Randall This member has accumulated 40000 or more points
Apr 11, 2003 17:38:31 GMT  5 pts

Olivier,

Here's someone who was trying to do just what you are (though there is no indication that he succeeded or not):

http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x1e4dba380869d71190080090279cd0f9,00.html


Pete
Jeff Schussele This member has accumulated 20000 or more points
Apr 11, 2003 17:40:08 GMT  5 pts

Hi Olivier,

I'm not sure if you can toggle DIMMs on/off like you can CPUs.
But you can use HP's PRM (Process Resource Manager) SW to limit how much memory any or all processes can utilize.

Here's a link to it:

http://www.software.hp.com/cgi-bin/swdepot_parser.cgi/cgi/displayProductInfo.pl?productNumber=B3835DA

Rgds,
Jeff
Olivier ROBERT
Apr 11, 2003 18:35:26 GMT    N/A: Question Author

Thanks for your replies!

Zafar: I checked that list, but nothing looks really suitable. I could try to simulate less memory by changing some parameters, but I fear the side effects!

Pete: Thanks, but that guy too is fearing side effects. That by itself would make the test results unreliable.

Jeff: I've had a look at the PDC settings, but didn't see anything about memory deactivation. PRM is good, except that I guess it does affect userland memory activity only.

Well, maybe it's more tricky or more secret than I thought it would be, but there must be a way to make the kernel work with only a specified amount of memory... Something like the Linux "mem=..." parameter.
CCIL Expert in this area
Apr 13, 2003 08:54:25 GMT  3 pts

Hello ! i guess you can try to change the kernel parameter dbc_max_pct , it points to amount of physical memory used for example if u set to 15 , then the system will use the 15 % of your physical memory for the caching .
Olivier ROBERT
Apr 14, 2003 20:28:19 GMT    N/A: Question Author

Thanks Sarvesh, but dbc_max_pct is the maximum percentage of physical memory the system MAY use for caching. And anyway, even if I can force the system into using all that memory for caching, it's not what I need. I need the system to act really as if there was only a given amount of physical memory. I suspect the side effects too much!

Regards,

Olivier
Geoff Wild This member has accumulated 20000 or more points
Apr 14, 2003 20:54:37 GMT  1 pts

Get HP's:
B3835BA C.01.06 HP Process Resource Manager

Costs money - but it is worth it.

Rgds...Geoff
Olivier ROBERT
Apr 15, 2003 16:34:46 GMT    N/A: Question Author

Thanks Geoff, but I don't think HP PRM is really what I need. I need to specify the whole amount of used memory, and not only its use in userland, i.e. by processes, IPCs, etc... or can the PRM do that?

Olivier
Geoff Wild This member has accumulated 20000 or more points
Apr 15, 2003 17:42:29 GMT  4 pts

You are right - it is limited to "managing resources by partitioning a system based on PRM groups. A PRM group is a collection of processes that is assigned system resources."

But, you could create your own group - which does absolutely nothing - and reserve say 1 GB of ram, 20% cpu, etc.

For more info check out:

http://h30081.www3.hp.com/products/prm/

Rgds...Geoff
Olivier ROBERT
Apr 15, 2003 18:49:42 GMT    N/A: Question Author

I doubt the system would not use some resources if they are free, especially if some kernel function asks for it. And even if it doesn't, I'm higly suspicious about the differences compared to a true DIMM removal... Anyway, I've had a look at the prices of PRM licenses, and my company wouldn't accept to pay that. They would prefer to pay me removing and putting the DIMMs back and forth... Ahem, maybe I should be paid more!

Regards,

Olivier
Bill Douglass This member has accumulated 1000 or more points
Apr 15, 2003 20:41:46 GMT  5 pts Attachement is 3357.txt 

The following short c code (run as root) should lock down a memory segment of 100MB, sleep for 60 seconds, then frees the memory and exit (you can adjust and recompile as needed.)

I'm an admin, mot a coder, so I'll leave enhancements as an exercise to the reader :-)
Olivier ROBERT
Apr 16, 2003 10:04:33 GMT    N/A: Question Author

Thanks Bill, that may come useful, but I can't use that for my tests. One process taking n megabytes of physical memory is not the same as removing an n megabytes DIMM. Maybe I'm asking for too much, but I would like to modify the kernel in such a way that a "dmesg | grep Physical" gives me a lesser (and specified) amount of physical memory than it really has. And of course I need more than just a simple display change, I need that all kernel structures work accordingly with that specified value.

That is easily done with Linux, and I'm almost certain there is an easy way to do that with HP-UX too, but it looks undocumented...

Regards,

Olivier
HP moderator Dietmar Konermann Expert in this area This member has accumulated 2500 or more points
Apr 16, 2003 15:25:02 GMT  10 pts

Olivier,

You could use the -M option when launching the kernel, e.g.

ISL> hpux -M 131072

This restricts physmem logically to 512 MB (131072 pages 4K each).

Best regards...
Dietmar.
Jeff Schussele This member has accumulated 20000 or more points
Apr 16, 2003 15:45:57 GMT  3 pts

Dietmar,

Is this another of these famous undocumented switches?
I see no mention of -M in the hpux man page.

Rgds,
Jeff
HP moderator Dietmar Konermann Expert in this area This member has accumulated 2500 or more points
Apr 16, 2003 16:23:59 GMT  8 pts

Jeff,

well... that's true. But in fact, that options are not really top secret. Just try this with your boot disk:

# lifcp /dev/rdsk/cXtYdZ:HPUX - | strings | grep ^-

However, undocumented options are not guaranteed to work. They may be even removed for future releases without notice.

Best regards...
Dietmar.
Olivier ROBERT
Apr 16, 2003 16:25:44 GMT    N/A: Question Author

Thanks Dietmar, that EXACTLY looks like what I am looking for!

Jeff, good question, eventually I've had a look at the "man hpux", in the hope I would find that before asking the forums. I guess there is some reason why this was not documented, maybe "-M" is still an alpha or beta option, hence unsupported... Are there any other interesting switches like that? We love unsupported features eventually... :o)

Regards,

Olivier
Olivier ROBERT
Apr 16, 2003 16:30:14 GMT    N/A: Question Author

Thanks again, very interesting answers indeed!

Regards,

Olivier
 
Create a new message    Receive e-mail notification if a new reply is posted   Reply to this message
 
 
Printable version
Privacy statement Using this site means you accept its terms
© 2010 Hewlett-Packard Development Company, L.P.