WebTiles server overhaul


Although the central place for design discussion is ##crawl-dev on freenode, some may find it helpful to discuss requests and suggestions here first.

Lair Larrikin

Posts: 15

Joined: Tuesday, 20th May 2014, 19:50

Post Tuesday, 20th May 2014, 20:00

WebTiles server overhaul

Hello everybody. I have probably a crazy suggestion here. I have often noticed extreme lag (10 minute intervals where a command takes about 10 seconds to refresh on my console) with the servers playing over ssh using cygwin on crawl.akrasiac.org. Does anyone else have this issue? I have checked a few configuration settings with my ssh agent and tweaked game timing settings, but a friend in a different physical location, who plays only over the web, has similar issues at around the same time period as me. I believe it to be a network issue

Don't worry I'm very aware that DCSS is open source and run by impressive volunteer effort :) So I don't mean this as a criticism in any way. In fact, I think the servers are amazing with all the stats features and such!

My crazy suggestion assumes that the WebTiles are run on top of apache, am I correct in this total assumption? If so - the crazy suggestion is to switch to nginx. I think this might be a cheap way to squeeze out more performance from the servers without taxing community resources. nginx tends to have better performance than apache with respect to concurrent requests. Since DCSS tends to run dozens of users at a time who are constantly executing many tiny commands, I thought nginx might be worth looking into.

Since I know nothing about the server machines and software, I've obviously made a lot more assumptions than just that the WebTiles servers use apache. I apologize for any bad assumptions. Let me know your thoughts!

Swamp Slogger

Posts: 155

Joined: Friday, 18th April 2014, 16:42

Post Tuesday, 20th May 2014, 20:06

Re: WebTiles server overhaul

Major server overhauls are a perfect time to resolve all the missing interface features that the local client has, like basic mouse support. Just sayin'...
User avatar

Dungeon Master

Posts: 502

Joined: Wednesday, 7th March 2012, 13:25

Location: Lexington, KY, US

Post Tuesday, 20th May 2014, 22:27

Re: WebTiles server overhaul

Webtiles does not run on top of apache; it is its own web server (implemented on top of the Tornado framework for python).

Akrasiac in particular has some times of extremely heavy load, mostly in the mornings (maybe 9:00 or 10:00 Eastern time UTC-0500). You might try some of the other servers: crawl.s-z.org and crawl.berotato.org are both located in the US.

The problem is mostly that I/O and CPU get bogged down from compressing ttyrecs, updating the scoring database, and running the game. Probably long-term we'd need to rewrite the scoring database and/or move it to a beefier server.

For this message the author neil has received thanks: 3
Arrhythmia, duvessa, tedric

Tomb Titivator

Posts: 909

Joined: Thursday, 3rd January 2013, 20:32

Post Wednesday, 21st May 2014, 00:12

Re: WebTiles server overhaul

neil wrote:The problem is mostly that I/O and CPU get bogged down from compressing ttyrecs, updating the scoring database, and running the game.

What does this mean in practical terms? Like is it noticeably "harder" to process an autotravel request vs. a single directional key, because the server has to calculate so many turns ahead all at once? Are there bottlenecks when a bunch of players die around the same time, creating lots of housekeeping tasks that get backed up? I like the idea of a tangible manifestation of mass death, a sense that "millions of voices suddenly cried out in terror, and were suddenly silenced."

In general, is there anything we non-server admins can do to help? Other than playing less :oops:

As a U.S. player I switched my default server to berotato when it came online, but laggy periods are only marginally less frequent/intense as they were when I mostly used akrasiac -- even though there are usually 5 or fewer players on berotato.
Wins (Does not include my GrEE^Veh 15-runer...stupid experimental branch)

For this message the author tedric has received thanks:
verily

Lair Larrikin

Posts: 15

Joined: Tuesday, 20th May 2014, 19:50

Post Wednesday, 21st May 2014, 00:28

Re: WebTiles server overhaul

tedric wrote:
neil wrote:The problem is mostly that I/O and CPU get bogged down from compressing ttyrecs, updating the scoring database, and running the game.

What does this mean in practical terms? Like is it noticeably "harder" to process an autotravel request vs. a single directional key, because the server has to calculate so many turns ahead all at once? Are there bottlenecks when a bunch of players die around the same time, creating lots of housekeeping tasks that get backed up? I like the idea of a tangible manifestation of mass death, a sense that "millions of voices suddenly cried out in terror, and were suddenly silenced."

In general, is there anything we non-server admins can do to help? Other than playing less :oops:

As a U.S. player I switched my default server to berotato when it came online, but laggy periods are only marginally less frequent/intense as they were when I mostly used akrasiac -- even though there are usually 5 or fewer players on berotato.


It'd probably be easier to calculate a long autotravel request because the server isn't having to get bogged down on I/O interrupts for each and every key press as if you had walked across that travel route key by key.

neil wrote:Webtiles does not run on top of apache; it is its own web server (implemented on top of the Tornado framework for python).

Akrasiac in particular has some times of extremely heavy load, mostly in the mornings (maybe 9:00 or 10:00 Eastern time UTC-0500). You might try some of the other servers: crawl.s-z.org and crawl.berotato.org are both located in the US.

The problem is mostly that I/O and CPU get bogged down from compressing ttyrecs, updating the scoring database, and running the game. Probably long-term we'd need to rewrite the scoring database and/or move it to a beefier server.


Oh ok, so taking a quick gander at Tornado it sounds like a similar vein to nginx.

If you don't mind me asking, what database engine runs the scoring database? I'm just curious for info because I might be able to help with a bit of development coming up soon.

Ziggurat Zagger

Posts: 8786

Joined: Sunday, 5th May 2013, 08:25

Post Wednesday, 21st May 2014, 03:54

Re: WebTiles server overhaul

verily wrote:I know nothing about the server machines and software

verily wrote:I'm just curious for info because I might be able to help with a bit of development coming up soon.
dang, fast learner

For this message the author duvessa has received thanks:
Arrhythmia

Lair Larrikin

Posts: 15

Joined: Tuesday, 20th May 2014, 19:50

Post Wednesday, 21st May 2014, 03:58

Re: WebTiles server overhaul

duvessa wrote:
verily wrote:I know nothing about the server machines and software

verily wrote:I'm just curious for info because I might be able to help with a bit of development coming up soon.
dang, fast learner


Yes, Mr. Smart Alecky. I'm not saying I know nothing of servers, I'm talking about the crawl servers. Just letting it be known that I'm not trying to jump in with a bunch of assumptions about them, but that I'd be interested to help on such a project.

For this message the author verily has received thanks: 3
and into, Arrhythmia, duvessa

Return to Game Design Discussion

Who is online

Users browsing this forum: No registered users and 84 guests

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.