Operating System - Tru64 Unix
1755646 Members
2914 Online
108837 Solutions
New Discussion юеВ

Memory Error on Tru64

 
Hein van den Heuvel
Honored Contributor

Re: Memory Error on Tru64

Sure. Turn that knob. With sysconfig + reboot first to raise to a new max, than ulimit to set the user process to that new max.

Personally I would prefer to 'see' the old setting/problem first with ps -o vss,rss but I appreciate that may be hard if a program exits upon failure. You can also just turn the know and hope for the best, then run ps -o afterwards while it works.

Hein.
Paul Lozancich
Occasional Advisor

Re: Memory Error on Tru64

SysAdmin upped per_proc_address_space to 8G.
Rebooted and we re-ran with no luck.

Tried twice with ulimit -d and -v both set to 10G and then 8G.

Should we be changing another kernel param?

Another ulimit setting? -m?

Previous realloc() comment has me thinking if that is doubling memory usage do to shuffling of old and new pages.

Will examine memory some more during next tests. SysAdmin had said that only 7.5 of 12G of RAM was being used.

Programmer felt that only 2.5 G had been allocated for linked lists. Even doubled for overhead that would be just 5G. Host has 12G RAM/51G swap. Can't see why it would run out. Also, it ran out at same amount of data where it did on Dev server with per_proc_address_space set to 4G.

Hein van den Heuvel
Honored Contributor

Re: Memory Error on Tru64

Somehow I though you would have changed data and address limits. re-reading I think you only addressed the address limit.
Check the data limit?
Sorry for not pointing that out immmediately.

per_proc_data_size = 4294967296
max_per_proc_data_size = 8589934592

Paul Lozancich
Occasional Advisor

Re: Memory Error on Tru64

Here's what caused it - realloc().

Turns out those that mentioned realloc were correct. It leaves holes in memory. A tech from HP did a test and found out that if you do the following:
ptr = realloc(1K);
ptr = realloc(2K);
ptr = realloc(4K);
ptr = realloc(8K);
You might think you were only using 8K of RAM. No instead you will of used 23K - the 8K you want plus 15K of holes in RAM that don't get reused by the OS.

He advised our library programmer to change how he was allocating memory. He did and we have been running in production successfully since.

Thanks to every one for your timely advice!
Paul Lozancich
Occasional Advisor

Re: Memory Error on Tru64

See previous entry.