You've likely been wondering why the site has been slow the past week. I've been wondering the same.

The Issue

Sluggish performance on the page displaying your past giveaway entries, and more recently, all pages. This seemed to occur primarily during peak hours, but also at what appeared to be random, during off-peak hours as well.

Why Is This Happening?

In short, we don't have enough ram to store our active dataset and indexes, so the site needs to occasionally read from disk. For example, a user attempts to view their giveaway entries from the past. Our server can't hold all of our giveaway entry information in our limited amount of ram, so this information would be read from disk. Scanning hundreds of millions of rows on disk to find the related data for a user is an incredibly slow process, and it might take 30+ seconds, when it should be taking 0.02 seconds if the data was available in ram. This explains why the page displaying your past giveaway entries would take a long time to load if you haven't accessed it in a while, since it would be reading from disk instead of ram.

Now, what about other pages, why has everything been slow lately? Well, the disks are so busy working overtime, trying to read the data for the above user, they're not available for other users browsing the site, and these users are left waiting, and waiting, and potentially timing out. If we had more ram available, the original user would be reading their data directly from ram, and the disks would be free for writes.

Solution

We need to download more ram. Our database server runs 24gb of ram at the moment, and that's far too low for our 60gb of data and indexes. I received a price today for upgrading to 128gb of ram, and we'll soon be going through with those upgrades. However, we need a short term solution so users can continue using the site before that happens. I ended up disabling the page for viewing your past giveaway entries. This keeps the hard drives from being a bottleneck and spending all of their time reading that information for a small number of users, when they need to focus on writes to the database for everyone else. It's peak hours right now, and you should notice the site being quite responsive, so I think this solution will work well until the ram upgrade.

Edit: The entered giveaway page will now show 100 of your past entries, in descending order. For performance reasons, this is the only way the results can be ordered and displayed until the server is upgraded, and full functionality can be restored.

8 years ago*

Comment has been collapsed.

Thanks cg, it works great now! Except that entered giveaways cannot be ordered by remaining time though.

8 years ago
Permalink

Comment has been collapsed.

Will this help?

8 years ago
Permalink

Comment has been collapsed.

Again, cg, thank you so much! ^^

8 years ago
Permalink

Comment has been collapsed.

Lot's of love guys!

8 years ago
Permalink

Comment has been collapsed.

The temporary fix is working, thanks cg :)

8 years ago
Permalink

Comment has been collapsed.

Wouldn't a "entered and not ended yet" list be way faster/less performance hungry? Because that's what I need (and I think others too). I don't really care for entered and ended ones.
(Basically the SGv1-style of listing entered giveaways. ^^)

8 years ago
Permalink

Comment has been collapsed.

Why is the number of points growing so slowly? It is also associated with the upgrade?

8 years ago
Permalink

Comment has been collapsed.

Thank you!

8 years ago
Permalink

Comment has been collapsed.

Cool. Wanted to ask - can you change out the flash ads? I have flash set to ask me so none of those will load anyway. Need to for safety reasons since that's one of the most exploited platforms. If you can stick to the other types of ads that would help you with the income. I don't know if an unloaded flash ad still sends you money (probably not).

8 years ago
Permalink

Comment has been collapsed.

A server is kind of like a waitress, right?

8 years ago
Permalink

Comment has been collapsed.

But without the boobs and beehive hairdo.

8 years ago
Permalink

Comment has been collapsed.

When I'm procuring servers for my data centre, I always make sure they come fitted with boobs and a beehive hairdo.

8 years ago
Permalink

Comment has been collapsed.

fwiw, for me, just being able to see active entries is more valuable than my past expired entries. Currently the expired as well as active entries seem all intermingled sorted by date entered instead of by active/expired status. As far as I'm concerned, if server ram is at issued I'd be fine with not being able to see expired listing except on special request if needed.

Anyhow, best of luck w/ upgrades and thanks for the update

8 years ago
Permalink

Comment has been collapsed.

This is most reassuring news. Keep up the excellent work, on behalf of all users here.

8 years ago
Permalink

Comment has been collapsed.

Sounds like a good solution for the time being. Glad to see you're getting things sorted out :D

8 years ago
Permalink

Comment has been collapsed.

just put a donation button already so we can have a monthly support statistic :D

8 years ago
Permalink

Comment has been collapsed.

When user make use of the entered page they usually look for the actual entered not past entries. I do occasionally check out the past ones too but thats a secondary priority. You might split up those into 2 seperate menu points for optimisation too.

8 years ago
Permalink

Comment has been collapsed.

Just a question; is the fact that I've no more notifications about messages and that the button to mark the messages read disappeared has something to do with the upgrade?

8 years ago
Permalink

Comment has been collapsed.

There's an announcement about that too.

8 years ago
Permalink

Comment has been collapsed.

Ah thanks, it seems that despite checking threads, I didn't see it.

8 years ago
Permalink

Comment has been collapsed.

Thank you

8 years ago
Permalink

Comment has been collapsed.

Well that explains it, thanks for the heads up. We appreciate your hard efforts.

8 years ago
Permalink

Comment has been collapsed.

Hi cg,

maybe you should split up the entered giveaways in those that are still running and those that are closed. I often look at the still running after I won a game, to remove my entries for that game. This would require fewer data to be held in the RAM.

A second suggestion would be to create small services for different parts of the website. Or maybe use replication or sharding for the database. Might be less expensive and faster than a huge server.

8 years ago
Permalink

Comment has been collapsed.

Many thanks for improving our hobby :D

8 years ago
Permalink

Comment has been collapsed.

Thanks for optimizing the site! Great site!

8 years ago
Permalink

Comment has been collapsed.

thanks CG good update

8 years ago
Permalink

Comment has been collapsed.

Thanks for all the hard work.
It is still really painful that we can't contribute directly to helping a bit more, other than with a suggestion here and there, but i fully understand that you do not wish to go down that path.

8 years ago
Permalink

Comment has been collapsed.

Thanks a lot for this wonderful site and community cg, your solution sure has helped performance and seems quite reasonable! Wish you luck on that future 128gb upgrade! I've just downloaded 32 gb of ram myself!!! w00t

8 years ago
Permalink

Comment has been collapsed.

How did you do that? It limited me to downloading 4GB of RAM. :-( You must have a better Internet than me.

8 years ago
Permalink

Comment has been collapsed.

You have to believe in the heart of the cards and most of all, in Gaben

8 years ago
Permalink

Comment has been collapsed.

in the ENTERED section, Can you sort according to Time Remaining, instead of Date Entered?

8 years ago
Permalink

Comment has been collapsed.

Closed 8 years ago by cg.