1834163 Members
2705 Online
110064 Solutions
New Discussion

swap space related issue

 
Reggie Chang
Frequent Advisor

swap space related issue

Hi there,

When I tried to compile a huge code (FORTRAN),
*.o file cannot not be generated. I think it is related
to the swap space. I'll provide the information here
and all kind of advice are welcome.

1. compile command and results
# f90 -c +O3 +U77 flutter.f
/home/reggie/zaero/fciAAAa01932.f
external subroutine FLUTER
external subroutine KMDRIV
external subroutine GMSENS
.
.
external subroutine RLEIGV
external subroutine FLTTRF

9437 Lines Compiled
Error 8203 : In procedure memory exhausted at 65532 Kbytes; try increasing swap space or the maxdsiz kernel parameter (8203)
f90: Errors detected.
#


2. memory display from command top (3 occasions during compilation)

Memory: 21240K (9260K) real, 22456K (11112K) virtual, 381540K free Page# 1/10


Memory: 60176K (48896K) real, 65640K (54708K) virtual, 337608K free Page# 1/10


Memory: 73296K (63252K) real, 78872K (71360K) virtual, 324400K free Page# 1/10
(near the appearance of error message of compilation)



3. display of command df and swapinfo
# df
/home (/dev/vg00/lvol4 ): 13924 blocks 3291 i-nodes
/opt (/dev/vg00/lvol5 ): 110282 blocks 38016 i-nodes
/tmp (/dev/vg00/lvol6 ): 54174 blocks 15192 i-nodes
/usr (/dev/vg00/lvol7 ): 71690 blocks 39532 i-nodes
/var (/dev/vg00/lvol8 ): 55232 blocks 69078 i-nodes
/work (/dev/vg00/work ): 26467396 blocks 2627174 i-nodes
/stand (/dev/vg00/lvol1 ): 59998 blocks 7659 i-nodes
/ (/dev/root ): 117086 blocks 12203 i-nodes

# swapinfo -tam
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 512 0 512 0% 0 - 1 /dev/vg00/lvol2
localfs 1146 0 1146 0% 2048 0 0 /work/paging
reserve - 50 -50
memory 382 39 343 10%
total 2040 89 1951 4% - 0 -
#

4. content of /etc/fstab
# cat /etc/fstab
/dev/vg00/lvol3 / hfs defaults 0 1
/dev/vg00/lvol1 /stand hfs defaults 0 1
/dev/vg00/lvol4 /home hfs defaults 0 2
/dev/vg00/lvol5 /opt hfs defaults 0 2
/dev/vg00/lvol6 /tmp hfs defaults 0 2
/dev/vg00/lvol7 /usr hfs defaults 0 2
/dev/vg00/lvol8 /var hfs defaults 0 2
/dev/vg00/work /work hfs rw,suid 0 2
/dev/vg00/lvol2 ... swap pri=1 0 2
/dev/vg00/work /work swapfs min=65536,lim=262144,pri=0 0 2



Is there anything that I can (should) do?

Thank you.

Reggie
5 REPLIES 5
James R. Ferguson
Acclaimed Contributor

Re: swap space related issue

Hi Reggie:

Based on your swapinfo output, it appears that the culprit is the kernel 'maxdsiz' parameter.

'maxdsiz' and 'maxdsiz_64bit' define the maximum size of the static data storage segment of an executing process for 32-bit and 64-bit processors, respectively. This includes fixed data storage such as globals, arrays, statics, locals to main(), strings, space allocated using sbrk() and malloc(), etc.

Invoke SAM's Kernel Configuration menus and increase this fence limit. You will be able to see your current values and adjust them upwards. This will require a reboot, but should solve your problem.

Regards!

...JRF...
Reggie Chang
Frequent Advisor

Re: swap space related issue

James,

Thank you for the input.

I did try to modify maxdsiz from SAM. Unfortunately, SAM on my machine does not function properly. As a matter of fact, I have another posted message posted
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xb0caa2db8513d6118ff40090279cd0f9,00.html
for my SAM problem. You're certainly welcome to check it out.

I just wonder if there is another way to let me pass the compilation by increasing swap space without touching SAM.
(Yes, I would like to fix SAM as well.)

Thank you again.

Reggie
Steven Sim Kok Leong
Honored Contributor

Re: swap space related issue

Hi,

It is likely your maxdsiz (and maxdsiz_64bit) kernel parameter issue since your compilation gets exhausted at 64 MB which is the usual default value for maxdsiz.

SAM problem aside, you can use the command line to regenerate the kernel.

1) Prepare your /stand/build/system:

# cd /stand/build
# system_prep -v -s system

2) Edit the /stand/build/system file to perform your task or use kmsystem and kmtune ie.

# kmtune -s maxdsiz=your_new_value
# kmtune -s maxdsiz_64bit=your_new_value

3) Build the new kernel:

# mk_kernel -s system

4) Move the old system file and kernel so if anything goes wrong, you still have a bootable kernel:

# mv /stand/system /stand/system.prev
# cp /stand/vmunix /stand/vmunix.20020202

5) Update the kernel with the newly generated kernel. Automatically saves the old versions of vmunix and dlkm in /stand:

# kmupdate /stand/build/vmunix_test

6) Reboot the system.

# shutdown -ry 0

Hope this helps. Regards.

Steven Sim Kok Leong
Reggie Chang
Frequent Advisor

Re: swap space related issue

Thank you all for the responses.

Steven, I tried to follow the steps suggested
by you. Not much success.

I cannot find kmtune command on our machine.
mk_kernel -s system resulted in error message.

default_disk_ir 1
maxswapchunks 513
nstrpty 60
maxdsiz 100000000
~
~
"system" 69 lines, 496 characters
# mk_kernel -s system
Compiling conf.c...
(Bundled) cc: internal panic 7827: Invalid architecture version. (7827)
*** Error exit code 1

Stop.
config: make did an exit(1)
#

# find / -name kmtune -print
# (nothing from find command)

To be honest, we don't have a real system
administrator here. Since we don't have
important stuff on the machine yet, would
it be easier to reinstall the OS (10.20)
to have SAM and maxdsiz resolve?

Best regards,

Reggie
Reggie Chang
Frequent Advisor

Re: swap space related issue

I decided to re-install 10.20 yesterday. Everything works fine now.

Thank you all.