Should MySQL 8.4 Data and Redo Log Be on Separate Disks?

Should MySQL 8.4 Data and Redo Log Be on Separate Disks?

A write-heavy MySQL server is showing storage pressure, and a second NVMe is available.

Fastest safe decision: keep data and redo together unless workload testing proves a benefit from separate physical devices and the devices’ write-cache persistence is verified. MySQL 8.4 warns that an unexpected exit can lose data when redo and data files are on different devices and data writes remain in a non-battery-backed device cache. If persistence behavior is unknown, choose a tested redundant layout and keep backups off the server.

This guide is for DBAs planning a MySQL 8.4 disk layout, backend engineers weighing a second direct-attached NVMe, and SaaS leads comparing self-managed storage responsibilities with a managed database.

Start by defining what “separate” means

Three arrangements are often described as “separate disks,” but they do not provide the same I/O behavior.

  • Separate directories: Data and redo have different paths, but the paths resolve to the same physical device. This can improve organization. It does not, by itself, isolate device I/O.
  • Separate partitions: The operating system exposes different partitions, but they still share the same underlying NVMe device. They may help with capacity management or monitoring, but not with contention at that device.
  • Separate physical devices: Data files and redo are placed on distinct NVMe devices. This can separate their I/O queues and workload pressure, provided the devices really have independent paths and neither is limited elsewhere.

In MySQL 8.4, redo files normally reside under the data directory. The innodb_log_group_home_dir variable sets a different redo-log location. The MySQL 8.4 startup and redo-log configuration documentation describes this setting and explains that the separate location can be used to avoid potential I/O resource conflicts. That is an option to test, not a guarantee that performance will improve.

This discussion concerns InnoDB tablespace data files and the InnoDB redo log. It does not treat the binary log, slow query log, or error log as interchangeable files. They have different purposes and can create different storage patterns. Moving a text log to another directory is not the same change as moving InnoDB redo.

Match the layout to the workload

Redo records changes needed for crash recovery. Data-page writes update the database’s tablespace files. In a write-heavy OLTP workload, these streams can compete for device resources. Separate physical devices might reduce that competition, but the gain depends on the actual storage path, concurrency, transaction pattern, flush behavior, and other active I/O.

For read-heavy work, first check whether storage is busy at all. If the frequently used data is served from the buffer pool and the device is not under sustained pressure, separating redo may not address the limiting factor. A slow query, CPU saturation, locking, or an undersized cache can dominate instead. The MySQL 8.4 InnoDB disk I/O guidance describes InnoDB’s I/O behavior, including asynchronous I/O and read-ahead; use it as context for interpreting measurements, not as proof that a particular layout will be faster.

Community questions show that storage separation remains a live operational concern, but they do not establish MySQL performance results. A 2025 discussion about logical separation on modern SSD and NVMe storage and a 2023 discussion about separating database data and logs both raise the distinction between independent devices and organizational separation. Treat them as signals of the question administrators ask, not as benchmark evidence.

Compare the actual choices

Layout What changes When it may fit Main trade-off
Data and redo on one device One physical device handles both workloads Storage is not the measured bottleneck, or durability characteristics are uncertain I/O streams can contend; simple to operate and recover
Separate directories on the same device Paths differ; physical I/O resource does not Cleaner file organization or operational monitoring is the goal No independent device capacity; path configuration still needs validation
Separate physical devices Data and redo use distinct devices Matched tests show meaningful contention and both devices have suitable persistence behavior More failure modes and recovery checks; separate-device cache risk must be evaluated
Redundant layout with tested recovery Redundancy is provided by software RAID or replication, as designed Availability and recovery requirements outweigh raw capacity goals Requires deliberate capacity planning, monitoring, and restore or failover exercises

The right comparison is not “one disk versus two disks” in isolation. It is “which measurable bottleneck changes, and what new failure behavior does the layout introduce?” A second physical device can be useful as a performance resource, but it is not automatically a mirror, replica, or backup.

Check durability before moving redo

