Tech Note: MySQL Speed Improvements

• Views: 5,121

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
A Water War Is Brewing Between the U.S. And Mexico. Here’s Why A water dispute between the United States and Mexico that goes back decades is turning increasingly urgent in Texas communities that rely on the Rio Grande. Their leaders are now demanding the Mexican government either share water or face ...
Cheechako
2 days ago
Views: 142 • Comments: 0 • Rating: 1
Harper’s Magazine: Slippery Slope - How Private Equity Shapes a Ski Town …Big Sky stands apart for other reasons. The obvious distinction is the Yellowstone Club, a private resort hidden in the mountains above the community that Justin Farrell, a professor of sociology at Yale and the author of Billionaire Wilderness, ...
teleskiguy
4 days ago
Views: 319 • Comments: 0 • Rating: 2