|
ilithiiri Newbie
Joined: 24 Mar 2007 Posts: 2
|
Posted: Sat Mar 24, 2007 2:42 pm
ZMud View/Statistics |
Hi,
I'm almost about to complete the MCCP2 code both in my GPL mud and the other one I'm sometimes contributing to.
The code is done, but I'd really like to know if MCCP2 gives a good network bandwidth benefit or not ;)
On both codebases, I've added a sort of byte counter to the lowest level function, the one which does the write() to the connection's socket.
For MCCP, the return of the write() (the amount of data effectively transferred) is then added to the count of mccp bytes transferred, whereas the length of the "text transferred" is added to another variable.
At a certain point in time, I have the following statistics from the MUD:
Text 0Mb 270Kb 272b, MCCP 0Mb 26Kb 533b
total bytes: 551514
compressed: 30801 ratio 95%
The MUD thinks it has sent 27157 bytes (26*1024 + 533) via MCCP, whereas ZMud says it has received 30801 bytes.. discrepancy of 3k..
Moreover, the MUD thinks it has sent 276752 bytes (270*1024 + 272) bytes of text, whereas ZMud thinks it has received 551514.. discrepancy of almost 300k ..
Any idea why I'm noticing such discrepancy?
Also, what's that percentage indicating? that the output from the mud is being compressed very very well (95%) or very badly (5%) ?
Thanks for any answer :)
-marco- |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Sat Mar 24, 2007 6:10 pm |
The 95% comes from 1-(30801/551514) - in other words, that the uncompressed data is 95% larger than the compressed data. I think that's pretty conclusive when it comes to the bandwidth it'll save.
The discrepancies I can't help with, I'm afraid. |
|
|
|
vey2000 Novice
Joined: 21 May 2004 Posts: 32
|
Posted: Sat Mar 24, 2007 7:15 pm |
I'm not too familiar with network programming, but could the discrepancy be due to the overhead of packet headers that are added along the way? You would only be counting the original data, but zMUD would be receiving about 10% more data due to this, which seems like a reasonable amount for headers. Could be routing information, or maybe something added by windows when it receives the packet.
|
|
|
|
ilithiiri Newbie
Joined: 24 Mar 2007 Posts: 2
|
Posted: Sat Mar 24, 2007 7:45 pm |
Thanks for your replies..
Fang Xianfu: so, from what you say it seems to be that really MCCP2 compresses a good amount ;) I'm very happy :)
vey2000: could be.. I'm only counting the effective bytes I'm sending out, in fact.. I don't know what ZMud counts internally for that, of course.
Thanks for your help guys |
|
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|