Announcement

Collapse
No announcement yet.

Option to V-Ray standalone to kill itself after n minutes of inactivity

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Option to V-Ray standalone to kill itself after n minutes of inactivity

    Short version:

    - Would it be possible to implement a feature where v-ray standalone would accept an option to kill itself after n minutes of inactivity?
    In our case, we would be interested to set V-Ray standalone to kill itself after about 15 minutes of inactivity.

    The reason I'm not asking for a graceful exit is that if the process would exit with a non-zero exit code, we would see that something unexpected happened in our render manager...

    ---

    Long version:

    Some years ago, we ran DR jobs in tandem with our render manager.

    This meant that we submitted a "master" job, which in turn would spawn a "slaves" job. In the master job, one machine would initiate the render with DR enabled. In the slaves job, V-Ray standalone was started on multiple machines (instead of a frame render). This mean that the render manager saw these machines as busy, not accepting some other task to execute. Once the master job was done, it would kill its corresponding slaves job, freeing up all the V-Ray standalone instances.

    We removed this feature after having problems with the whole farm (except the master machine) getting stuck in the slaves job because of e.g. a super slow bucket or a V-Ray bug which caused the master machine to never exit its process. Instead we implemented good old fashioned region rendering of still images.

    But today, we see a lot of potential with progressive rendering and many of the newer features of V-Ray rendering is attractive to use in combination with DR to speed up the render. However, if we were to re-implement DR in tandem with our render manager, we would like to make sure that we can never end up in that scenario again, where a majority of our farm (or basically the entire farm) would get stuck running idle V-Ray standalone instances forever (or until someone notices). If we were able to trust the slaves to kill themselves (resulting in a non-zero exit code), we would get notifications on that something has gone wrong and our render manager would highlight these processes as problematic. But more importantly, the farm would go on with other tasks instead of being stuck.

    I realize this all is a hack and not the solution to the core problem, which is that we want to run DR in tandem with our render manager... but it's the best solution I can think of.
    Last edited by Fredrik Averpil; 06-09-2018, 12:12 AM.
    Best Regards,
    Fredrik

  • #2
    Have you tried recent builds? Generally, if a standalone is running as vray -server it will be available to pick up jobs and when a job is done - it's available to pick up other jobs, etc.
    There were some improvements, actually.
    Alex Yolov
    Product Manager
    V-Ray for Maya, Chaos Player
    www.chaos.com

    Comment


    • #3
      I'm not sure what you mean... I'm not talking about vray standalone being able to pick up jobs or not.

      I'm trying to make DR work well on our render farm, which has Nuke jobs and other regular Maya rendering (non-DR) jobs queued up and prioritized. Do you see the issue where one machine can accept a DR job simultaneously as a Tractor-dispatched command to execute since V-Ray doesn't communicate directly with the Tractor queuing system?

      To avoid such clashing, I need to have Tractor execute a "vray -server" command on machines in such a way that Tractor itself registers the machine as being "busy" and won't give this machine any other commands to execute until the machine has completed the ongoing command. I also need to implement functionality which makes it possible for machines to exit their "vray -server"...

      Deadline has implemented pretty much exactly what we used to run here (but we found issues with this approach as described in my top post): https://docs.thinkboxsoftware.com/pr...-vray-dbr.html
      Best Regards,
      Fredrik

      Comment


      • #4
        I didn't think of the dispatch system, thanks for bringing it up. Well, that complicates things additionally. I'll need some time to think about it and I'll get back to you.
        Alex Yolov
        Product Manager
        V-Ray for Maya, Chaos Player
        www.chaos.com

        Comment


        • #5
          There is the environment variable VRAY_TERMINATE_ON_FRAME_END, which if you set it to 1, will cause the V-Ray server to terminate immediately after a DR frame is rendered. Then maybe you can force your render manager to run it again to listen for more requests, or just move on to do something else?

          Best regards,
          Vlado
          I only act like I know everything, Rogers.

          Comment


          • #6
            Hm. I'm not sure if this will help, but I'll give it some thought.
            Best Regards,
            Fredrik

            Comment


            • #7
              Hey Fredrik.

              I've requested the same thing as you to the support group not to long ago.

              We do pretty much the same as you guys (we only use it for artist use at the moment, doing it multi-slave render for single frames on the farm is a really cool idea though ).

              Our artist use as setup for requesting DR machines on the farm(RoyalRender). A request spawns tasks on the farm(one per requested slave).

              The task is a Python script that spawns the vray-server process in a "separate thread".
              The python script continues to run, checking the CPU utilization of the vray task every few seconds.
              If it has detected an "idle" state for a set amount of minutes, it kills the task and exists ( finishing the render task on the farm, releasing the machine for other tasks )

              Having a flag that would kill the vray server after a set amount of seconds idle, would simplify our setup here and make it more reliable.
              The vray-server process knows if it actually has connections and isn't just doing IO (which can trick our current setup potentially)

              To illustrate, we would like to spawn a command like
              vray.exe -server -idlekill 3000

              Jimmi

              Comment


              • #8
                Ok, will make a note to look into it.

                Best regards,
                Vlado
                I only act like I know everything, Rogers.

                Comment

                Working...
                X