| Author |
Message |
|
Maniac
Lieutenant J.G.
Joined: Sun Mar 13, 2005 3:00 am Posts: 387 Location: USA
|
Question 1.
If the twmail.dat file gets too large does it really lag the server?
Question 2. What exactly is the purpose of that file ? I am gonna guess it is for people that are logged off and that's what you see when you log back on.
Question 3. If some one wrote an external program to clear the mail file every hour or so would that help with the lag without causing the server to lockup and or crash?
My idea would be to have an external program "buffer" the mail file by a fifo (first in first out) algorithm that would only hold the last X bytes/minutes thereby making the mail.dat file a finite size instead of always expanding....
Back of the envelope algorithm here.....
program scans game directories for twmail.dat
if size is greater than wanted..... read header and data....
delete start of data to desired size..... move rest of data to front of file.... write header and data and close file move on to next directory.
Or maybe something simpler.... just delete the twmail file every X amount of time and let the server recreate file.
I am fairly proficient in C# and or C/C++ and am confident I could come up with either solution if there would be a need and or want for something like this.
_________________ Find out just what any people will quietly submit to and you have the exact measure of the injustice and wrong which will be imposed on them. Frederick Douglas
|
| Mon Jan 08, 2007 9:44 pm |
|
 |
|
Runaway Proton
Gameop
Joined: Thu Aug 24, 2006 2:00 am Posts: 1737 Location: USA
|
I believe the mail.dat file stores info on messages recieved if online or not. My experience is that if it gets to large, it doesn't affect the lag, but prevents people from logging in. If you delete this, you will miss messages generated by alien/player fig hits, cannon hits, and anything else that generates a message prior to the delete. I don't know if most players read this stuff if they log in to catch up, but you might miss a message that you've zapped another player with your canon while you were away.
_________________ American soldiers don't fight because they hate what's in front of them...they fight because they love what's behind them. http://www.runawayproton.com <-- Expired telnet://runawayproton.dyndns.org:223 V2.20b Games <-- Expired http://www.twsubspace.com <-- Expired Teamspeak 3 50.23.212.53:4196 <-- Expired Just a has been now.
|
| Mon Jan 08, 2007 9:49 pm |
|
 |
|
Singularity
Veteran Op
Joined: Thu Jun 02, 2005 2:00 am Posts: 5558 Location: USA
|
In a game full of aliens, nobody reads their mail. It's too painful and useless. In a game w/ fewer messages... ya, people read their msgs.
Personally I don't think fighits should be recorded as a msg. You can always run a comparison fig refresh and get the same data.
Problem is the file is locked, so you can't just delete it. It has an open handler... which would spell big trouble if you just go screwing with it.
_________________ May the unholy fires of corbomite ignite deep within the depths of your soul...
1. TWGS server @ twgs.navhaz.com 2. The NavHaz Junction - Tradewars 2002 Scripts, Resources and Downloads 3. Open IRC chat @ irc.freenode.net:6667 #twchan 4. Parrothead wrote: Jesus wouldn't Subspace Crawl.
*** SG memorial donations via paypal to: dpocky68@booinc.com
|
| Mon Jan 08, 2007 10:08 pm |
|
 |
|
Runaway Proton
Gameop
Joined: Thu Aug 24, 2006 2:00 am Posts: 1737 Location: USA
|
Maybe the new TW version can have an option to turn off fig hits only in coms.
_________________ American soldiers don't fight because they hate what's in front of them...they fight because they love what's behind them. http://www.runawayproton.com <-- Expired telnet://runawayproton.dyndns.org:223 V2.20b Games <-- Expired http://www.twsubspace.com <-- Expired Teamspeak 3 50.23.212.53:4196 <-- Expired Just a has been now.
|
| Mon Jan 08, 2007 10:18 pm |
|
 |
