Welcome to SP!  -
Areas & RangesMountains & RocksRoutesImagesArticlesTrip ReportsGearOtherPeoplePlans & PartnersWhat's NewForum

Server speed

Suggestions and comments about SummitPost's features, policies, and procedures. Post bugs here.

Server speed

Postby Montana Matt » Wed Mar 02, 2011 2:30 am

I haven't been on the server much lately, but the few times I have been it seems to be pretty peppy.

Have the slow downs been fewer and further between lately (if happening at all)? I made a fairly significant change that should have helped and it seems like it has...at least the few times I've been on the site lately.
User Avatar
Montana Matt
Site Admin
 
Posts: 838
Joined: Sun Apr 11, 2004 10:06 pm
Location: Ashland, Oregon, United States
Thanked: 242 times in 132 posts

The following user would like to thank Montana Matt for this post
cab, Josh Lewis, Marmaduke, reboyles, SKI

Re: Server speed

Postby Bob Sihler » Wed Mar 02, 2011 3:15 am

It has been a lot faster for me lately. Very few slowdowns, if any at all. Thanks for your efforts on this.
"So...now you see that evil will always triumph, because good is dumb."— Dark Helmet
User Avatar
Bob Sihler
Forum Moderator
 
Posts: 6215
Joined: Mon Aug 23, 2004 3:20 pm
Location: Herndon, Virginia
Thanked: 1221 times in 685 posts

The following user would like to thank Bob Sihler for this post
Montana Matt

Re: Server speed

Postby phlipdascrip » Wed Mar 02, 2011 4:18 am

out of curiosity, what did you change?
User Avatar
phlipdascrip

 
Posts: 221
Joined: Tue May 05, 2009 5:13 pm
Location: Vancouver, BC, Canada
Thanked: 23 times in 16 posts

Re: Server speed

Postby Montana Matt » Wed Mar 02, 2011 5:04 am

phlipdascrip wrote:out of curiosity, what did you change?

I eliminated a query that was happening on every page load. The data that was being saved wasn't absolutely necessary.
User Avatar
Montana Matt
Site Admin
 
Posts: 838
Joined: Sun Apr 11, 2004 10:06 pm
Location: Ashland, Oregon, United States
Thanked: 242 times in 132 posts

Re: Server speed

Postby Josh Lewis » Wed Mar 02, 2011 5:34 am

It's good on my end. Matt your doing very well! :D Thanks for your support! A Few months it got real bad, but slowly it got better, get it... slowly! :lol: :wink: (Just had to say that for kicks and giggles)
User Avatar
Josh Lewis

 
Posts: 1231
Joined: Thu Jan 06, 2011 11:12 pm
Location: Lynnwood, Washington, The Cloudiest Place on Earth, United States
Thanked: 255 times in 184 posts

Re: Server speed

Postby rgg » Wed Mar 02, 2011 2:08 pm

Yep, I noticed that it was a lot faster most of the time. :D Now I can't get much real work done between posting pictures anymore ! :wink:
User Avatar
rgg

 
Posts: 199
Joined: Sat Oct 02, 2010 7:15 pm
Location: Amsterdam, Netherlands
Thanked: 56 times in 41 posts

Re: Server speed

Postby Sarah Simon » Wed Mar 02, 2011 5:15 pm

Matt,

I posted several images for a route last evening, which is usually the "dreadfully slow" SP time, based on my experience.

Yesterday evening I experienced no delays - very fast.

Thanks!
Sarah
Go climb a mountain
User Avatar
Sarah Simon

 
Posts: 903
Joined: Tue Jan 02, 2007 12:01 am
Location: Colorado Springs, Colorado, United States
Thanked: 208 times in 88 posts

Re: Server speed

Postby Mountainjeff » Wed Mar 02, 2011 6:46 pm

Everything seems to be running faster for me than it was a few weeks ago.
User Avatar
Mountainjeff

 
Posts: 124
Joined: Sat Jun 24, 2006 11:55 pm
Location: Bremerton, Washington, United States
Thanked: 12 times in 8 posts

Re: Server speed

Postby Montana Matt » Wed Mar 02, 2011 8:03 pm

Thanks everyone for the feedback. I'm glad that things have been faster as of late. Hopefully things run smoothly for a while, but the database is still in need of a major change before too long.
User Avatar
Montana Matt
Site Admin
 
Posts: 838
Joined: Sun Apr 11, 2004 10:06 pm
Location: Ashland, Oregon, United States
Thanked: 242 times in 132 posts

Re: Server speed

Postby phlipdascrip » Wed Mar 02, 2011 11:03 pm

Montana Matt wrote:I eliminated a query that was happening on every page load. The data that was being saved wasn't absolutely necessary.


just as incentives:
* did you check if access logs are being kept? this is an unnecessary disk I/O evil as well.
* since you mention an outdated DB, making sure proper keys and indexes are set on tables can make a huge difference on queries. are you keeping a slow query log?
* tweaking the last ms out of frequently run queries themselves can also make quite the difference.
* is there static (config..) data that you could move from the db to static code (e.g. arrays)? memcache is prolly too much work to set up properly.

