kernel values related to mmap


 
Thread Tools Search this Thread
Top Forums Programming kernel values related to mmap
# 1  
Old 07-18-2007
kernel values related to mmap

Hi there...

I am maitaining an archaic application which is using mmap for file transfering/routing. There are over 500 instances of the application running without any issues for almost 2 decade. Now, the problem is that the on one particular server (HP-UX 11), sometimes the mmap is failing when processing big files (size of just 8 MB). The error message I am getting is ENOMEM which corresponds to the fact that there is no sufficient memory for the mmap. But the application support folks says there is enough memory in the server and they tuned kernel maxdsiz, maxssiz but still the problem happens occassionally. Could you please let me know what other kernel values or any other things need to tuned to avoid this situation. Also, any other possible solutions are welcome.

Thanks,
Tobsinte
# 2  
Old 07-18-2007
A place to start would be the HP-UX mmap man page It has a very different description of the meaning of ENOMEM than the one you mention. In fact it says the meaning depends on the setting of MAP_FIXED and you didn't mention whether or not that is set.

Also you should check for OS patches that might affect mmap.
# 3  
Old 07-19-2007
Thanks a lot for the information.

I've checked mmap man pages for more information. MAP_FIXED is not set from the program instead the "flags" argument carries a value MAP_SHARED. But I still couldn't figure out what exactly causes the mmap to return ENOMEM. What else can I possibly check for?

Also since I am not from the IT operations team (who maintains the HP-UX servers) I dont have access to check for the patches since they are the one's who install patches etc. But is there any specific things (like some specific patches info) I can check with operation team to check for me. (else they will keep asking me what to check!)
# 4  
Old 07-19-2007
If you don't have access to the server, it is not obvious how you might with the problem. Smilie You (or someone) will need a service contract to obtain patches, so I would advise using that contract to open a call with HP and ask them to suggest patches for your version of HP-UX that might help with a mmap problem.

Anyway, the man page says " [ENOMEM] ... Or, MAP_FIXED was not specified and there is insufficient room in the address space to effect the mapping." So if it's not an OS problem, it is probably a memory leak. Maybe you could add some code to induce a core dump when mmap returns ENOMEM, then examine the core dump to see where the virtual addresses went. (But if you can't access the server, I do not know you might examine a core dump.)
# 5  
Old 07-20-2007
thanks a lot for your suggestion.

I have requested for the list of patches applied to this particular server and later would compare it with the servers which dont have any issue (any mmap related patches were missed or not). I am 100% sure there is not any memory leak as these product is running fine on over 500+ servers around the world for almost 2 decade. There is something wrong on this particular server.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How do I list kernel module parameter values?

Hi, I have problem with parameter configuration. My question is after the configuration, how to check if successfully change the value or not? I saw someone has the same question, and followed his steps. Original thread:... (3 Replies)
Discussion started by: skybb
3 Replies

2. Shell Programming and Scripting

need downloading related help...but its not related to unix

Hi All, I am trying to dowmload the zip file "zkManageCustomers.zip " but i dont have access. Can anyone help me to download this file See the below link- http://www.ibm.com/developerworks/opensource/library/wa-aj-open/index.html?ca=drs- Please help me as early as... (1 Reply)
Discussion started by: aish11
1 Replies

3. Emergency UNIX and Linux Support

mmap

I want to know whether this is possile or ever been tried out. I want to obtain a chuck of memory using mmap() I do it so : n = mmap(0, 8000, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0); And hold on to that memory, when a process requests for memory, some memory is... (2 Replies)
Discussion started by: xerox
2 Replies

4. Shell Programming and Scripting

Help related to Script to move files depending on config values

Hi All, I am new to Unix scripting, I have requirement where I need to read the key value pair from config file. Sample Config file: Key(File Pattern) Value(File Directory location) test /Users/Bkumar/Downloads/testdir prod ... (1 Reply)
Discussion started by: sbpkumar7
1 Replies

5. UNIX for Dummies Questions & Answers

mmap()

how to use mmap() to map a file to memory space. Do you have any simple program???? Because I have to implement lot of concepts into it. (3 Replies)
Discussion started by: gokult
3 Replies

6. Solaris

check the utilization of kernel values ?

Any native Solaris commands/scripts to check the utilization of kernel tables/limits in Solaris ? (like equivalent command in HPUX is kcusage) (2 Replies)
Discussion started by: thamurali
2 Replies

7. Solaris

Which file is read by kernel to set its default system kernel parameters values?

Hi gurus Could anybody tell me which file is read by kernel to set its default system kernal parameters values in solaris. Here I am not taking about /etc/system file which is used to load kernal modules or to change any default system kernal parameter value Is it /dev/kmem file or something... (1 Reply)
Discussion started by: girish.batra
1 Replies

8. Shell Programming and Scripting

Remove matched values and their related groups

For each value in file1 it has to check in file2 and file3. If value matched it has to delete that value and related group value in file2 and file3. In this example it takes A , deletes A and take related group value 1 and deletes E-1,then checks in file3 and deletes K-1.After that it takes D... (7 Replies)
Discussion started by: kanagaraj
7 Replies

9. UNIX for Dummies Questions & Answers

kernel parameter values

Hi All Need to find kernel parameter values of our UNIX box. /filesys1/tmp>uname -a HP-UX hps1_dc B.11.11 U 9000/800 1681349356 unlimited-user license /filesys1/CDBLprodrun/tmp> Can anyone help me with the cmd to find kernel parameter values? Thanks in advance. (1 Reply)
Discussion started by: mhbd
1 Replies

10. UNIX for Dummies Questions & Answers

Changing Values in the Kernel

I'm getting fork failed errors. I was told I needed to upgrade my swap space but also need to change some values for some parameters in the kernel and add 2 new parameters. I not sure of the correct way of doing this. Thanks in Advance (4 Replies)
Discussion started by: dman110168
4 Replies
Login or Register to Ask a Question