Everything2
Near Matches
Ignore Exact
Full Text
Everything2

E2 Lag Reduction Suggestions for Noders

created by moJoe

(idea) by nate (4.5 d) (print)   ?   (I like it!) 6 C!s Sun Apr 22 2001 at 17:42:34

Check out the Database Lag-o-meter

The Nefarious Everything2 Lag has several potential causes:

  • Database strain

    The E2 MySql database seems to have an upper limit of ~300 queries/second, at least for the type of queries which we do. When queries are sent which take a large amount of sorting or handle large amounts of data (ie doing a user search on pseudo_intellectual) it takes longer than the 0.003 seconds each query is "allowed" - this means everyone else has to wait.


    What you can do: Turn off nodelets that you don't care about -- many of them take a decent amount of code running behind them.
    If you're using the Chatterbox most of the time, try using the Java Chatterbox and save Everything from having to generate the other 100lbs of HTML. If you're not around, turn off the Java Chatterbox so that it doesn't take system resources.
    Use the "expensive" features on E2 sparingly -- don't reload your user search every minute to see if any Reps have changed. Don't sit and chatter on ENN or the cool archive.
    Use Create a node rather than searching for a node you know want to create -- searching is a lot of string comparisons and sorting.

  • Web server saturation

    E2's web server currently runs 60 Apaches. That's roughly how many simultaineous connections it can handle. When request #61 comes in, it has to wait until there is one available to process the request. This is what causes the most severe lag (>30s pageloads), and can be triggered by database saturation as each process blocks until it's db transactions are complete.


    If you start hitting extremely long load times, Please be patient or try again in a couple minutes. Don't hit reload over and over again, as that can compound the problem -- especially when everyone is doing it. A lagged-out web server is like a line at the DMV -- when you hit reload, you get out of line and go to the back again.

  • Stupid bots

    One perl script written without any sleep()s in it can take up more resources than 100 normal users. They can be auto-noders, auto-linkers, personal statistics managers, chatter-bots, etc etc. Also, a wide array of data-harvester bots have visited us, and the only one allowed to stay is Google's. Once detected, they're fairly easy to weed out -- via IP's, User Agents, query patterns, etc -- but until then they can ruin the party.

    Please, if you write bots, join Edev and try to make them as friendly to the system as possible. Use generous sleep()s, use the XML interface, and the bot will play nice and you (and others who use your 'ware) won't get your IP logged and banned.

  • E2 is doing stuff in the background

    At roughly 7am server time, E2 begins purging nodes marked for death on node row. Deleting nodes is an expensive process, partly because of the table locking, and because of the softlink work required. The server's just going to be slower at that time, despite the fact that it's serving < 1/4 of the traffic during peak hours.


    There are a few other jobs which the database takes care of which can slow down performance -- maintaining the "other users" list, updating the nodelets, or sending out the Everything Daily Report. Most of these jobs take a second or so, but monopolize the database while they're working. Sorry, you'll have to wait.



    Everything2 is trying to handle its growth as best as we can with the resources we have. Emailing me saying "The lag is really bad" helps zilch, because I KNOW -- I'm sitting with a term open on the server watching the train wreck. If you're a mod_perl or MySql guru and know some tricks which can save us CPU cycles, please post on Edev, or msg me.

    assuming, of course, you can get the page to load


  • printable version
    chaos

    E2 Link and Logger Client She was a committed romantic and an anarcha-feminist. This was hard for her because it meant she couldn't blow up beautiful buildings. Notelet Nodelet Squawkbox Client edev
    E2 Explorer Photographing Flowing Water Freaking the mundanes PostgreSQL
    There are some things money can't buy, for everything else there's Mastercard SQL optimization Google mod_perl
    Apache WinPOPUP Lambda calculus Everything smooching partner
    in a sanctuary of geeks, not one solution A People's History of the United States Pot-in-Pot earthenware cooling device Blue Öyster Cult
    What happens if you're too nice? edev: Turning off page generation? April Trolls Day MySQL
    Y'know, if you log in, you can write something here, or contact authors directly on the site. Create a New User if you don't already have an account.
      Epicenter
    Login
    Password

    password reminder
    register

    Everything2 Help

    Cool Staff Picks
    Nodes to live by:
    A Burial at Ornans
    Making the Movies
    The mathematician as madman
    Roomba
    The bride of Vankenstrein - the continued tedium
    Grenada
    The facial nerve
    Do like you oughta, add acid to water
    Mary, Queen of Scots
    Right Wing Maniac
    Lews Therin Telamon
    Scary, xenophobic subtexts in The Matrix
    Occam's Revenge
    New Writeups
    Simulacron3
    Reality, Dimensions and the Natural Ontology(essay)
    SubSane
    Making Love to a 9-Foot Woman(person)
    Ouzo
    Thoughts(idea)
    antigravpussy
    I fall silent, listening. The breadcrumbs are talking about us(person)
    calgon
    Buffalo Bill by the pool(poetry)
    gate
    Anarchy is Order(idea)
    ushdfgakjasgh
    Scribeling(thing)
    XWiz
    Trism(review)
    artman2003
    Briefcase Full of Souls - Part I(fiction)
    Dreamvirus
    Alan Ladd(person)
    waverider37
    Harold Holt(person)
    The Debutante
    Until death do us part(fiction)
    Ysardo
    a brother to a sister(personal)
    antigravpussy
    your warm whispers(personal)
    Clarke
    Multiculturalism(idea)
    This affordable entertainment brought to you by The Everything Development Company