if you checked those already, never mind - don't mean to be presumptuous :)
User Avatar
phlipdascrip

 
Posts: 221
Joined: Tue May 05, 2009 5:13 pm
Location: Vancouver, BC, Canada
Thanked: 23 times in 16 posts

Re: Server speed

Postby Montana Matt » Wed Mar 02, 2011 11:50 pm

phlipdascrip wrote:* did you check if access logs are being kept? this is an unnecessary disk I/O evil as well.

Yes access logs are kept and getting rid of them probably isn't going to happen.
phlipdascrip wrote:since you mention an outdated DB, making sure proper keys and indexes are set on tables can make a huge difference on queries. are you keeping a slow query log?

It's not that the database is outdated. It's that it has grown so large that the storage engine we use for the main table isn't a good choice anymore. But yes, I've spent many, many hours analyzing the MySQL slow query log and added a few indices in places they were needed (in nearly all cases we already had indices being used correctly). I also removes unused indices, which helped quite a bit too.
phlipdascrip wrote:tweaking the last ms out of frequently run queries themselves can also make quite the difference.

I don't know what "ms" is in that sentence. But frequently run queries have been optimized quite well at this point.
phlipdascrip wrote:is there static (config..) data that you could move from the db to static code (e.g. arrays)? memcache is prolly too much work to set up properly.

That's a good idea and not one that I had considered before. Doing that could reduce the server load a bit, but the main problem right now is the storage engine. I think the main table is going to need to change from MyISAM to InnoDB because of the way locking occurs when tables are written to.
User Avatar
Montana Matt
Site Admin
 
Posts: 838
Joined: Sun Apr 11, 2004 10:06 pm
Location: Ashland, Oregon, United States
Thanked: 242 times in 132 posts

Re: Server speed

Postby phlipdascrip » Thu Mar 03, 2011 1:29 am

Montana Matt wrote:Yes access logs are kept and getting rid of them probably isn't going to happen.

why not? aren't error logs sufficient?

Montana Matt wrote:It's not that the database is outdated. It's that it has grown so large that the storage engine we use for the main table isn't a good choice anymore.

I see. is the page content stored in the DB? did you consider writing it to files instead? plain text or xml, for example (e.g. [object ID].xml and then nodes for the different page sections). wouldn't that reduce the table size by what 90%? easily?

Montana Matt wrote:
phlipdascrip wrote:tweaking the last ms out of frequently run queries themselves can also make quite the difference.

I don't know what "ms" is in that sentence. But frequently run queries have been optimized quite well at this point.

milliseconds.
User Avatar
phlipdascrip

 
Posts: 221
Joined: Tue May 05, 2009 5:13 pm
Location: Vancouver, BC, Canada
Thanked: 23 times in 16 posts

Re: Server speed

Postby Montana Matt » Thu Mar 03, 2011 3:59 pm

phlipdascrip wrote:why not? aren't error logs sufficient?

The logs aren't heavily used, but we do use them from time to time to investigate abuse and potentially block IP blocks that are abusing the site.
phlipdascrip wrote:I see. is the page content stored in the DB? did you consider writing it to files instead? plain text or xml, for example (e.g. [object ID].xml and then nodes for the different page sections). wouldn't that reduce the table size by what 90%? easily?

Yeah, every page on the site is stored in the database and loaded dynamically upon request. We've not talked about storing page content directly in files. I'll think more on this, but I think reading from a file on the server would be slower than a DB query, right?

We have discussed some sort of caching scheme to reduce the number of queries, but the problem is that there are quite a few things on the pages that frequently change, such as votes/page score, parents, etc. But it's likely that some sort of caching will happen sometime in the future.
User Avatar
Montana Matt
Site Admin
 
Posts: 838
Joined: Sun Apr 11, 2004 10:06 pm
Location: Ashland, Oregon, United States
Thanked: 242 times in 132 posts

Re: Server speed

Postby phlipdascrip » Fri Mar 04, 2011 6:00 pm

File access may be a bit slower than mysql, but for larger amounts of unindexed data my guess is the difference is not much. Of course XML parsing time comes on top of that, but with only few nodes inside each XML file I think this is negligible as well. The overhead put on mysql by storing those large amounts of data inside mysql however may be the bigger evil. To know for sure though you'd probably have to run some kind of benchmark.

Also not to forget the number of times you need to retrieve full page content is much smaller than querying for page properties (title, owner, rank etc.). You'd only need to access an XML file when a page is actually viewed.

Did you look at mysql's cache statistics and config as well (opened_tables, open_tables, table_cache etc.)? I remember we were able to improve performance by tweaking those values too.
User Avatar
phlipdascrip

 
Posts: 221
Joined: Tue May 05, 2009 5:13 pm
Location: Vancouver, BC, Canada
Thanked: 23 times in 16 posts

Re: Server speed

Postby phlipdascrip » Fri Mar 04, 2011 6:05 pm

Oh forgot, you could also set up memcache for caching just XML data. Frequently opened pages (e.g. featured on front page) would stay in the cache.
User Avatar
phlipdascrip

 
Posts: 221
Joined: Tue May 05, 2009 5:13 pm
Location: Vancouver, BC, Canada
Thanked: 23 times in 16 posts

Next

Return to Site Feedback

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 0 guests

© 2006-2013 SummitPost.org. All Rights Reserved.