The important caution is specific. MySQL’s 8.4 system-variable documentation states that data loss is possible if redo and data files are on different storage devices and an unexpected exit occurs before data-file writes have been flushed from a device cache that is not battery-backed. It also discusses innodb_flush_method and the use of O_DIRECT in this situation.

That warning is not a blanket claim that every multi-device layout will lose data. It means the safety case depends on the full write path. Check the NVMe device’s power-loss protection and cache behavior, whether flush commands are honored through the controller and operating system, the filesystem’s semantics, and the MySQL flush configuration. If any link is undocumented or untested, treat the durability question as unresolved.

Also distinguish device failure from host failure. Separate data and redo devices may reduce competition, but they do not create a backup. A mirror can help maintain availability after a drive failure, but it may copy accidental deletion or corruption. Replication can provide another recovery path, but it does not replace independent backups either.

For transactional durability, review innodb_flush_log_at_trx_commit and sync_binlog in context rather than changing them to compensate for a disk layout. MySQL documents the trade-offs in its transaction management guidance: settings that reduce flush work can also expose recent transactions to loss after a crash.

Run a controlled comparison before changing production

A useful test is one that isolates the layout change. Do not compare separate runs with different data, cache warmth, MySQL settings, or concurrency and then attribute the result to disk placement.

  1. Record the baseline. Save the MySQL configuration, storage topology, filesystem mount options, device model and firmware information, and current disk-usage and I/O observations. Capture the relevant InnoDB and Performance Schema indicators used by the team.
  2. Choose a representative workload. Use a staging copy or a restorable test dataset. Match the production read/write mix, transaction size, concurrency, and commit behavior as closely as practical. Avoid testing against a changing dataset that makes the runs incomparable.
  3. Hold other variables constant. Keep the MySQL version, buffer-pool settings, redo capacity, flush settings, filesystem, benchmark client placement, and test duration consistent. Change only the physical placement being evaluated.
  4. Measure the baseline and candidate layout. Compare transaction commit latency, tail latency, device utilization, queueing, I/O wait, and MySQL wait events. Use system monitoring such as iostat alongside MySQL-level observations. Look for a repeatable reduction in the bottleneck, not a single favorable result.
  5. Repeat and explain anomalies. Repeat runs after the same warm-up procedure. Record whether background backups, checkpoints, replication, or other jobs were active. If results move around between runs, the test has not isolated a dependable layout advantage.
  6. Test restart and recovery. Validate clean shutdown, restart, and crash-recovery procedures in a non-production environment. Confirm MySQL can find all tablespaces and redo files at startup. Document how to restore the previous paths if the server does not start.

No performance figures are reported here because there is no cited CloudDDR test for this exact workload and device arrangement. The decision should come from measurements on the target server, with the same dataset and workload, plus a recovery rehearsal.

Change the path with a rollback plan

Treat a redo-path change as a storage migration, not a casual configuration edit. MySQL’s documentation says the redo directory must exist and be writable by the server account. It also documents that the path is configured with innodb_log_group_home_dir; review the official option and variable details for the installed MySQL 8.4 release before applying a change.

Before the maintenance window:

  • Take a fresh database backup and verify that it can be read. Store the backup outside the server and outside the devices being rearranged.
  • Record the current configuration and directory ownership. Confirm the target mount is present before MySQL starts; a path that silently resolves to the root filesystem is not an acceptable substitute.
  • Define the stop, move, permission, startup, and validation steps. Decide in advance how to restore the original path and data if startup or recovery fails.
  • Check space, filesystem health, and monitoring for both devices. Ensure alerting covers device errors and unexpected growth.
  • After the change, verify MySQL startup, table availability, error logs, redo activity, and application-level reads and writes before returning traffic.

MySQL’s offline tablespace move instructions emphasize stopping the server and updating path settings when relevant data files are moved. Those instructions cover tablespace files rather than serving as a substitute for a redo migration procedure; use the exact documented procedure for each file type.

FAQ: choose by device, workload, and recovery needs

