Go Back   EQEmulator Home > EQEmulator Forums > Archives > Archive::Development > Archive::Development

Archive::Development Archive area for Development's posts that were moved here after an inactivity period of 90 days.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 11-21-2003, 10:53 AM
Merth
Dragon
 
Join Date: May 2003
Location: Seattle, WA
Posts: 609
Default Zone Threads

I'm trying to track down the LD issues encountered when a server is load stressed. It could be any number of things, so might as well start at the bottom.

Here's a breakdown of the threads in EQEMu's zone servers. If you see something that should be shifted or potential improvements to logic, please comment.

Main Thread
Function: main()
Quote:
Handles main() and all core program logic.[list=1][*] Parses command line[*] Loads various cache stores[*] Creates TCP connection to world server[*] Starts infinite processing loop
  1. Process world server socket data received
    NOTE: Only processes data already received on the TCP thread
  2. Process whatever logic is necessary for each entity in zone (i.e., AI, client HandlePacket(), etc)
    NOTE: Sending/Receiving of client data not handled on this thread. This thread only processes the data.
  3. Refresh world server ping, db variables, /who all
[/list:o:a531084bc2]
TCP Thread
Function: TCPConnectionLoop()
Quote:
Handles receiving and sending of data between zone and world servers, using TCP. Not much goes on here.

UDP Thread
Function: EQNetworkServerLoop()
Quote:
Handles receiving and sending of data between zone and all clients. This is the thread that must be highly optimized to work with client/zone UDP traffic.[list=1][*] Socket is opened up in SOCK_DGRAM mode (UDP, connectionless)[*] SO_RCVBUF is set to 64kb[*] SO_SNDBUF is set to 64kb[*] Socket is set to bind on INADDR_ANY (all IP addresses)[*] Socket is set to nonblocking mode[*] Enters infinite processing loop:
  1. recvfrom() is called on server socket with buffer size of 1,518 bytes. Not sure why this number was chosen.
  2. A virtual connection is established for each packet of data received. A virtual connection is treated as a 'Client' class.
  3. Verifies checksum on packet received, if any
  4. Iterates through all client connections, looking for match on who the packet belongs to
  5. If match found, the entire packet is decrypted. If the packet is a fragment of a packet, all fragmented packet processing is done as well.
    NOTE: This is a part I believe we can optimize
  6. All (virtual) connections are checked for validity. Connections deemed no longer valid are removed.
[/list:o:a531084bc2]

Async TCP Thread
Quote:
I didn't review this thread
Async DB Thread
Quote:
I didn't review this thread
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 11:58 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3