Here are my photopost stats
Current Version 5.62
Registered Users 2,287
Comments/Ratings 313,953
Image Space Used 5,205.1 mb
Total Photos 57,347
Total disk space used by the DATA directory 6,453.78 mb
Number of Albums 400
Photos in Albums 4701
Posts in Albums 20203
ECards in Queue 0
Awaiting Approval 0
Total Views 2,914,191
I don't mean to bash the person(s) who wrote these queries, because clearly photopost is a great solution for a lot of people, and you can't just go around charging $130.00 for crap software and expect people to pay it.
But when looking at my situation, I just don't see why it is necessary for these queries to return 50,000 and 300,000 records to php for processing. I don't even know why the queries are examining 100,000 & 600,000 records either.
These queries are ran very VERY frequently on the site (
www.digishoptalk.com/gallery)
# User@Host: digi_gallery[digi_gallery] @ localhost []
# Query_time: 12 Lock_time: 0 Rows_sent: 52465 Rows_examined: 104930
SELECT id,user,userid,date FROM pp_photos WHERE cat=500 ORDER BY date DESC;
# User@Host: digi_gallery[digi_gallery] @ localhost []
# Query_time: 21 Lock_time: 0 Rows_sent: 292273 Rows_examined: 605942
SELECT username,id,date,photo FROM pp_comments WHERE cat=500 ORDER BY date DESC;
I just don't see why it is necessary for photopost to request every record in the pp_comments table & pp_photos tables for a specific category. I can't find any page or view that actually will display all 50,000 photos or all 300,000 comments. It all seems like queries that were written without any scalability in mind. Or written with the idea that "no one will ever have that many comments/photos in one category"
I can disable photopost in the admin and my system load goes down to near zero, I can then re-enable photopost and system load is off the charts. And I'm not using any kind of slouch machine. It's a Dell server (an actual server, not just a desktop machine being used as a server), Intel(R) Xeon(TM) CPU 3.00GHz, with 2 gig of ram, with sata drives in a hardware raid 1 configuration.
All of the above leads me to believe that the root problem is photopost. The other thread I've started on this topic has yielded some good advice, and some of the things have marginally helped, but I kind of feel that the difficult questions have been blown off.
I'm also running vBulletin (not integrated with photopost), vBulletin has 3000 users, 26,000 threads & 300,000 posts. And nothing about vBulletin is running slow, and from what I can tel, nothing about vBulletin is requesting from the database the amount of data that photopost is (best I can tell).
we are going to break things out into categories, which will probably help significantly, but doing that seems like only a band aid to the real problem. Because what do we do when each of the new categories reaches 300,000 comments and 50,000 photos?
if any other users with similar levels of comments/posts could please chime in also, perhaps there is some server configuration I can implement to help out.
-Nick
DigiShop Talk - Server Admin