• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Minor change great improvment (multicast i love you)

    Scheduled Pinned Locked Moved
    General
    3
    8
    3.4k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • G
      ghedo
      last edited by

      Hi, i use fog to clone 140+ machine at one.
      using fog from the shelf make the task impossible (200H+) but with few change now i can clone all the group in a couple of hours.

      on the fog server increase the rec buffer
      echo 1000000000 > /proc/sys/net/core/rmem_max
      echo 1000000000 > /proc/sys/net/core/rmem_default

      in /opt/fog/service/common/lib/MulticastTask.class.php i made the changes:
      I send the image to the client WHIT-OUT decompress it. I replace gunzip with cat
      I.E. the lines like
      $cmd = “gunzip -c “” . $strRec . “” | " . UPDSENDERPATH . " --min-receivers " . $this->getClientCount() . " --portbase " . $this->getPortBase() . " " . $interface . " $wait --half-duplex --ttl 32 --nokbd;”;

      became
      $cmd = “cat “” . $strRec . “” | " . UPDSENDERPATH . " --min-receivers " . $this->getClientCount() . " --portbase " . $this->getPortBase() . " " . $interface . " $wait --half-duplex --mcast-data-address $mca --ttl 32 --nokbd;”;

      In init.gz i modified /bin/fog
      i.e. the lines like
      udp-receiver --nokbd --portbase ${port} --mcast-rdv-address ${storageip} 2>/dev/null | partimage -f3 -b restore $win7rec stdin
      became
      udp-receiver --nokbd --portbase ${port} --mcast-rdv-address ${storageip} 2>/dev/null | gzip -d -c |partimage -f3 -b restore $win7rec stdin

      the last trick

      to use multiple multicast group at the same time is better use separate mcast-data-address (so the fog server will use different input buffer)
      so in /opt/fog/service/common/lib/MulticastTask.class.php , at the start of public function getCMD()

      i add
      $mport=$this->getPortBase();
      $mcabase = substr($mport,-1);

      $mca = “232.192.124.24”.$mcabase;
      May You consider to insert those little changes in the next fog release?

      1 Reply Last reply Reply Quote 0
      • Tom ElliottT
        Tom Elliott
        last edited by

        [quote=“ghedo, post: 17754, member: 16751”]on the fog server increase the rec buffer
        echo 1000000000 > /proc/sys/net/core/rmem_max
        echo 1000000000 > /proc/sys/net/core/rmem_default[/quote]

        This is feasible, though may change from system to system. The needs of one does not necessarily equate to the needs of all. I don’t think I’d be adding this into the scripts or possible addition to cron jobs. Maybe make a tutorial for this particular area and Multicast explaining what it is actually doing.

        [quote=“ghedo, post: 17754, member: 16751”]I.E. the lines like
        $cmd = “gunzip -c “” . $strRec . “” | " . UPDSENDERPATH . " --min-receivers " . $this->getClientCount() . " --portbase " . $this->getPortBase() . " " . $interface . " $wait --half-duplex --ttl 32 --nokbd;”;

        became
        $cmd = “cat “” . $strRec . “” | " . UPDSENDERPATH . " --min-receivers " . $this->getClientCount() . " --portbase " . $this->getPortBase() . " " . $interface . " $wait --half-duplex --mcast-data-address $mca --ttl 32 --nokbd;”;

        In init.gz i modified /bin/fog
        i.e. the lines like
        udp-receiver --nokbd --portbase ${port} --mcast-rdv-address ${storageip} 2>/dev/null | partimage -f3 -b restore $win7rec stdin
        became
        udp-receiver --nokbd --portbase ${port} --mcast-rdv-address ${storageip} 2>/dev/null | gzip -d -c |partimage -f3 -b restore $win7rec stdin[/quote]

        I think this is actually a very good idea. Instead of placing the load on the server, who already has to distribute to who knows how many files, let the clients deal with the decompression of the file. It does so fine under unicast.

        [quote=“ghedo, post: 17754, member: 16751”]to use multiple multicast group at the same time is better use separate mcast-data-address (so the fog server will use different input buffer)
        so in /opt/fog/service/common/lib/MulticastTask.class.php , at the start of public function getCMD()

        i add
        $mport=$this->getPortBase();
        $mcabase = substr($mport,-1);

        $mca = “232.192.124.24”.$mcabase;[/quote]

        This seems like a simple enough change, however I am under the impression that UDP prefers even numbered ports to work with. Also, your variable $mca is specified; is this your multicast alternate port or is that your server’s IP address? It is my understanding that multicast IP address typically follow the broadcast address of the network (e.g. 192.168.0.255) through the standard host multicast address 224.0.0.1 so long as the hosts are on the same subnet. You can branch that request across different class networks through a combination of 224.0.0.2 and 224.0.0.1. However my networking understanding is, unfortunately, limited so I could just be an idiot. If that IP address is your Server IP, you may like to edit and replace with X’s

        With that said, I think the thing that will certainly help improve speed with multicast is to not have the server decompress the image for the hosts. Have you tried just having that part set to see an improvement?

        Just wondering.

        Thank you,

        Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

        Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

        Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

        1 Reply Last reply Reply Quote 0
        • R
          Raff
          last edited by

          Another member once did a guide on how to do the same thing with pigz rather than gzip to take advantages of multicore processors, I think that thread is on the old forums. We were getting mixed results when tried it. What happens if one of the clients is slower at decompressing than others in the group?

          Might try it again on 0.32, last time we tried it was on 0.28.

          1 Reply Last reply Reply Quote 0
          • Tom ElliottT
            Tom Elliott
            last edited by

            If decompression is performed on the client side, ultimately I would think this doesn’t matter as much. To my knowledge, the group imaging through multicast still works in the similar fashion as Unicast and it would just finish once it’s done on a host by host basis. Maybe I’m under thinking it though!

            Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

            Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

            Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

            1 Reply Last reply Reply Quote 0
            • R
              Raff
              last edited by

              ghedo

              I tried this today and it doesn’t work. Can you upload files /bin/fog and MulticastTask.class.php ?

              1 Reply Last reply Reply Quote 0
              • G
                ghedo
                last edited by

                uor client are all the same. so i’m not able to give answare to raff.

                hera another part of my study:
                [url]https://docs.google.com/spreadsheet/ccc?key=0Aqa-uTXnbjT5dDJ3WjNxbzIyY1pKSlJISW9uT0xTWXc&usp=sharing[/url]

                the time to deploy via multicast a group of machine (before my kack)

                as you che see the tim grows very quickly: the main reason seem the small buffer of the tcp stack an then server

                1 Reply Last reply Reply Quote 0
                • R
                  Raff
                  last edited by

                  ghedo, I got this running, but I have gone with pigz rather than gzip for the uncompressing. I have not modified the buffer though.

                  1 Reply Last reply Reply Quote 0
                  • G
                    ghedo
                    last edited by

                    in the archive U can find:
                    MulticastTask.calss.php
                    the /bin/fog (present in mi Image.gz)

                    [url=“/_imported_xf_attachments/0/412_Archive.zip?:”]Archive.zip[/url]

                    1 Reply Last reply Reply Quote 0
                    • 1 / 1
                    • First post
                      Last post

                    188

                    Online

                    12.0k

                    Users

                    17.3k

                    Topics

                    155.2k

                    Posts
                    Copyright © 2012-2024 FOG Project