Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
and it is working correctly if I start the script manually , if I set a script in crontab the zabbix allert sends me more notifications about "many processes" or "Process load is too high"
I reduce the zabbix allert using pigz and no gzip but the monitorig sends always some allert.
How can I solve this problem?
Another question, if I start the script manually the task completes in 30 minutes instead the scheduled task lasts more than 6 hours with pigz and 6 hours with the gzip.
AFAIK, piping is inherently a sequential procedure. So trying to use that with pigz which tries to process data in parallel, might not really accomplish very much. If you have the space available, I would tend to think you might want to use pigz once the entire dump file is produced.
Also, there are different compression algorithms, and depending on the details of the algorithm, there can also potentially be different ways in which a particular compression algorithm can be applied. For example, to a small amount of data, or to an entire large file at once. I wasn't certain, but I did some quick testing, and it seems that using gzip on an entire file, rather than applying it to data coming through a pipe, it tends to take less time when run on an entire file, at least in the environment I'm using.
I also have to wonder if the particular way in which you're trying to combine nice and ionice is actually accomplishing what you want. Along with that, is there any difference between the load on the database, apart from the dump procedure, at the time when you run the script manually, versus the time it is run by cron? To the extent possible, you might want to make sure that the cron job runs in a period during which there is typically the lowest load on the database engine.
Then too, depending on what you are relying, there can be differences in the context in which something is run by cron, versus the way it is run from a command line. You have to take care to make sure that any factors that the script you're running relies on in the interactive shell environment, are provided in some form, for use with a cron job.
Hi rigor,
thanks for the reply, i am using nice and ionice to reduce the load over the server and limit the allert from zabbix, i try to split the script in 2 step as you suggested.
first step dump the DB and second step compress the dump with gizp
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.