|
Vulcan
Gameop
Joined: Fri Sep 03, 2004 2:00 am Posts: 2041 Location: Acworth, Georgis USA
|
Runaway Proton wrote: I believe the mail.dat file stores info on messages recieved if online or not. My experience is that if it gets to large, it doesn't affect the lag, but prevents people from logging in. If you delete this, you will miss messages generated by alien/player fig hits, cannon hits, and anything else that generates a message prior to the delete. I don't know if most players read this stuff if they log in to catch up, but you might miss a message that you've zapped another player with your canon while you were away.
Actually it will do both lag and lockout when it gets too big, and has to be trimmed perodically to keep it managable. Also the alien server will lock and lag the twgs as well but it is an easy fix, you can shut down the alien server while the TWGS is still running, and restart it, usually this fixes the problem, but sometimes it is necessary to shut the server down to fix things.
_________________ Vulcan's Forge v1 TWGS telnet://vulcansforge.homeip.net:2002 v2 TWGS telnet://vulcansforge.homeip.net:23 Forum and site down for now. my Email is vulcan219@comcast.net now
|
| Mon Jan 08, 2007 10:20 pm |
|
 |
|
RexxCrow
Captain
Joined: Sat Jun 18, 2005 2:00 am Posts: 2214 Location: USA
|
The only way to do something like this, other then modifying the code internally would require the server to be taken off-line each time, right? (Which of course would cause more problems then it solves.)
_________________ Your reliance upon subjective IRM's, subjugates you through utter omission, obfuscation, and distortion of fact! Don't mess with me, I will 26 U.S.C. § 7212(a) your IRS!
|
| Mon Jan 08, 2007 10:20 pm |
|
 |
|
the reverend
Gameop
Joined: Thu Mar 08, 2001 3:00 am Posts: 886 Location: USA
|
i like any solution that does not totally wipe the file very often. personally, my scripts read all that info and make good use of it for tracking and gridding.
_________________ twgs : telnet://twgs.thereverend.org:5023 web : http://www.thereverend.org games : http://www.thestardock.com/twgssearch/i ... verend.org helper : http://svn.thereverend.org:8080/revhelper/
|
| Mon Jan 08, 2007 10:41 pm |
|
 |
|
Promethius
Ambassador
Joined: Mon Feb 09, 2004 3:00 am Posts: 3141 Location: Kansas
|
It might be easier if players took it upon themselves to delete their messages. Usually two keystrokes, sometimes more will take care of all of them w/o having to look at them. I know this is asking a lot and I don't know if the messages are actually removed from the .dat file when we trash them.
_________________
/ Promethius / Enigma / Wolfen /
"A man who has no skills can be taught, a man who has no honor has nothing."
|
| Tue Jan 09, 2007 1:53 am |
|
 |
|
Singularity
Veteran Op
Joined: Thu Jun 02, 2005 2:00 am Posts: 5558 Location: USA
|
Macro:
c m : y q
Assign it, love it, use it. Problem I think are the players that are #SD#. Don't you still collect messages even with dead? I always seem to. In a big unlim alien game most of those guys aren't coming back just to delete their msgs.
_________________ May the unholy fires of corbomite ignite deep within the depths of your soul...
1. TWGS server @ twgs.navhaz.com 2. The NavHaz Junction - Tradewars 2002 Scripts, Resources and Downloads 3. Open IRC chat @ irc.freenode.net:6667 #twchan 4. Parrothead wrote: Jesus wouldn't Subspace Crawl.
*** SG memorial donations via paypal to: dpocky68@booinc.com
|
| Tue Jan 09, 2007 2:11 am |
|
 |
|
Promethius
Ambassador
Joined: Mon Feb 09, 2004 3:00 am Posts: 3141 Location: Kansas
|
Singularity wrote: Macro: c m : y q
Assign it, love it, use it. Problem I think are the players that are #SD#. Don't you still collect messages even with dead? I always seem to. In a big unlim alien game most of those guys aren't coming back just to delete their msgs.
Good point
_________________
/ Promethius / Enigma / Wolfen /
"A man who has no skills can be taught, a man who has no honor has nothing."
|
| Tue Jan 09, 2007 6:24 am |
|
 |
|
Thrawn
Commander
Joined: Fri Aug 20, 2004 2:00 am Posts: 1801 Location: Outer Rims
|
Promethius wrote: It might be easier if players took it upon themselves to delete their messages. Usually two keystrokes, sometimes more will take care of all of them w/o having to look at them. I know this is asking a lot and I don't know if the messages are actually removed from the .dat file when we trash them.
They are removed.
_________________ -Thrawn
But risk has always been an inescapable part of warfare.
--
Knight to Queen's Bishop 3
|
| Tue Jan 09, 2007 12:45 pm |
|
 |
|
Cerne
Gameop
Joined: Sun Oct 08, 2006 2:00 am Posts: 991
|
I just wish that there was a setting in CN where we could filter alien related messages so that they get tossed instead of recorded in the dat file. I want to see everything but alien messages.
Cern
_________________ "All warfare is based on deception..." - Art of War "Time will tell all tales" - SG Any advanced tactic in TW is indistinguishable from cheating.
|
| Tue Jan 09, 2007 1:17 pm |
|
 |
|
RexxCrow
Captain
Joined: Sat Jun 18, 2005 2:00 am Posts: 2214 Location: USA
|
I had a brainstorming idea, I don't think it is really feasible but figured it was worth throwing out there at any rate. Is there a way to check through windows systems via (VBScript, JScript, or similar) if a file is open (if so tell it to close, if not in actual use at the time of the check) otherwise if it in being written to/read from, (have your script wait until it is free again) If that is possible then this idea could work so long as TWGS has a redundant type of check that ensure the file is open before trying to write to it, which may not even be necessary, as the source language may do this inherently anyway. Though problems may still arise if TWGS attempts to read/write, while the utility is cleaning up the file, unless TWGS first runs a check to ensure the file is available. Then the script would be used to interact with the utility or visa versa.
_________________ Your reliance upon subjective IRM's, subjugates you through utter omission, obfuscation, and distortion of fact! Don't mess with me, I will 26 U.S.C. § 7212(a) your IRS!
|
| Tue Jan 09, 2007 6:56 pm |
|
 |
|
Thrawn
Commander
Joined: Fri Aug 20, 2004 2:00 am Posts: 1801 Location: Outer Rims
|
RexxCrow wrote: I had a brainstorming idea, I don't think it is really feasible but figured it was worth throwing out there at any rate. Is there a way to check through windows systems via (VBScript, JScript, or similar) if a file is open (if so tell it to close, if not in actual use at the time of the check) otherwise if it in being written to/read from, (have your script wait until it is free again) If that is possible then this idea could work so long as TWGS has a redundant type of check that ensure the file is open before trying to write to it, which may not even be necessary, as the source language may do this inherently anyway. Though problems may still arise if TWGS attempts to read/write, while the utility is cleaning up the file, unless TWGS first runs a check to ensure the file is available. Then the script would be used to interact with the utility or visa versa.
The problem still resides in the fact that TWGS uses and accesses the mail.dat file. I can stop the Alien server, but it will still lock that file, especially if it's bloated. I can stop the server and keep TWGS up, and it can still be locked. No, it's better to stop completely. The trick is to keep the Aliens down. If you have to have a game with large races, keep the #'s to 5 or 10 per race. So far we've had no real issues. If someone says there is an issue, we display the 5 min warning and then delete the twmail.dat. Also I have it set now in the event of power outage, etc, the mail.dat gets deleted at any opportunity before the TWGS starts.
I have heard that the Alien messages may go into a different file than player mail for the next release, but that is just what I have heard. Otherwise, we live with the error and work around it.
_________________ -Thrawn
But risk has always been an inescapable part of warfare.
--
Knight to Queen's Bishop 3
|
| Tue Jan 09, 2007 11:44 pm |
|
 |
|
Silence
Commander
Joined: Tue Mar 26, 2002 3:00 am Posts: 1416 Location: Canada
|
I think that making twgs recognize alien fig hits and player fig hits in different files would remove the problem, along with adding a cn feature to not record alien fig hits.
Seems the easiest way about it to me.
|
| Wed Jan 10, 2007 1:41 am |
|
 |
|