Solved

Swap space

Posted on 2001-06-12
8
483 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
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 

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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

Suggested Solutions

1. Introduction As many people are interested in Linux but not as many are interested or knowledgeable (enough) to install Linux on their system, here is a safe way to try out Linux on your existing (Windows) system. The idea is that you insta…
The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

920 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

16 Experts available now in Live!

Get 1:1 Help Now