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
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.
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.
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 .
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!
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?
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.
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!
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 :-)
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...
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)