Solved

Swap space

Posted on 2001-06-12
8
486 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
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 

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
 

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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will explain how to establish a SSH connection to Ubuntu through the firewall and using a different port other then 22. I have set up a Ubuntu virtual machine in Virtualbox and I am running a Windows 7 workstation. From the Ubuntu vi…
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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…

774 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