proposal for a poor mans batch processing system :)
Hello, here is my idea of how to reduce the problem of different IO-bound processing applications blocking each other. While there are no traditional batch processing systems for Linux (which came as a bit of a surpise to me) there is the batch(1) command which should help us to prevent jobs from getting started while others are still running. So here is how I think it could work. * Do not run your scripts directly using cron/incron * Instead use a script which installs a batch job which will run your job as soon as the System load is below 5[1] * Inside you cron/incron script check if your old batch job is still pending. If so, do nothing, just terminate[2] * directly run batch processing applications from cron/incron are prohibited by admin policy in future and can be killed without warning instead the proposed script should be used by anybody. What do you think? Sven [1] 5 is an estimate which might be tuned a little bit higher or lower. [2] If this happens too often we need to reduce the processing frequency or get a couple of additional machines :) -- Das allgemeine Persönlichkeitsrecht (Art. 2 Abs.1 i.V.m. Art.1 Abs. 1GG) umfasst das Grundrecht auf Gewährleistung der Vertraulichkeit und Integrität informationstechnischer Systeme. (BVerfG, 1BvR 370/07) /me is giggls@ircnet, http://sven.gegg.us/ on the Web
On Tue, 27 Apr 2010, Sven Geggus wrote:
What do you think?
In principle fine, but e.g. TagWatch cannot start at daytime or I get problems with WIKI admins and get blocked by them. I'm forced to start near midnight. Ciao -- http://www.dstoecker.eu/ (PGP key available)
Dirk Stöcker <fossgis@dstoecker.de> wrote:
In principle fine, but e.g. TagWatch cannot start at daytime or I get problems with WIKI admins and get blocked by them. I'm forced to start near midnight.
AIO Build process will usually run at daytime (morning+early afternoon) so this won't be a problem. We would thus need a special wrapper script for you preventing the process from running daytime. Sven -- "If you continue running Windows, your system may become unstable." (Windows 95 BSOD) /me is giggls@ircnet, http://sven.gegg.us/ on the Web
On Tue, Apr 27, 2010 at 10:27:31AM +0200, Dirk Stöcker wrote:
On Tue, 27 Apr 2010, Sven Geggus wrote:
What do you think?
In principle fine, but e.g. TagWatch cannot start at daytime or I get problems with WIKI admins and get blocked by them. I'm forced to start near midnight.
I guess that the part of your script where you work with the wiki will not really create much load on the machine because most of the time it will wait for the wiki to return some answers. Maybe you can factor out this part of the script into an extra script that will run at night and the rest of the stuff can than read the output from the nightly script plus do all the heavy lifting. Jochen -- Jochen Topf jochen@remote.org http://www.remote.org/jochen/ +49-721-388298
On 04/27/2010 09:11 AM, Sven Geggus wrote:
Hello,
here is my idea of how to reduce the problem of different IO-bound processing applications blocking each other.
While there are no traditional batch processing systems for Linux (which came as a bit of a surpise to me)
I do wonder a bit why you are still claiming this after I have pointed out twice the existence of Sun Grid Engine and Torque/PBS, both quite capable OpenSource batch processing systems that have packages in Ubuntu. There are presumably more too (GNUbatch sounds like another one). They might turn out to be an overkill for the situation on Gauss, or not worth the admin effort, but they do exist. And getting a basic version up and running doesn't seem that difficult to experiment with either. there is the batch(1) command which should
help us to prevent jobs from getting started while others are still running.
So here is how I think it could work.
* Do not run your scripts directly using cron/incron * Instead use a script which installs a batch job which will run your job as soon as the System load is below 5[1] * Inside you cron/incron script check if your old batch job is still pending. If so, do nothing, just terminate[2] * directly run batch processing applications from cron/incron are prohibited by admin policy in future and can be killed without warning instead the proposed script should be used by anybody.
What do you think?
Sven
[1] 5 is an estimate which might be tuned a little bit higher or lower. [2] If this happens too often we need to reduce the processing frequency or get a couple of additional machines :)
Kai Krueger <kakrueger@gmail.com> wrote:
I do wonder a bit why you are still claiming this after I have pointed out twice the existence of Sun Grid Engine and Torque/PBS, both quite capable OpenSource batch processing systems that have packages in Ubuntu.
I don't have the time to learn such a system in particular because these systems seem to be designed with distributed computing in mind which seems to be overkill to manage limited resources on a singel machine. I wrote "there are no traditional batch processing systems for Linux" and I think this is true as far as I can tell. Also a few old handed Unix people confirmed this. But anyway, you are welcome to help out with the Installation!
There are presumably more too (GNUbatch sounds like another one). They might turn out to be an overkill for the situation on Gauss
This is exactly what I thought. Sven -- "Thinking of using NT for your critical apps? Isn't there enough suffering in the world?" (Advertisement of Sun Microsystems in Wall Street Journal) /me is giggls@ircnet, http://sven.gegg.us/ on the Web
Sven Geggus wrote:
* Instead use a script which installs a batch job which will run your job as soon as the System load is below 5[1]
I am not sure what would happen if there are multiple pending jobs from different users and the load goes below 5. Wouldn't all pending jobs be started in that moment? The only information I found in the manpage was this: At and batch as presently implemented are not suitable when users are competing for resources. If this is the case for your site, you might want to consider another batch system, such as nqs. Mitja
Mitja Kleider <mitja@kleider.name> wrote:
I am not sure what would happen if there are multiple pending jobs from different users and the load goes below 5. Wouldn't all pending jobs be started in that moment?
I'm afraid that exactly this could be the case. Looks like NQS matured into TORQUE Resource Manager. Hm. Sven -- Der "normale Bürger" ist nicht an der TU Dresden und schreibt auch nicht mit mutt. (Ulli Kuhnle in de.comp.os.unix.discussion) /me is giggls@ircnet, http://sven.gegg.us/ on the Web
Sven Geggus <lists@fuchsschwanzdomain.de> wrote:
I'm afraid that exactly this could be the case. Looks like NQS matured into TORQUE Resource Manager. Hm.
Did a little bit more googeling and came about "Task Spooler" http://vicerveza.homeunix.net/~viric/soft/ts/ What do you think? Sven -- The main thing to note is that when you choose open source you don't get a Windows operating system. (from http://www.dell.com/ubuntu) /me is giggls@ircnet, http://sven.gegg.us/ on the Web
Hello Sven, I appreciate your efforts. But if my tasks are started at random time, there is a chance that it's peak memory usage coincides with peak memory usage of another task. And it is frustrating if users have no guarantee how long their edits will take to be processed. Would it help if some of the projects set up a donation campaign for more hardware ? Do you have rackspace available at the location ? Regards, Nic 2010/4/27 Sven Geggus <lists@fuchsschwanzdomain.de>:
Sven Geggus <lists@fuchsschwanzdomain.de> wrote:
I'm afraid that exactly this could be the case. Looks like NQS matured into TORQUE Resource Manager. Hm.
Did a little bit more googeling and came about "Task Spooler"
http://vicerveza.homeunix.net/~viric/soft/ts/
What do you think?
Sven
-- The main thing to note is that when you choose open source you don't get a Windows operating system. (from http://www.dell.com/ubuntu) /me is giggls@ircnet, http://sven.gegg.us/ on the Web _______________________________________________ Devserver mailing list Devserver@lists.openstreetmap.de http://lists.openstreetmap.de/mailman/listinfo/devserver
Nic Roets <nroets@gmail.com> wrote:
But if my tasks are started at random time, there is a chance that it's peak memory usage coincides with peak memory usage of another task.
but this is exactly what I try to _avoid_ using some kind of batch mechanism. Unfortunately all of them seem to either be unsuitable for our task or overkill like Sun gridengine. Sven -- If you can spend five minutes on the Internet and do not run Linux, you're a genius. (Dirk Hohndel) /me is giggls@ircnet, http://sven.gegg.us/ on the Web
2010/4/27 Sven Geggus <lists@fuchsschwanzdomain.de>:
Nic Roets <nroets@gmail.com> wrote:
But if my tasks are started at random time, there is a chance that it's peak memory usage coincides with peak memory usage of another task.
but this is exactly what I try to _avoid_ using some kind of batch mechanism. Unfortunately all of them seem to either be unsuitable for our task or overkill like Sun gridengine.
How will Batch know that the memory usage of BboxSplit will peak at 3 GB while the memory usage of Gosmore will peak at only 750MB ?
Nic Roets <nroets@gmail.com> wrote:
How will Batch know that the memory usage of BboxSplit will peak at 3 GB while the memory usage of Gosmore will peak at only 750MB ?
I don't care what your scrtips are doing, I just care about the fact that different people do not interfere with each other. Sven -- Kernel panic: I have no root and I want to scream (Linux Kernel Error Message) /me is giggls@ircnet, http://sven.gegg.us/ on the Web
Nic Roets <nroets@gmail.com> wrote: But if my tasks are started at random time, there is a chance that it's peak memory usage coincides with peak memory usage of another task.
2010/4/27 Sven Geggus <lists@fuchsschwanzdomain.de>: but this is exactly what I try to _avoid_ using some kind of batch mechanism. Unfortunately all of them seem to either be unsuitable for our task or overkill like Sun gridengine. 2010/4/27 Sven Geggus <lists@fuchsschwanzdomain.de>:
How will Batch know that the memory usage of BboxSplit will peak at 3 GB while the memory usage of Gosmore will peak at only 750MB ?
I don't care what your scrtips are doing, I just care about the fact that different people do not interfere with each other.
Hello Sven, I know that. I'm just trying to point out that a finding a 3rd party job scheduling system that can optimize the things that are important to us may not exist. Whether or not we use a 3rd party system, we need to decide which projects are more important. Perhaps based on the number of distinct web hits. I would like to see a "budget" or a "target" for each project, with a spare / reserve amount, e.g. projects X is allocated Xi CPU hours per week*. Not a hard quota, but a guideline. Then we can measure it and refine it. Then we don't have the Tragedy of The Commons. Frederik hinted at this in his email. http://en.wikipedia.org/wiki/The_Tragedy_of_the_Commons Furthermore I would like see fixed times and days of a week* reserved for the batch projects. During those times those projects should have priority over other batch projects. It makes it easier for project owners to be logged in and catch any bugs. If a project overruns its allocated time, it should be niced, so that it does not interfere with subsequent processes. weeks*: Substitute with 2 or 3 week cycles, whichever will be more appropriate. Regards, Nic
Nic Roets <nroets@gmail.com> wrote:
Furthermore I would like see fixed times and days of a week* reserved for the batch projects. During those times those projects should have priority over other batch projects.
Hm, as I do not really want to dive deeply into gridengine or simular, myself, just let me suggest the following: Our most popular batch-job dependent project as far as downloads are concerned seems to be the "All in One Garmin Map"! Its process needs roughly 8 hours. Starting about 7:30AM till about 4PM which is quite long :( So let me suggest the following: In Future the AIO Map should be produced on Monday, Wednesday, Friday and Saturday only. This way all Garmin dependent weekend mappers can work with a current Map but have to wait for their Weekend mappign results until Monday evening. I think this way Gaarmin Maps are still updated often enough. Tuesday, Thursday and Sunday are then available for other processes (8AM-8PM) Currently you should share these days with StefanD. Just check with him how to share these timeslots. This way Nighttime (12PM-8AM) can be used by Dirk who has to make shure, that no Tagwatch process is running at daytime anymore. Tobias should go for early evening hours with dortmund_extract.sh Anybody else who needs a timeslice? Objections? Sven -- "In my opinion MS is a lot better at making money than it is at making good operating systems" (Linus Torvalds, August 1997) /me is giggls@ircnet, http://sven.gegg.us/ on the Web
Sven Geggus schrieb:
So let me suggest the following:
In Future the AIO Map should be produced on Monday, Wednesday, Friday and Saturday only. This way all Garmin dependent weekend mappers can work with a current Map but have to wait for their Weekend mappign results until Monday evening. I think this way Gaarmin Maps are still updated often enough.
Ok, I changed my scripts so I will only update the AiO at Monday, Wednesday and Friday. I left out Saturday so it is more exciting to get the complete mapping results of the weekend at monday ;) Maybe I will find a way to shorten my process time, but at the moment this would be too much work and I have not enough time. Christoph
Hi! Am 27.04.2010 22:40, schrieb Sven Geggus:
Anybody else who needs a timeslice?
I need to run the Postgres import for the hiking map once a week. It takes 1-2 hours if there's no excessive load on the server (about 10GB of data). There is no fixed day as there's manual preparation involved which I do on my own machine when I have the time. The original plan was to start the import by cron job when the upload of the data is complete. It would be great if there was a way to delay the start of my import until there's no load on the server but I have no idea how to script that. Another option would be a daily 2 hour timeslice well offset from the other jobs that is only used once a week. bye Nop
Nop <ekkehart@gmx.de> wrote:
The original plan was to start the import by cron job when the upload of the data is complete. It would be great if there was a way to delay the start of my import until there's no load on the server but I have no idea how to script that.
This is exactly what batch(1) does. Run a job if load is below a given threshold .
Another option would be a daily 2 hour timeslice well offset from the other jobs that is only used once a week.
AIO should be finished in the early evening hours. Thus you can just pick one. As Jochen already suggested. You should definitely start a Wiki page with all the jobs and when they are run. Sven -- "Ich fürchte mich nicht vor der Rückkehr der Faschisten in der Maske der Faschisten, sondern vor der Rückkehr der Faschisten in der Maske der Demokraten" (Theodor W. Adorno) /me is giggls@ircnet, http://sven.gegg.us/ on the Web
Sven Geggus schrieb:
As Jochen already suggested. You should definitely start a Wiki page with all the jobs and when they are run.
I have done this. Please fill in your jobs: http://wiki.openstreetmap.org/wiki/FOSSGIS/Server/Projects#Time_scheduling
Christoph Wagner schrieb:
I have done this. Please fill in your jobs:
http://wiki.openstreetmap.org/wiki/FOSSGIS/Server/Projects#Time_scheduling
I have added my jobs. Stefan
Stefan Dettenhofer (StefanDausR) schrieb:
Christoph Wagner schrieb:
I have done this. Please fill in your jobs:
http://wiki.openstreetmap.org/wiki/FOSSGIS/Server/Projects#Time_scheduling
The AiO is running at the moment, because I forgot to pull my changed script that allows processing only at Monday, Wednesday and Friday. Can I keep it running for now or should I kill it, because somebody else needs the ressources?
Christoph Wagner schrieb:
Stefan Dettenhofer (StefanDausR) schrieb:
Christoph Wagner schrieb:
I have done this. Please fill in your jobs:
http://wiki.openstreetmap.org/wiki/FOSSGIS/Server/Projects#Time_scheduling
The AiO is running at the moment, because I forgot to pull my changed script that allows processing only at Monday, Wednesday and Friday.
Can I keep it running for now or should I kill it, because somebody else needs the ressources?
Keep it running! Perhaps I start my job when you are ready! Stefan
Christoph Wagner <freemaps.osm@googlemail.com> wrote:
The AiO is running at the moment
Has been killed by OOM Killer :( Do you have more than one virtual Machine with 8GB running? I created a swapfile again, but with 5GB only. Regards Sven -- All bugs added by David S. Miller <davem@redhat.com> Linux Kernel boot message from /usr/src/linux/net/8021q/vlan.c /me is giggls@ircnet, http://sven.gegg.us/ on the Web
Nic, Nic Roets wrote:
Would it help if some of the projects set up a donation campaign for more hardware ? Do you have rackspace available at the location ?
There is no rackspace available at the location (there might be at OSM central in London). I believe that we are far from having exhausted our options for sponsorship; I think that if we have a clear proposal we can win more sponsors here in Germany. However, "we have these machines here and we somehow can't figure out how to use them properly so we thought let's get some more and then maybe it works" is NOT a clear proposal. If we can get our act together so that things, while perhaps slow and less frequent, at least work in an orderly fashion, THEN we can approach a potential sponsor and say: "We could use a machine with X, Y and Z, then we'd be able to offer A, B, and C to the community" - that works much better. Especially as some sponsors may be able to, for example, sponsor something with limited bandwidth but lots of memory, others the other way round, etc. Bye Frederik
participants (10)
-
Christoph Wagner -
Dirk Stöcker -
Frederik Ramm -
Jochen Topf -
Kai Krueger -
Mitja Kleider -
Nic Roets -
Nop -
Stefan Dettenhofer (StefanDausR) -
Sven Geggus