Operating System - OpenVMS
cancel
Showing results for 
Search instead for 
Did you mean: 

LINK/SECTION & INSTALL /RES - feature for ?

 
Ruslan R. Laishev
Super Advisor

LINK/SECTION & INSTALL /RES - feature for ?

Hello!

Is there someone who can provide a method of calculation of the GH SYSGEN's parameters for a simple progs like "Hello World!!!" or for arbitrary .EXE ?
9 REPLIES 9
x2084
Trusted Contributor

Re: LINK/SECTION & INSTALL /RES - feature for ?

You are talking Alpha, you are talking main image, or?

$ install add/share=addr sys$disk:[]hello
$ install list/res sys$disk:[]hello
=> look for Type Code, get the length, that's it.

Take into account that the GH region has slices, slice size is 0x2000.

Or are you asking why you get an %INSTALL-I-NONRES followed by an -INSTALL-E-NOGHREG?
Ruslan R. Laishev
Super Advisor

Re: LINK/SECTION & INSTALL /RES - feature for ?

"NSTALL-E-NOGHREG" - Yes.
Hoff
Honored Contributor

Re: LINK/SECTION & INSTALL /RES - feature for ?

I've not seen a granularity hints (GH) calculator tool around, but there's always the brute-force approach...

If you're working with sections arising from an installed image, install it and see how many 8KB pages it needs, and use this value to size how many (from 8 KB and potentially up to 4 GB) pages the section needs. You can then re-size the GH region for the next reboot, and off you go...

Here's some background (what little there is), and some of which you've probably already found...

http://h71000.www7.hp.com/wizard/wiz_1112.html
http://h71000.www7.hp.com/openvms/journal/v3/oracle_rdb.html
http://h71000.www7.hp.com/doc/82final/6676/6676pro_install.html#increase

If you're working with a run-time section, you probably already know the size of the section. Which makes the calculation easier.

Ruslan R. Laishev
Super Advisor

Re: LINK/SECTION & INSTALL /RES - feature for ?

So, is there a way by using some information from an image's header to get a estimated value of GH pages?
x2084
Trusted Contributor

Re: LINK/SECTION & INSTALL /RES - feature for ?

Did you try HELP/MESSAGE NOGHREG and checked GH_RES_CODE and GH_RSRVPGCNT?

You say LINK/SECTION which is a LINK/SECTION=CODE and you say INSTALL/RES which is a INSTALL ADD/RESIDENT=CODE. That is you need to determine the size of the code section[s] of your image[s]. ANALYZE/IMAGE shows this information.
Ruslan R. Laishev
Super Advisor

Re: LINK/SECTION & INSTALL /RES - feature for ?

"ANALYZE/IMAGE shows this information"


Please point me to piece of the ANA/IMA output.


Thanks!
x2084
Trusted Contributor

Re: LINK/SECTION & INSTALL /RES - feature for ?

Look for the image section descriptors and the EXE flag:

$ anal/image hello/inter
This is an OpenVMS Alpha image file

IMAGE HEADER
...

Image Section Descriptors (ISD)
...
2) image section descriptor (36 bytes)
=> byte count: 512
base virtual address: %X'00020000' (P0 space)
page fault cluster size: default
ISD flags:
(0) EISD$V_GBL 0
(1) EISD$V_CRF 0
(2) EISD$V_DZRO 0
(3) EISD$V_WRT 0
(4) EISD$V_INITALCODE 0
(5) EISD$V_BASED 0
(6) EISD$V_FIXUPVEC 0
(7) EISD$V_RESIDENT 0
(8) EISD$V_VECTOR 0
(9) EISD$V_PROTECT 0
(10) EISD$V_LASTCLU 1
=> (11) EISD$V_EXE 1
(12) EISD$V_NONSHRADR 0
section type: EISD$K_NORMAL
base VBN: 4

I clicked the [Retain format...] and just hope you can read it.
John Gillings
Honored Contributor

Re: LINK/SECTION & INSTALL /RES - feature for ?

Ruslan,

Hartmut has posted the ANALYZE/IMAGE output that gives you the size of one image section descriptor. Make sure you check them all and add in any with EISD$V_EXE set.

That said, I think it's a mistake to assume you can allocate the minimum amount for GH SYSGEN parameters. During development and debugging, I'd recommend at allocating least three times your expected usage to allow for fragmentation, code expansion while developing, and allow INSTALL/REPLACE (for various reasons you don't always deallocate the space before attempting to reinstall). Memory is cheap. Reboots to increase allocations are expensive.

Once your code is stable, you can determine the consumption directly from SHOW MEMORY/GH_REGIONS.

When determining ADD_GH_* MODPARAMS statements for a particular program, I'd still recommend adding some headroom.
A crucible of informative mistakes
Ruslan R. Laishev
Super Advisor

Re: LINK/SECTION & INSTALL /RES - feature for ?

Thanks to All!