Minor change great improvment (multicast i love you)
-
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_defaultin /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 stdinthe 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? -
[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,
-
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.
-
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!
-
ghedo
I tried this today and it doesn’t work. Can you upload files /bin/fog and MulticastTask.class.php ?
-
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
-
ghedo, I got this running, but I have gone with pigz rather than gzip for the uncompressing. I have not modified the buffer though.
-
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]