Solved

Swap space

Posted on 2001-06-12
8
477 Views
Last Modified: 2013-12-06
I use zip (Zip 2.3 ) utility on my Linux (red hat v6), to compress lot of files.
It consume lot of memory and the swap space useage grow.
The problem is that when the zip finish the swap space don't get free.
If I run it lot of time the computer hang due to insufficient memory.

How can I solve it ?

Rami
0
Comment
Question by:addady
  • 4
  • 4
8 Comments
 
LVL 3

Expert Comment

by:comotai
ID: 6180523
Generally, it will look like your swap space is not freeing, but actually the space is just cached memory that it might use again later.

How much space space do you have allocated and how much physical memory do you have?

You might need to add some more swap space if you don't have enough physical memory and you run too many processes that take up too much memory.

It is also possible that some application that you are running has a memory leak and this is causing your memory to be used to it's capasity.

Let me know and good luck.
0
 

Author Comment

by:addady
ID: 6180704
>How much space space do you have allocated and how much >physical memory do you have?

mem 128
swap 256

>It is also possible that some application that you are >running has a memory leak and this is causing
>your memory to be used to it's capasity.

The application is zip.  But it exit after few minuts.
I run it in a raw, when one zip finish the other start


0
 
LVL 3

Expert Comment

by:comotai
ID: 6182119
next time it starts to go up, use ps -aux to check what the memory usage of each program is and see which one is taking the most memory, you might also try using 'top' to keep an eye on your system as you are working. When you find out which program it is donig it, then you probably need to update it, download the source code and recompile it and install it again. That should probably fix any memory leak problems. If that doesn't fix it, it could be in your libc or zlib .. or even a bad kernel somehow (though I think unlikely) .. It's going to take a little troubleshooting on your side.
0
 

Author Comment

by:addady
ID: 6184631
I'm using top and i know it the zip !
the point is when the 1st zip finish the swap space usege don't change. Them new (2nd) zip starting and so on.
until there is no free swap space.
My cron jon running abut 20 zip in a raw.

0
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

Author Comment

by:addady
ID: 6184828
I'm using top and i know it the zip !
the point is when the 1st zip finish the swap space usege don't change. Them new (2nd) zip starting and so on.
until there is no free swap space.
My cron jon running abut 20 zip in a raw.

0
 
LVL 3

Accepted Solution

by:
comotai earned 50 total points
ID: 6184841
Get the course code to zip at;

ftp://ftp.uu.net/pub/archiving/zip/src/zip23.tar.gz

cd /usr/src
tar xzvf ~yourlogin/zip23.tar.gz
cd zip-2.3
make -f unix/Makefile generic
make -f unix/Makefile install

You might want to move your old zip binaries to a backup place .. e.g.

mkdir ~/oldzip
mv /usr/bin/zipsplit /usr/bin/zipnote /usr/bin/zipcloak /usr/bin/zip ~/oldzip

Then try it and see if it still happens, if it does, then we need to do;

ldd /usr/bin/zip

See the libraries that it uses and then check them one by one until we find the culprit. However, I think just recompiling the zip utility should do the trick.

Good luck!
0
 
LVL 3

Expert Comment

by:comotai
ID: 6185173
I guess that means it worked out for you. :)
0
 

Author Comment

by:addady
ID: 6185251
I will try it soon

thanks
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

After running Ubuntu some time, you will be asked to download updates for fixing bugs and security updates. All the packages you download replace the previous ones, except for the kernel, also called "linux-image". This is due to the fact that w…
Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now