Quick wins for a faster PC:
Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Repair Windows errors before they cause bigger problemsFix Now →Scan for outdated or missing drivers - takes under a minuteDriver Scan →The safest way to tune MySQL on a Linux VPS is to measure the bottleneck first, then change one bounded setting or query at a time. Start with latency, throughput, errors, CPU, memory pressure, swap, disk latency, I/O wait, connections, buffer-pool statistics, and representative EXPLAIN plans. Only after that evidence points to a constraint should you adjust InnoDB memory, storage I/O, SQL, or durability settings.
Antihost offers Linux VPS plans with full root access, unlimited traffic on a 1 Gbps port and a 14-day free trial.
There is no universal “optimized” my.cnf. The correct configuration depends on your MySQL release, VPS memory, connection concurrency, schema, working set, storage class, read/write mix, and recovery requirements. A change that helps a read-heavy database on local SSD can harm a write-heavy workload on network storage or starve the web process sharing the same VPS.
As an Amazon Associate I earn from qualifying purchases.
Free tools Windows power users keep installed
One-click scans. No signup required.
What MySQL tuning on a VPS actually involves
MySQL performance is the result of several layers working together:
- SQL and schema: predicates, joins, indexes, result-set size, and query shape determine how much work is requested.
- Execution plans: the optimizer chooses access paths and join order based on estimates and available indexes.
- Memory: the InnoDB buffer pool caches table and index pages, while connections and sessions consume additional memory.
- CPU and concurrency: parsing, joins, sorting, encryption, and many simultaneous sessions can exhaust processor time even when storage is fast.
- Storage and I/O: reads, writes, flushing, checkpoint activity, and storage latency affect response time.
- Durability: settings that reduce write cost can also weaken crash-recovery guarantees.
Tuning means identifying which layer limits the measured workload and changing that layer without exhausting the rest of the VPS. A larger cache cannot repair an accidental table scan, and a new index cannot fix a host that is swapping.
#1 Best Overall
- Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
- Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
- Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
- Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
- 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.
Build a baseline before changing a variable
Choose a known workload window: for example, a normal traffic period or a repeatable application test. Record the configuration and workload conditions so a later run is comparable. Without a baseline, an apparent improvement may simply reflect fewer requests, a warmer cache, or a different query mix.
Capture user-facing behavior
- Request or query latency, including the percentile your users feel.
- Throughput, such as requests or transactions completed during the window.
- Error rate, timeouts, and failed connections.
- The statements responsible for the most total time and those producing the most visible latency.
Capture host pressure
- CPU utilization and whether it is sustained or bursty.
- Resident memory, available memory, and signs of memory pressure.
- Swap activity and any Linux out-of-memory events.
- Disk latency, I/O wait, and read/write activity.
Capture MySQL state
- Active and attempted connections during the same interval.
- InnoDB buffer-pool statistics, including evidence of page churn or misses.
- Representative execution plans obtained with
EXPLAIN. - The MySQL version, configuration files, schema revision, and application release used for the test.
Keep this snapshot with the change record. It lets you answer the only question that matters after a tuning change: did the target workload improve without creating a new failure mode?
Separate query-plan problems from resource problems
Begin with the statements consuming the most total time or causing user-visible delay. A slow query is not proof that the server needs more memory. Inspect its execution plan before changing global settings.
Read the plan for avoidable work
Use EXPLAIN on a representative statement and examine:
- Access type: determine whether the optimizer can use an appropriate indexed access path or is scanning far more data than the request needs.
- Chosen indexes: check whether an index is available and whether the selected one is selective for the predicate.
- Estimated rows: compare the amount of data the plan expects to examine with the amount the request should logically need.
- Join order and filtering: look for a join sequence that creates a large intermediate result before filters are applied.
- Temporary or sort work: identify operations that require extra memory or disk-backed work.
A missing or poorly selective index, an unbounded result set, an accidental table scan, and an inefficient join are SQL or schema problems first. Fixing those can reduce CPU and I/O simultaneously; increasing a cache only masks the extra work.
Use plan evidence before adding an index
An index has write, storage, and maintenance costs, so add one in response to a plan and a real access pattern. Confirm that the proposed key supports the filtering or join operation, then rerun the same query and compare its plan and latency. Do not add indexes solely because a column appears in a query; an index that is not selective may not change the access path.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Classify the evidence
| Observed evidence | Likely constraint | First response |
|---|---|---|
| Plan examines many rows, performs a broad scan, or shows inefficient join/filter work | SQL or schema design | Rewrite the statement, constrain the result, or design an index supported by the plan |
| High memory pressure, swap activity, or OOM events | VPS memory capacity or oversized allocations | Reduce memory commitments, preserve headroom, and investigate the largest consumers |
| High I/O wait and storage latency while the workload is active | Storage or flushing | Measure the VPS storage path, then evaluate InnoDB I/O settings with a repeatable benchmark |
| CPU remains saturated while memory and storage are healthy | Query computation or concurrency | Find the statements consuming the most time and reduce their work before raising concurrency |
| Latency rises only when connections surge | Concurrency and per-session memory/work | Measure active sessions and session resource use; avoid compensating with an oversized global cache |
Size the InnoDB buffer pool conservatively
innodb_buffer_pool_size is the main cache for InnoDB table and index pages. The current MySQL 8.0 Reference Manual gives a typical range of 50 to 75 percent of system memory. That figure is a starting range for a dedicated database environment, not a promise that the upper end is safe on a shared VPS.
Rank #2
- 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
- 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
- Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
- 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
- What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
Reserve memory before choosing a value
On a VPS, the buffer pool must share RAM with the Linux kernel, the web or application server, monitoring, backups, replication agents, MySQL connection structures, and per-session buffers used for operations such as sorting or joins. Leave a safety margin for traffic bursts. A practical selection process is:
- Measure total VPS memory and current resident use during the baseline window.
- List every non-MySQL service that must remain healthy and reserve its observed needs plus burst headroom.
- Account for MySQL connection and session allocations at the highest realistic concurrency, not only the current average.
- Choose a buffer-pool value that fits inside the remaining memory rather than automatically selecting 75 percent.
- Increase in small, reversible steps while watching resident memory, swap, OOM events, and latency.
The useful working set matters more than the nominal database size. A pool that keeps frequently accessed pages resident can reduce physical reads even when the complete dataset is larger than RAM. A pool that is too small repeatedly evicts pages and fetches them again.
Recognize an undersized pool
Look for repeated page eviction, rising physical reads, and disk activity that falls when frequently used data is already cached. MySQL explains the benefit this way: “When table data is cached in the InnoDB buffer pool, it can be accessed repeatedly by queries without requiring any disk I/O.” This is why buffer-pool statistics and storage measurements belong in the same baseline.
Recognize an oversized pool
More cache is harmful when it starves the operating system or other processes. Warning signs include falling available memory, swap activity, OOM kills, or latency that worsens after the pool grows. Swapping database pages defeats the purpose of a memory cache and can make response times unpredictable. If the VPS also runs the application, protecting the application process is part of database tuning.
Investigate storage only when measurements point there
If plans are efficient and memory pressure is controlled, examine the storage path. A disk-bound workload may need faster storage, a larger effective cache, or more appropriate flushing behavior; the correct choice depends on the actual VPS provider and storage class.
Measure the storage bottleneck
- Check storage latency and I/O wait during the slow interval.
- Compare read and write activity with buffer-pool misses and checkpoint behavior.
- Determine whether latency is steady, bursty, or correlated with flushing.
- Repeat measurements under the same workload after every storage-related change.
Do not infer storage quality from a plan alone. Two VPS storage classes can have very different latency and burst behavior, and network-backed volumes can respond differently from local SSDs.
Understand the relevant InnoDB mechanisms
MySQL documents evaluating innodb_flush_method, tuning innodb_io_capacity when checkpoint flushing falls behind, and benchmarking Linux I/O-scheduler choices. These are workload- and platform-dependent controls, not universal upgrades. Change them only after recording the current behavior and confirming that flushing or asynchronous I/O is the measured limit.
The Tool Desk
Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Rank #3
- Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
- Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
- Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
- Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
- What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
InnoDB uses native asynchronous I/O on Linux where available, creating threads that handle I/O while other database operations continue. It can also perform read-ahead when it predicts that additional pages will be needed. Those mechanisms reduce waiting only when the underlying storage and workload can use them effectively; they do not remove storage latency.
Benchmark on the real VPS
Test on the same VPS, storage class, filesystem, MySQL release, and representative dataset that serve production. A benchmark on different hardware cannot establish a safe value for innodb_io_capacity, a flush method, or an I/O scheduler. Compare latency, throughput, I/O wait, write latency, and error behavior, then revert a change that does not improve the target metric.
Handle CPU and connection concurrency without guessing
CPU saturation can come from inefficient statements, large sorts and joins, serialization, or too many concurrent requests. First identify which statements consume total time and whether their plans require avoidable work. If the same query becomes slower as concurrency rises, record active connections alongside CPU, memory, and I/O; the interaction matters more than any single percentage.
Per-session buffers multiply with concurrency. A global setting that appears modest for one connection can become unsafe when many sessions perform memory-intensive operations at once. Preserve headroom for the highest realistic connection count and application burst, and treat connection growth as a capacity signal rather than automatically increasing caches.
Treat durability changes as an explicit risk decision
Durability settings can trade write performance for weaker crash-recovery guarantees. A faster commit path is not automatically worth the possibility of losing recently committed work or requiring more recovery after a power or host failure.
Before changing a durability-related option:
- Define the acceptable data-loss and recovery window for the application.
- Read the documentation for the exact MySQL release installed on the VPS; defaults and semantics are version-specific.
- Confirm backups, replication, and restore procedures are current and tested.
- Benchmark the change with the same workload and record both latency and failure behavior.
- Document the decision so an operator can restore the previous setting during an incident.
Keep durability decisions separate from ordinary cache tuning. A memory or index adjustment should not silently alter crash-recovery guarantees.
Use a controlled change protocol
Every change should be small enough to reverse and specific enough to evaluate.
Do these 3 things before closing this tab:
1Fix the driver behind crashes, sound loss and screen glitches2Clear out junk files and repair common Windows errors3Scan for outdated or missing drivers - takes under a minuteRank #4
- Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
- Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
- Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
- Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
- Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft
- Back up the configuration. Save the active configuration and note the MySQL version, VPS memory, schema, and workload window.
- State one hypothesis. For example: “The buffer pool is causing page churn,” or “Checkpoint flushing is creating the observed I/O wait.”
- Change one setting or query. Do not combine a buffer-pool increase, new indexes, and storage options in one deployment; you will not know which change helped or harmed.
- Run the same representative workload. Keep request mix, dataset, concurrency, and test duration comparable to the baseline.
- Compare the target metric and guardrails. Review latency, throughput, CPU, resident memory, swap, I/O wait, disk latency, errors, active connections, buffer-pool statistics, and query plans.
- Keep, refine, or revert. Retain a change only when it improves the intended bottleneck without increasing instability or exhausting shared resources.
- Record the result. Note the old and new values, observed effects, test conditions, and rollback action.
This process is slower than copying a generic tuning file, but it prevents configuration folklore from becoming an outage.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Choose settings according to the workload
| Decision axis | What to evaluate | Why it changes the answer |
|---|---|---|
| Read-heavy versus write-heavy | Read reuse, write rate, flushing, and checkpoint pressure | A larger cache may help repeated reads, while write behavior and flushing can dominate a write-heavy workload |
| Working set versus available RAM | Frequently accessed pages compared with memory reserved for the OS and other services | A pool that fits the working set can reduce reads, but an oversized pool can trigger swapping or OOM pressure |
| Latency-sensitive versus throughput-oriented | Tail latency, concurrency, and batch size | A change that raises aggregate throughput can still violate response-time requirements |
| Local SSD versus network or burstable storage | Measured latency, I/O wait, and burst behavior | Flush and I/O settings must be validated on the actual storage path |
| Durability requirements | Acceptable loss and recovery windows | Performance gains from weaker durability may conflict with business requirements |
| Connection concurrency | Peak active sessions and per-session memory use | Session allocations multiply during bursts and can erase apparent memory headroom |
| Rollback risk | Ease of restoring configuration and detecting regressions | One-at-a-time changes make failures diagnosable and reversible |
A practical VPS tuning runbook
1. Freeze the reference point
Record the active configuration, MySQL release, VPS resources, application version, schema revision, and a representative workload window. Save query plans for the statements that matter most.
2. Rank the work that hurts users
Start with total time and user-visible latency, not an arbitrary variable list. A query executed thousands of times can matter more than a slower statement executed once.
3. Validate plans
Run EXPLAIN, inspect access type, indexes, estimated rows, joins, filtering, temporary work, and sorting. Fix unbounded results, scans, and inefficient joins before increasing caches.
Recommended Free Tools
4. Protect memory
Use the 50–75 percent MySQL guidance as a ceiling range to evaluate, then subtract the OS, application, agents, connection allocations, session buffers, and safety margin. Increase gradually and watch swap and OOM events.
5. Confirm or reject a storage hypothesis
If I/O wait and latency are not elevated, leave storage variables alone. If they are elevated, test the relevant flush, I/O-capacity, and scheduler choices on the actual VPS.
6. Re-test and compare
Use the same workload and compare every baseline metric. A lower average with worse tail latency, more errors, or new swap activity is not a successful tuning result.
Best Value
- 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
- Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
- Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
- HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
- What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
7. Document rollback
Keep the previous configuration and the exact reversal procedure with the change record. Revert promptly when the target metric fails to improve or another resource becomes constrained.
Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchPC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Common tuning mistakes and recovery
Copying a generic optimizer file
Generic files assume a particular MySQL version, RAM size, connection count, schema, and storage device. Replace the file with a measured baseline and restore settings one at a time so the actual bottleneck can be identified.
Setting the buffer pool to most of the VPS
This can leave no room for Linux, the application, sessions, or bursts. Reduce the pool to restore headroom, monitor resident memory and swap, and then increase only in measured steps.
Adding indexes before reading the plan
An index may be unused, insufficiently selective, or expensive to maintain. Start with EXPLAIN, add only an index supported by the access pattern, and verify the changed plan and workload metrics.
Changing several variables together
Bundled changes hide causality and make rollback uncertain. Restore the last known configuration, establish a fresh baseline, and test one hypothesis at a time.
Optimizing for a different machine
Storage latency, CPU capacity, memory pressure, and I/O scheduling vary between VPS providers and plans. Benchmark on the production VPS or a faithful clone with the same workload and dataset characteristics.
Trading durability for an unmeasured gain
Do not weaken crash recovery because a setting is popular in a sample configuration. Define the recovery requirement, verify release-specific behavior, test backups and restores, and make the risk decision explicit.
What success looks like
A successful tuning change has a clear hypothesis, improves the measured bottleneck under a repeatable workload, and leaves enough CPU, memory, and I/O headroom for normal bursts. The final configuration may differ from another VPS even when both run the same MySQL release. That is expected: performance tuning is an evidence-driven fit between queries, working set, concurrency, storage, and operational risk.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




