Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Response to J H (too much text to fit into a comment)
- buffer size
- The Hub buffer size is 400,000 so that the buffer is not blocking the chunk data that is coming in in any way. There are typically 150-300 chunks in a transfer but as far as i know the buffer is overridden by the newest chunk as data comes in recieved = socket.Receive(buffer); since I process chunks serialy.
- Logging
- On average it takes 2-4 seconds to transfer a chunk. If I put another writeline in the RecieveData of the interconnect helper I can see that it there appears to be some sort of limit to the amount of data that can be read from one socket.receive.
- logging in the interconnect
- while (filled < length)
- {
- if (!Helpers.NetworkHelpers.Connected(socket)) throw new SocketDisconnectedException();
- recieved = socket.Receive(buffer);
- Array.Copy(buffer, 0, output, filled, recieved);
- filled += recieved;
- Console.WriteLine("Interconnect. " + filled + " of " + length);
- }
- logging in the chunk receiver
- for(int i = 0; i < chunkAmount; i++)
- {
- socket.Send(InterconnectHelper.FormatSendData(Encoding.ASCII.GetBytes(i.ToString())));
- Console.WriteLine("Chunk " + i + " of " + (chunkAmount -1));
- received = socket.Receive(buffer);
- recievedData = InterconnectHelper.RecieveData(buffer, received, socket);
- Array.Copy(recievedData, 0, returnData, i * chunkSize, recievedData.Length);
- }
- Paste bin of logs with default sizes Paste bin of logs with 200k chunksize
- swap memory
- The memory isn't a problem on either end. On the Pi3 there is still ~630MB (im assuming that the vmstat 1 shows KB) and ~160MB on the Pi Zero. Both of them show 0 in the swap columns as the process runs so that is not a bottleneck.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement