<$BlogRSDUrl$>

Tuesday, August 26, 2003

Okay, I think i may have pinned down a couple of the problems that were happening last night.

The slowdown: In order to keep multiple threads from editing the same data at once, I've developed a locking flag system. However, in some cases for buying and selling cards, a lock wouldn't get released, causing new attempts to buy and sell cards to endlessly wait for the lock to clear, eating up cycles. After a night of attempting it, the server was bogged down by dozens of attempts to do so, slowing everything down.

I've put in a locking system in the matchmaker now, too, to stop people from accessing data which was being altered in the middle of it -we had situations where during the last iteration of a for loop, looping through the user list, someone would leave. This would cause it to hit an arrayoutofbounds exception. This of course, happened more often due to the massive slowdown since it gave larger windows of opportunity.

I've also streamlined user loading, since there's seperate files, most of the time you dont need to load the rest. I went through removing most loaduserdatas and replaced them with just loadusers.

ANyway, I hope my changes keep the server running smoothly today! Cross your fingers, and knock on wood.


Archives-

This page is powered by Blogger. Isn't yours?

Weblog Commenting and Trackback by HaloScan.com