- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: memory fragmentation, does it exist?
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2003 10:53 PM
12-04-2003 10:53 PM
memory fragmentation, does it exist?
Does memory fragmentation make sence on HPUX11i?
I mean: is it possible that a process request, lets say, 1MB and there is not a 1MB contiguous region in memory, so the request fails?
I believe that the OS works with memory page (4kb pages) and it works only with pages, moving them as needed from swap to physical memory....
Am I wrong?
Does a memory region need to be a contiguous set of pages?
Thanks for your help!
Sundance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2003 11:02 PM
12-04-2003 11:02 PM
Re: memory fragmentation, does it exist?
As far as I remember, the OS allocates blocks of contiguous RAM in pages from a free list and if you request a GB and there isn't that much, it will fail. I might be wrong though. However, even if it is true, then the solution is so get your RAM in smaller chunks.
You might find the man page for malloc of interest because there is some fine tuning you can do.
"man 3C malloc"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2003 11:11 PM
12-04-2003 11:11 PM
Re: memory fragmentation, does it exist?
You might want to read up on memory management:
/usr/share/doc/mem_mgt.txt
Hope this will help,
Gideon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-08-2003 02:00 AM
12-08-2003 02:00 AM
Re: memory fragmentation, does it exist?
Other than that tidbit - I'll defer to the experts...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-08-2003 02:01 AM
12-08-2003 02:01 AM
Re: memory fragmentation, does it exist?
Other than that tidbit - I'll defer to the experts...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-08-2003 02:14 AM
12-08-2003 02:14 AM
Re: memory fragmentation, does it exist?
Memory fragmentation in general plays no role, because as you indicate the VM subsystem just gathers and scatters those 4kb pages.
However... an image can HINT to the VM subsystem to grab larger chuns and address those with few pointers. This will make memory management, and more importantly run time, more efficient. Some (oracle!) applications can gain back 10% CPU time with hints of 4MB pages. For those hints to be honoerd, you'd need coniguous pages.
Check out the pi and pd arguments for the chatr command!
hth,
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-08-2003 03:44 AM
12-08-2003 03:44 AM
Re: memory fragmentation, does it exist?
If I were to say that it can play no part in affecting perfirmance I would be lying.
Forced context switching seems to be horribly
high on a server within 100 MB of swapping.
We upgraded to Oracle 8.1.7 and the resulting memory pressure increased. We would be with 4k of swapping on a 16 way V2600. The box would crawl to a stop not to swap, we were faster when the box did swap.
So we added 8 GB ram. Now we fly again.
We may be a unique situation, but I believe you should avoid being close to swapping if you can...
I am using 8.5 GB ram nost often maxing at about 13 GB RAM used...
Tim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-08-2003 06:42 PM
12-08-2003 06:42 PM
Re: memory fragmentation, does it exist?
I didn't find the usr/share/doc/mem_mgt.txt on my system, but found a document in docs.hp.com
Our system is not swapping memory. We don't have performance issue either. But the used memory increase. We think of a memory leak in the application. The software provider says it is because of memory fragmentation...
Sundance (boy)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-08-2003 09:19 PM
12-08-2003 09:19 PM
Re: memory fragmentation, does it exist?
Here is Gideon's document...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-08-2003 11:18 PM
12-08-2003 11:18 PM
Re: memory fragmentation, does it exist?
, and check which process is stealing the memory, you have many ways:
- install (and pay) mwa, and trck down memory usage on a per process basis
- create (for free) a cron script that lists the memory for each proc with the command "
UNIX95= ps -e -o ruser,vsz,pid,args |sort -rnk2"
Examine the result, in any way you obtained it, and filnd the guilty!
HTH,
Massimo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-09-2003 12:58 AM
12-09-2003 12:58 AM
Re: memory fragmentation, does it exist?
You're right! We did the ps stuff and found out the process grow from 180MB to 250MB. And once we let them eat all swap until we were out of memory!
SO we know which process is growing. But we can tell why.
Could there be such thing as virtual memory fragmentation?
As Mark G said, if the program malloc/free inconsistant bloc (bigger and bigger blocs), we could have fragmentation. But does it impact swap/RAM usage? I'd say no, it is only in the virtual memory
Is there a way to check how much space there is in the data memory segment?
Or do tools like Glance report excactly what is being used?
Can we think about something like: memory pages are not used efficiently (only 3kB used in the 4 KB page) ?
I'm going to read the HP-UX Memory Management White Paper. I let you know if I understand anything better!!
Sundance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-09-2003 01:03 AM
12-09-2003 01:03 AM
Re: memory fragmentation, does it exist?
If you know the process, notify the Software House. Memory fragmentation should not be responsible, since each program request memory, but not the exact bucket.
It's the O.S. that is responsible for that.
Try to tarck down an entire session, using tusc, and see if for every malloc there is a mfree... or better, have the software support check it for you, since you have not the code.
I do not think that glance can descend in the memory, but it is installable for 60days for free, so a try won't hurt.
Massimo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-09-2003 01:13 AM
12-09-2003 01:13 AM
Re: memory fragmentation, does it exist?
Check if you have the latest patches using the word leak :)
Massimo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-09-2003 02:27 AM
12-09-2003 02:27 AM
Re: memory fragmentation, does it exist?
You are going to like me Sundance kid...
I'm going to say that you are right again.
This is very unlikely to be a Unix bug, swapping problem or any to that stuff. There is no indication that the system is not simply doing what it is told. There are multiple memeory managers. There is the VM/page manage in the os at a global level. But within each process there is the malloc/free (or alternatives) process local memory manager which requests large chunks of VM from the OS (check: man brk, man sbrk) and then parcels out smaller pieces.
> Could there be such thing as virtual memory fragmentation?
Yes. It is often called 'laddering'. It is often attempted to be solved through 'binary buddy' system. Here is a sample scenario:
malloc 5kb(1) temp, 5kb(2) temp, release 5kb(1), malloc 3kb(3) permanent. That 3Kb might fit the first 5kb hole leaving 2kb unused. Repeat often enough and you'll be inefficient, but it will not be deadly.
For it to become deadly it needs to be combined with an optimization algoritme in the process vm manager (like a size based look-aside list), and very unlucky allocation patterns. Notably where the application hangs on to small morcels of malloced data, with large holes between them.
Or... much more simple... the application 'forgets' about malloced data, never freeing it, but never re-using it either!
Time to go back to the software vendor or perhaps an inhouse applciation development group. They would then likely use tools like 'Electric Fence' to locate the problem.
(Google for : +malloc +leak +tool)
> But does it impact swap/RAM usage? I'd say no, it is only in the virtual memory
It is VM, but you touched it, dirtied it and thus the system is obliged to remember it! It does nto know you might not come back for it. And in fact you might be coming back for 10 bytes every 4kb. If you don't come back, it can just swap out and it will not hurt too much as long as you have swap space. But it may trigger ugly memory reclaim algoritmes and may the system in general.
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-09-2003 02:44 AM
12-09-2003 02:44 AM
Re: memory fragmentation, does it exist?
you can checkout the memory as already mentioned with mwa. what was omitted is you can have a 30 day trial for FREE checkout the download area.
John.