Can MySQL 8.4 keep its data files and redo log on the same NVMe?

Yes. Keeping them on the same device is a valid layout, especially when tests do not show storage contention or when separate-device cache behavior has not been verified. You can still place files in different directories for organization, but directories or partitions on one physical NVMe do not create independent device I/O paths.

Should a two-NVMe server dedicate one drive to the MySQL redo log?

Not automatically. Separate devices can reduce I/O contention when the workload is write-heavy and both devices have independent performance capacity. But a second drive does not provide redundancy by itself. Before assigning redo and data to different devices, verify device write-cache behavior, persistence guarantees, and the recovery procedure under an unexpected shutdown.

Will separating MySQL data files and redo logs make the database faster?

It may help if data-page writes and redo writes are competing for the same saturated device. It will not fix a CPU limit, lock contention, poor query plans, or a workload served from memory. Run matched tests on the actual devices and compare commit latency, device utilization, and I/O wait before treating separation as a performance improvement.

Could a power loss damage data when redo and data files use different drives?

It can create a durability risk if an unexpected exit occurs while data writes remain in a device cache that has not been made persistent. Check the device's power-loss protection and flush behavior, the filesystem, and MySQL's flush settings. If those conditions are unknown, do not assume physical separation is safer; use a tested redundancy and off-site backup plan.

Plan the server around the recovery design

A dedicated database server gives the operator direct control over OS-level file placement, but it also leaves filesystem setup, MySQL administration, redundancy, and backups with the operator. Managed database services can reduce routine administration, while their storage options and billing model may constrain how devices are arranged. Self-managed shared instances can be a better fit for a small or temporary workload, but they may expose less control over the physical storage path. None of these deployment models removes the need to verify restores.

For a database that needs persistent CPU and direct-attached storage, CloudDDR lists configurations with two individually connected 1TB NVMe drives and no hardware RAID. The drives can be arranged for data and redo separation, or configured by the operator for software redundancy; they are not automatically mirrored. Review the CloudDDR server configuration and pricing details and the server overview against the intended layout. Product capacity is not a durability guarantee, and server rental does not replace off-site backups.

If tests show no storage contention, a shared device or same-device directory layout may be simpler. If a measured write bottleneck persists, separate physical devices may be worth testing—but only after confirming persistence behavior and rehearsing recovery. Where the workload needs dedicated compute and direct control of MySQL storage placement, CloudDDR’s independent NVMe layout is one deployment option; the database team still owns redundancy and off-site backup.

Frequently asked questions

Can MySQL 8.4 keep its data files and redo log on the same NVMe?

Yes. Keeping them on the same device is a valid layout, especially when tests do not show storage contention or when separate-device cache behavior has not been verified. You can still place files in different directories for organization, but directories or partitions on one physical NVMe do not create independent device I/O paths.

Should a two-NVMe server dedicate one drive to the MySQL redo log?

Not automatically. Separate devices can reduce I/O contention when the workload is write-heavy and both devices have independent performance capacity. But a second drive does not provide redundancy by itself. Before assigning redo and data to different devices, verify device write-cache behavior, persistence guarantees, and the recovery procedure under an unexpected shutdown.

Will separating MySQL data files and redo logs make the database faster?

It may help if data-page writes and redo writes are competing for the same saturated device. It will not fix a CPU limit, lock contention, poor query plans, or a workload served from memory. Run matched tests on the actual devices and compare commit latency, device utilization, and I/O wait before treating separation as a performance improvement.

Could a power loss damage data when redo and data files use different drives?

It can create a durability risk if an unexpected exit occurs while data writes remain in a device cache that has not been made persistent. Check the device's power-loss protection and flush behavior, the filesystem, and MySQL's flush settings. If those conditions are unknown, do not assume physical separation is safer; use a tested redundancy and off-site backup plan.

Further reading

Dedicated AMD EPYC 7543P server, from $447/month.

Dedicated Server Configurations: Start with Memory

AMD EPYC 7543P, with 128 GB or 256 GB DDR4-3200 ECC.