Tech Note: MySQL Speed Improvements

• Views: 5,164

After scratching my head, pulling out my hair, consulting the Necronomicon, and Googling like a fiend for terms like “persistent connections” and “query cache bug,” I’ve made some changes to the LGF Blog Engine database layer that seem to have greatly improved performance. I didn’t want to say anything immediately, because the server hears you and then gets rebellious, but after several hours of tweaking and testing it now looks like the speed increase is genuine—and most pages seem to load at least twice as fast, comparing the current speed to the best case speed before the changes.

Technically, it was a matter of:

* setting the MySQL variables ‘interactive_timeout’ and ‘wait_timeout’ to 20 seconds.

* using a “persistent” database connection on the web server, so that connections are shared from a pool of existing connections, and each access doesn’t have to open a new one. The ‘timeout’ variables above set how long those persistent connections are allowed to remain open.

* turning on the MySQL query cache, which I still may turn off again if it exhibits the bug I was Googling for above.

If that’s Martian to you, don’t worry about it, just relax and enjoy the speed improvement…

Jump to top

Create a PageThis is the LGF Pages posting bookmarklet. To use it, drag this button to your browser's bookmark bar, and title it 'LGF Pages' (or whatever you like). Then browse to a site you want to post, select some text on the page to use for a quote, click the bookmarklet, and the Pages posting window will appear with the title, text, and any embedded video or audio files already filled in, ready to go.
Or... you can just click this button to open the Pages posting window right away.
Last updated: 2023-04-04 11:11 am PDT
LGF User's Guide RSS Feeds

Help support Little Green Footballs!

Subscribe now for ad-free access!Register and sign in to a free LGF account before subscribing, and your ad-free access will be automatically enabled.

Donate with
PayPal
Cash.app
Recent PagesClick to refresh
Ranked-Choice Voting Has Challenged the Status Quo. Its Popularity Will Be Tested in November. JUNEAU — Alaska’s new election system — with open primaries and ranked voting — has been a model for those in other states who are frustrated by political polarization and a sense that voters lack real choice at the ...
Cheechako
1 weeks ago
Views: 204 • Comments: 0 • Rating: 1