Stories
Slash Boxes
Comments

SoylentNews is people

Meta
posted by martyb on Wednesday October 10 2018, @03:00PM   Printer-friendly

As you probably have noticed, our site has been a bit sluggish lately.

We are aware of the issue and are developing plans for dealing with it. The primary issue lies in the database structure and contents. On-the-fly joins across multiple tables cause a performance hit which is exacerbated by the number of stories we have posted over the years (yes, it HAS been that long... YAY!). Further, stories which have been "archived" — allowing no further comments or moderation — are still sitting in the in-RAM DB and could be offloaded to disk for long-term access. Once offloaded, there would be much less data in the in-RAM database (queries against empty DBs tend to be pretty quick!) so this should result in improved responsiveness.

A complicating factor is that changing the structure on a live, replicated database would cause most every page load to 500 out. So the database has to be offlined and the code updated. That would likely entail on the order of the better part of a day. Obviously, shorter is better. On the other hand "The longest distance between two points is a short cut." We're aiming to do it right, the first time, and be done with it, rather than doing it quick-and-dirty, which usually ends up being not quick and quite dirty.

So, we ARE aware of the performance issues, are working towards a solution, and don't want to cause any more disruption than absolutely necessary.

We will give notice well in advance of taking any actions.


Original Submission

 
This discussion has been archived. No new comments can be posted.
Display Options Threshold/Breakthrough Mark All as Read Mark All as Unread
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
  • (Score: 1, Insightful) by Anonymous Coward on Wednesday October 10 2018, @03:55PM (14 children)

    by Anonymous Coward on Wednesday October 10 2018, @03:55PM (#746992)

    On-the-fly joins across multiple tables cause a performance hit which is exacerbated by the number of stories we have posted over the years (yes, it HAS been that long... YAY!). Further, stories which have been "archived" — allowing no further comments or moderation — are still sitting in the in-RAM DB and could be offloaded to disk for long-term access.

    If you are having performance problems from joins between tables in an in RAM database (assuming you do mean that all of the joined tables are in RAM) then that says your DB table structure design is very very wrong.

    So, yes, this would say you should do it right, take some downtime, and make a wholesale change to a proper DB table layout appropriate for the types of queries that get run for the site.

    Starting Score:    0  points
    Moderation   +1  
       Insightful=1, Total=1
    Extra 'Insightful' Modifier   0  

    Total Score:   1  
  • (Score: 3, Informative) by The Mighty Buzzard on Wednesday October 10 2018, @04:14PM (13 children)

    by The Mighty Buzzard (18) Subscriber Badge <themightybuzzard@proton.me> on Wednesday October 10 2018, @04:14PM (#747000) Homepage Journal

    You are not entirely incorrect but I'm just not feeling the desire to completely revamp our DB structure and all the code that accesses it at the moment. The old site got around this by dumping archived stories out to mostly pre-rendered .shtml files on a daily basis. We're disinclined to take that route at the moment.

    --
    My rights don't end where your fear begins.
    • (Score: 3, Insightful) by RS3 on Wednesday October 10 2018, @07:27PM (6 children)

      by RS3 (6367) on Wednesday October 10 2018, @07:27PM (#747093)

      Indexes?

      • (Score: 2) by The Mighty Buzzard on Wednesday October 10 2018, @10:27PM (5 children)

        by The Mighty Buzzard (18) Subscriber Badge <themightybuzzard@proton.me> on Wednesday October 10 2018, @10:27PM (#747174) Homepage Journal

        Got plenty but do need a couple new ones added, yes.

        --
        My rights don't end where your fear begins.
        • (Score: 2) by RS3 on Thursday October 11 2018, @12:24AM (4 children)

          by RS3 (6367) on Thursday October 11 2018, @12:24AM (#747210)

          I don't remember knowing what database you're using, but if it's MySQL, have you tried phpMyAdmin?

          • (Score: 2) by The Mighty Buzzard on Thursday October 11 2018, @12:33AM (3 children)

            by The Mighty Buzzard (18) Subscriber Badge <themightybuzzard@proton.me> on Thursday October 11 2018, @12:33AM (#747211) Homepage Journal

            Install PHP on critical servers? Are you mad?

            --
            My rights don't end where your fear begins.
            • (Score: 2) by RS3 on Thursday October 11 2018, @01:01AM

              by RS3 (6367) on Thursday October 11 2018, @01:01AM (#747226)

              Hopping! I inherited WordPress servers, so... It hasn't hurt me in 10 years. Maybe I gots magic. :)

            • (Score: 2) by RS3 on Thursday October 11 2018, @01:03AM (1 child)

              by RS3 (6367) on Thursday October 11 2018, @01:03AM (#747228)

              BTW, you could rsync the db to a cloned but otherwise offline server (2nd Ethernet if you're really paranoid) and run phpMyAdmin on that box.

    • (Score: 2) by FatPhil on Wednesday October 10 2018, @09:38PM (1 child)

      by FatPhil (863) <{pc-soylent} {at} {asdf.fi}> on Wednesday October 10 2018, @09:38PM (#747154) Homepage
      Do you have slow queries loggin turned on?

      That will point you in the right direction, at least. You can then describe those queries to find out where additional indexes may be useful. Pretty much everything in a well-designed database that you are only interested in small bits of should be O(log(N)^(1+small)) in the size of the tables, and if we're noticing it slow down, that probably means an O(N) has crept in somewhere, which probably means a lack of an index.
      --
      Great minds discuss ideas; average minds discuss events; small minds discuss people; the smallest discuss themselves
    • (Score: 0) by Anonymous Coward on Thursday October 11 2018, @02:30AM (1 child)

      by Anonymous Coward on Thursday October 11 2018, @02:30AM (#747262)

      Data mining much?

    • (Score: 0) by Anonymous Coward on Thursday October 11 2018, @02:40AM (1 child)

      by Anonymous Coward on Thursday October 11 2018, @02:40AM (#747266)

      Different Anon here - That is pretty cool, and one implementation I would use as well.