Forum OpenACS Development: File Storage Archive download locks up the server

Hi,

I've set my download an archive to use a zip command (see below) and it seems that whenever a user downloads an archive folder the zip process takes over my server and has a higher priority than all of the other processes. It basically has the effect on an end user of appearing that the site is offline.

Has anyone else come accross this sort of problem before or anyone got any ideas on how to resolve it? Would 'nice' be a method to go for? I'm not particularly hot on Red Hat Linux OS.

Archive command:
/usr/bin/zip -r {out_file} {in_file}

Thanks for any help, I know this isn't really OpenACS specific but I was hoping someone may lend me their expertise!

Collapse
Posted by Andrew Piskorski on
Matthew, that doesn't sound normal. Yes, using 'nice zip' may help (and you can certainly try it), but whether it helps or not probably depends on why the zip processes is slowing everything down.

What resource is the zip command using up? CPU, disk, memory? Does running a zip command manually at the command line have the same effect? Some tools to help you figure that out: dstat, iostat (part of the sysstat package in Debian/Ubuntu), top, vmstat, mpstat.

My wild guess is that your zip command is tying up your disk I/O rather than your cpu, as in my experience, that is more likely to cause obvious system-wide lag.

Collapse
Posted by Matthew Coupe on
Thanks for your reply Andrew,

The process will take up as much cpu as is available, looking at 'top' it can display 99.9% for long periods of time. the memory usage is 0%. Similarly when I run a zip command from the command line it will do the same thing. I am trying 'nice -n +19....' for my zip commands within file-storage and that seems to work ok.

We're using Red Hat at the moment and I will check for any updates to the zip programme as we may have an outdated one.

We've had problems with this for a while I think but only just got round to looking into it.