I am a regular user on a remote Debian installation (not an administrator). I run there a special-purpose network server which is used very extensively. The server produces daily logs which are quite large, and from time to time I need to pack them into a monthly tar-ball and, after some more time, compress them. First I tried this:
tar rf 2014-12.tar 2014-12-*.log
10 minutes later a customer called and told that the server had stopped responding. Indeed, the server process was "put aside", and all attention was given to the tar process, although the total CPU load, according to top, was only 5 percent. Then I tried:
nice -n19 tar rf 2014-12.tar 2014-12-*.log &
I sent the command to the background to be able to monitor the server process. I observed that the server process had slowed down, but not too much, so it was acceptable. It all worked for maybe 5 minutes, and then suddenly the server stalled again. I killed the tar process and saw the server immediately rush to work.
The server is listening on a TCP socket where many clients are connecting. When tar is running, the server continues to work, but after some time the select call seems to stop updating readable sockets.
All this is confusing. The server seems to be cut off after few minutes when something else is running, but otherwise it runs without problems for months. It also seems, according to top, that my processes never get more than about 5 percent of CPU total, why would that be? How can I pack the logs without disturbing my server process?
Aucun commentaire:
Enregistrer un commentaire