Link to home
Start Free TrialLog in
Avatar of addady
addady

asked on

Swap space

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
Avatar of comotai
comotai
Flag of Hong Kong image

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.
Avatar of addady
addady

ASKER

>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


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.
Avatar of addady

ASKER

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.

Avatar of addady

ASKER

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.

ASKER CERTIFIED SOLUTION
Avatar of comotai
comotai
Flag of Hong Kong image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I guess that means it worked out for you. :)
Avatar of addady

ASKER

I will try it soon

thanks