islanddancer
March 27th, 2009, 04:15 PM
Hi,
I have got another pretty old ubuntu dapper server running apache, postfix,
mailman, etc and there is a ruby script there for generating a download
statistics page for the website.
the hardware is old, it has a 1G
mem, 2G swap, 1x2.4G P4 cpu etc.
now the load averge for the server is always above 4, somtimes about 6 and the ruby script is a major culprit for the overload. It is a cron job that runs several hours a day. I know the ultimate solution is to modify the ruby script to make it less resource hungry. But since I know nothing about ruby and I need a short term solution soon to get the load down.
I thought of renicing the cron job script to lower priority when the job started. But I don't know if there are other better ways to do this.
Thank you very much for any pointers.
Zhang
I have got another pretty old ubuntu dapper server running apache, postfix,
mailman, etc and there is a ruby script there for generating a download
statistics page for the website.
the hardware is old, it has a 1G
mem, 2G swap, 1x2.4G P4 cpu etc.
now the load averge for the server is always above 4, somtimes about 6 and the ruby script is a major culprit for the overload. It is a cron job that runs several hours a day. I know the ultimate solution is to modify the ruby script to make it less resource hungry. But since I know nothing about ruby and I need a short term solution soon to get the load down.
I thought of renicing the cron job script to lower priority when the job started. But I don't know if there are other better ways to do this.
Thank you very much for any pointers.
Zhang