Jump to content

  • Log In with Google      Sign In   
  • Create Account


Network buffer, eNet and congestion.


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
4 replies to this topic

#1 Frable   Members   -  Reputation: 112

Like
0Likes
Like

Posted 05 September 2013 - 05:53 AM

Hi, 

I have been toying around with eNet for my bachelor thesis and everything seemed to work alright, till I started to dump simulated data continuously onto the eNet connection. After a short period of time the performance drops down immensly. 

Situation elaboration:
I have a client send interaction data via eNet to a server program, where that interaction is processed and triggers a video frame as response, also sent via UDP but not via eNet.
In the beginning I get ~17 fps as a response, but starting with frame 30-50 (it variates) it drops down to ~5 fps, the increasing delay being in the enet server. So it would seem that some kind of buffer/cache has been filled up and thus slows down. Trying it on manual interactions the same happens, fps drops down after some time of continuous interactions and is back to normal if you stop interacting for a while. 

The weird things that, in my opinion, doesn't fit the picture, is the fact that I normaly send my interactions in a 30 ms interval, if I change that interval to 1 ms, the framerate doesn't drop at all. Altough, the interactions (same amount) are dumped onto the stream in aprox. 1 seconds time, buffered on the server and frame responses arrive for quite some time afterwards. 

What I did notice, is that when the fps drop occurs, my buffercount drops down to 1, and in the case of 1ms interval for interactions the buffer count is more or less constantly 2. 

Another idea, could the cause be the fact that I have server and client running on the same pc to avoid network delay/packet loss/corruption?
So the problem being related to multiple network adapter acceses simultaniously? Server program is multithreaded. 

Any ideas on how to battle this fps drop? Had no luck finding anything usefull in the documentation or forums so far. Working on Linux Ubuntu and CPU and Memory itself doesn't seem to be the hog. 

Thanks, 
Frable 


 



Sponsor:

#2 hplus0603   Moderators   -  Reputation: 5157

Like
1Likes
Like

Posted 05 September 2013 - 09:38 AM

I think Enet limits the throughput of data sent. Check how much data you are sending (in bytes per second) when it stops working.

Also, look at the packets using Wireshark or tcpdump, and try to match them up to the data you are sending, to see what's going on.

If all else fails, you can always step into the code and figure out what's going on!


enum Bool { True, False, FileNotFound };

#3 Frable   Members   -  Reputation: 112

Like
0Likes
Like

Posted 05 September 2013 - 01:37 PM

Thanks hplus0603,
will try to analyze the throughput and try to get some answers from that. I hope to find the solution without step by step debugging, as it is my first multithreaded program and various libraries apart from eNet are used. Last time I tried to debug it in qtcreator I got more confused than in the begining. 
Will report back after taking a more detailed look at the transfered data amount. 



#4 hplus0603   Moderators   -  Reputation: 5157

Like
1Likes
Like

Posted 05 September 2013 - 04:06 PM

Also, some general advice: If you don't know how to debug your project, your project is a failure waiting to happen. Knowing how to debug something is a very important factor to consider when choosing vendors/libraries/technologies/languages!


enum Bool { True, False, FileNotFound };

#5 Frable   Members   -  Reputation: 112

Like
0Likes
Like

Posted 06 September 2013 - 03:29 AM

Huge thanks hplus0603, your idea to check the throughput was spot on. Also once more experienced how important proper version control is.
The problem was on the client side after all, the used client version there had a bandwidth limit specified in enet_host_create(). Getting rid of that limitation fixed the problem.  

Knowing how to debug is definitely a must, but usually I manage with alternative debug methods instead of going step by step.
I will dive into multithreaded debuging next tough but after being done with thesis. In this case the program is just a prototype/case study for an approach, so the code itself could be improved quite a bit by someone more experienced. First time threading, working with openGL, etc.

Once again thanks a lot!

BR,
Frable






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS