Preprint
Technical Note

This version is not peer-reviewed.

A Hardware-Assisted Log-Structured File System with Temporal Locality Optimization Under Resource Constraints

Submitted:

23 October 2025

Posted:

24 October 2025

Read the latest preprint version here

Abstract
With the rapid advancement of IoT devices, there is an increasing demand for MPU environments that are low in overall system resources while achieving low power consumption, high energy efficiency, and high performance. Such systems must be capable of controlling multiple sensors and wireless communication modules on minimal battery power, while retaining several days to weeks of logs even under unstable wireless conditions. In logging applications, sensor data are continuously generated and written to non-volatile memory. However, conventional file systems are not designed to handle these operations efficiently. This is because they generally lack a ring-buffer–based logical interface, and attempting to simultaneously achieve low power consumption, high performance, and power-failure resilience often introduces significant overhead and complexity, ultimately degrading energy efficiency. In short, traditional file systems inherently face trade-offs between power efficiency, functionality, and performance. In typical designs, achieving low power consumption, high performance, and powerfailure resilience without relying on specialized modules or custom hardware components ironically requires more resources—such as CPU cycles, power, circuit size, and component count—leading to increased complexity. Therefore, realizing these properties using only general-purpose resources remains a challenging task.
Keywords: 
;  ;  ;  ;  ;  ;  

1. Introduction

IoT devices are a category of embedded systems. In embedded system design, the choice of operating system (OS) is a critical consideration. Recently, from a security standpoint, adopting (Embedded) Linux has become the de facto standard—for example, enabling compliance verification through Software Bill of Materials (SBOM)–based security clearance.
However, under strict resource constraints, an approach that does not rely on an operating system can also be a practical and efficient solution.
Figure 1. Hardware-Cooperative Architecture between Low-Resource and High-Resource Systems
Figure 1. Hardware-Cooperative Architecture between Low-Resource and High-Resource Systems
Preprints 182013 g001
Figure 2. Module blocks
Figure 2. Module blocks
Preprints 182013 g002

1.1. Systems Without an Operating System

For example, the pico-sdk for Raspberry Pi Pico is not an operating system. Instead, it provides a software development kit (SDK) that includes a ported LWIP (TCP/IP, UDP/IP protocols), along with hardware FIFO access, memory mapping, linker scripts, and device drivers for standard peripherals of the Pico W board.
However, it does not include a ported journaling file system such as ext4, nor embedded FAT-based file systems with mechanisms for resilience to unexpected power loss. Consequently, while it enables lightweight connectivity and control, it lacks robustness in non-volatile storage management.

1.2. Adoption of Embedded Linux

By contrast, adopting Linux offers significant advantages, such as access to a stable, feature-rich, and versatile file system, a mature and reliable network protocol stack, and stable device drivers. These attributes make Linux the practical standard for many embedded applications.
Nevertheless, as discussed earlier, in scenarios where constraints and requirements—such as power consumption, limited memory space, the number of attached sensors, and network communication frequency—cannot tolerate the overhead of a full OS, a bare-metal or OS-less approach becomes more effective.
This is particularly true when porting to a target OS cannot satisfy performance or resource limitations inherent to the system design.

1.3. File System in This Use Case

In the IoT devices targeted in this study, adopting a conventional operating system is not feasible due to resource constraints defined by system requirements and hardware limitations. Under such constrained environments, the selection of an appropriate file system becomes a critical design decision.
When an OS cannot be employed, the available options for file system design are generally limited to lightweight, custom, or bare-metal implementations. These must operate directly on hardware interfaces such as SPI- or NAND-based non-volatile memory, while satisfying requirements for data reliability, low power consumption, and tolerance to unexpected power loss.
Table 1. File System Option Groups
Table 1. File System Option Groups
Commercial
Solutions
Adopting commercially available file-
system products can be a rational choice
from an economic standpoint.
These solutions often provide proven
stability and power-loss resilience.
However, most commercial solutions
require high evaluation and licensing
costs, and their deployment involves
significant time overhead due to
contractual and legal processes.
Porting ext4
(Open Source)
Porting an open-source, general-purpose
file system such as ext4 to a low-resource
environment. ext4 offers journaling and
metadata protection mechanisms that
improve resilience to unexpected
power loss.
In resource-constrained environments,
the overhead of journaling and
caching mechanisms typically leads
to resource exhaustion. Implementation
and validation costs are unpredictable,
making this approach impractical.
Porting LOGFS
(Open Source)
Porting an open-source log-structured
file system (LOGFS) designed for
flash storage.
LOGFS inherently supports append-only
writes and offers better power-loss
protection than ext4.
While suitable for flash memory,
LOGFS suffers from excessive
mount-time costs proportional
to the flash size.
Implementation and evaluation
overhead remain uncertain.
Designing a Custom
Log-Structured File System
Designing a proprietary log-structured
file system fully optimized for
the specific constraints and requirements
of the target IoT device.
Based on pre-implementation and cost
analysis, this approach provides the
most economically and technically
feasible solution under the given
resource constraints.

2. Functional Requirements

2.1. Control of Multiple Sensors

The system is compactly designed to control multiple sensors while maintaining wireless communication capabilities. In scenarios where wireless connectivity is unstable or unavailable, the device must be capable of temporarily storing acquired sensor data in non-volatile memory areas such as NAND flash. Subsequently, when wireless conditions improve—or when the device switches to a serial wired connection such as USB—the stored data can be retrieved or transferred reliably.

2.2. Resilience to Unexpected Power Loss

The system must also incorporate a file system with strong resilience to unexpected power loss, particularly in low-power, battery-driven environments. Such resilience is essential to prevent data corruption and ensure continuous data logging and recovery without the need for specialized hardware components.

2.3. Focus of This Study

This paper reports on the design and evaluation of the Data-Access / Temporal-Locality-Optimized / Hardware-Coordinated File System for logging-type IoT devices. The proposed system addresses the above functional requirements by combining efficient data access, time-locality optimization, and hardware-level coordination, providing both robustness and performance under strict resource constraints.
Table 2. Comparison of File Systems
Table 2. Comparison of File Systems
File
System
Unexpec-
ted
Power
Loss
Mount/
Boot
Wear
Leveling
Resource
Size/
Footprint
ext4
FAT
(12,16,32,v)
◯/—
LogFS ◯/—
This
Architecture
MXFS
—/◯ ◯+ ◯+

2.3.1. Notes

  • "◯" indicates that the item is well supported or fully implemented.
  • "—" indicates that the feature is not explicitly supported or not prioritized.
  • "◯+" indicates that the feature is enhanced or specially optimized, providing superior performance compared to standard implementations.
  • "◯/—" indicates conditional or partial support — for example, LogFS offers power-loss resilience under certain conditions but not universally.
Table 3. Small Footprint Commercial File Systems
Table 3. Small Footprint Commercial File Systems
Tuxera Rliance Edge
Log-structured + transactional,
combining journal and
log-structured approaches
https://www.ubiquitous-ai.com/
products/reliance_edge/
Renesas FAT file system
Implements power-failure support
within the scope of the FAT
specification
https://www.renesas.com/jp/ja/
software-tool/fat-file-system
OSS no-OS FatFS
(SD / SPI / RPi Pico)
Power-failure support implemented
within the scope of the FAT
specification
https://github.com/carlk3/
no-OS-FatFS-SD-SPI-RPi-Pico
HITACHI UltraFile
Power-failure support implemented
within the scope of the
FAT specification
https://www.hitachi-solutions-tech.co.jp
/embedded/service/middleware/
ultra_file/index.html

3. Requirements and Characteristics

The target system is designed to operate in an environment with stringent power and resource constraints, while maintaining high performance and reliability. The key requirements and characteristics are as follows:
  • High data access performance: The system must achieve fast read and write access to data for real-time or near–real-time processing of sensor information.
  • Strong resilience to unexpected power loss: Data integrity must be maintained even in the event of sudden power interruptions.
  • Small footprint and low power consumption: Both hardware and software components should be optimized for compactness and minimal energy usage.
  • Multi-sensor control capability: The system must be able to manage and synchronize multiple sensor inputs efficiently.
  • Wireless communication support: Integrated wireless connectivity is required for data transmission and remote monitoring.
  • Over-the-Air (OTA) updates: Secure OTA firmware updates are supported, though this topic is beyond the scope of this paper.
  • Use of SPI/NAND flash memory: SPI/NAND flash is advantageous due to its stable supply chain, ease of integration, large capacity, and broad interchangeability and availability.
  • Temporal data locality: The system should provide access to sensor data stored in non-volatile memory for the past few days, ensuring locality of reference over time.
  • Graceful degradation on power loss: Loss of unsynchronized sensor data during unexpected power failure is considered acceptable.
  • Low-power operation under poor connectivity: The system must continue data storage and deferred transmission even in environments with unstable or limited wireless connectivity.

4. Log-Structured File System

The Log-Structured File System (LFS) is a well-known file system architecture that improves robustness against unexpected power loss by appending both payload and metadata as sequential log entries rather than overwriting existing data. This design minimizes the risk of file-system corruption, such as Master Boot Record (MBR) inconsistencies, by maintaining a write-once pattern.
However, a notable drawback of LFS is that the time required to mount the file system increases proportionally with the capacity of the underlying SPI or NAND flash memory. When system design prioritizes high availability, this mounting latency can become significant, leading to degraded boot performance. For many IoT devices, where rapid startup is critical, this behavior represents a serious limitation.
Furthermore, as a general-purpose file system, LFS typically consumes considerably more system resources compared to domain-specific or custom lightweight implementations. This additional overhead is particularly disadvantageous in ultra-constrained environments where an operating system may not be available or where computational and memory resources are strictly limited.

4.1. Proposed Technique

The proposed technique mitigates these issues by introducing temporally distributed processing for SPI/NAND flash memory access and by employing coordinated software–hardware finite-state machine (FSM) control to manage access permissions across multiple low-resource MPUs.
This coordinated approach effectively eliminates the excessive mount-time problem observed in conventional log-structured file systems, thereby enabling a practical and efficient file system architecture suitable for highly resource-constrained environments.
Figure 3. fsm circuit
Figure 3. fsm circuit
Preprints 182013 g003
Figure 4. timing-chart
Figure 4. timing-chart
Preprints 182013 g004
Figure 5. fsm-coordinate
Figure 5. fsm-coordinate
Preprints 182013 g005
Figure 6. fsm-coordinate-switch
Figure 6. fsm-coordinate-switch
Preprints 182013 g006
Figure 7. protocol-stack
Figure 7. protocol-stack
Preprints 182013 g007

5. Copy-on-Write (COW)

In the proposed system, the flash write timing for user payloads to the non-volatile storage area is determined by the data size after differential compression, with writes performed in page-sized increments of 2,048 bytes.
Sensor data that becomes incomplete due to unexpected power failures or other interruptions is simply skipped during subsequent read operations. Consequently, during write processing, interfaces typically required by general-purpose file systems to ensure data persistence—such as fsync(2)—are neither utilized nor implemented.
In this paper, notations such as read(2) and write(2) denote standard system calls, whereas notations such as append(x), flush(x), and read(x) refer to custom file-system calls defined in the proposed implementation.

6. Fast Mount

After an unexpected power loss, the system must be capable of rapid restart and prompt resumption of data streams to ensure minimal downtime and data continuity.
Figure 8. Fast Mount sequence
Figure 8. Fast Mount sequence
Preprints 182013 g008
Scanning of target blocks/pages = mounting process; minimize DMA overhead.

7. Wear Leveling

Wear-leveling design is essential for long-lifetime architecture.
Figure 9. Wear-Leveling
Figure 9. Wear-Leveling
Preprints 182013 g009

8. Extending Life of NAND/Flash Memory

Delta-compression design is essential for long-lifetime architecture.
Figure 10. Log Lifetime architecture
Figure 10. Log Lifetime architecture
Preprints 182013 g010

9. Unexpected Power Loss

In common open-source file systems (such as FATxx, ext4, and log-structured variants), mechanisms like journaling (as in ext4) and log-structured architectures are well-established approaches to improve resilience against unexpected power loss. However, neither of these solutions is well-suited for low-resource MPUs.
Selecting ext4 often results in resource exhaustion, while adopting a log-structured file system incurs significant mount-time overhead.
Several commercial or open implementations for RTOS environments claim to provide resilience against unexpected power failures. However, most of these systems are essentially derivatives of journaling file systems, typically employing techniques such as compressed transaction logs or distributed writes across multiple blocks or pages. None of these designs are fundamentally robust against unexpected power loss.
The only file system currently suitable for low-footprint IoT devices that offers both compactness and power-failure resistance is Reliance Edge (Tuxera Reliance Edge Tiny Power-Failsafe File System). However, it was deemed economically impractical for this system due to the time and cost overhead associated with its licensing process.
Figure 11. Unexpected Power Loss
Figure 11. Unexpected Power Loss
Preprints 182013 g011

10. Interfaces

Processes related to file names and path resolution associated with file descriptors are excluded to eliminate unnecessary overhead. Timestamps are compressed and stored within the payload header using an initial value and incremental step method, reducing metadata size and access latency.
Table 4. POSIX Interfaces
Table 4. POSIX Interfaces
Interface Description
open Generate or open a file.
close Close a file.
read Read data from a file descriptor into a buffer.
write Write data from a buffer to a file descriptor.
create/release Initialize or release the file system, including mount, unmount, and boot processes.
Table 5. This article Interface
Table 5. This article Interface
Interface Description
append append data to specific layer(flush is automatic).
create/release
instance
Initialize/Release File system, mount/unmount, included boot.

11. DMA Performance

As the measurement results indicate, the memory access performance in both NAND flash read and write operations is proportional to the DMA transfer size.
Table 6. SPI performance
Table 6. SPI performance
AVG Cmd
Bytes
1 2 3 4 5 6 7 8 9 10
2195 write
32

2162

2162

2228

2228

2226

2162

2166

2183

2210

2229
2101 read
32

2067

2055

2192

2104

2116

2086

2092

2045

2133

2129
5632 write
1984

5926

5553

5556

5904

5559

5554

5557

5579

5558

5578
5526 read
1984

5781

5407

5431

5852

5482

5464

5511

5459

5424

5451

13. Conclusion

The management-side module writes bitmap metadata into the headers of each block and page, serving as structural metadata. These bitmap entries are then utilized by the device-side module to enable fast booting and efficient block scanning.
The sensor-side module minimizes the frequency of write operations to non-volatile memory, thereby reducing wear and improving overall system longevity.
Figure 12. Data-Timing Chart
Figure 12. Data-Timing Chart
Preprints 182013 g012

13.1. Operation Under Resource-Constrained Conditions

The system operates with less than 10 KB of RAM, and the file-system code size is constrained to 1 KB or less.

13.2. Deep Sleep Behavior

On the management side, the system spends the majority of its time waiting for flash-memory ownership transfer, being active for only 14.75% of the total cycle.

13.3. Summary

This paper describes a log-structured file system optimized for resource-constrained environments, employing a shared architecture that physically switches between SPI and NAND flash connections. The design leverages cooperative control between hardware and software finite state machines (FSMs) and exploits temporal locality to achieve high efficiency under strict resource limitations.

13.4. Final Thoughts

I believe that a loosely coupled file system for IoT devices—composed of readily available SPI/NAND flash memory and a generic interface microcontroller, without reliance on specialized instructions—offers competitive advantages in specific domains from an economic standpoint, particularly in terms of resilience to unexpected power loss.

Author Contributions

Conceptualization, Methodology, Software, Validation, Formal analysis, Investigation, Resources, Data Curation, Writing-Original Draft, Writing-Review and Editing, Visualization, Supervision, Project administration: D.Sugisawa.

Funding

This research received no external funding.

Conflicts of Interest

The author declares no conflicts of interest.

Use of Artificial Intelligence

The author used a large language model ChatGPT, OpenAI to assist in proofreading, grammar checking, and improving the clarity of expressions. The author reviewed and is responsible for the final content.

References

  1. M. Rosenblum and J. K. Ousterhout, The Design and Implementation of a Log-Structured File System, ACM Transactions on Computer Systems, Vol. 10, No. 1, February 1992, pp. 26–52.
  2. Alahmadi, A., and Chung, T. S. 2023. Crash Recovery Techniques for Flash Storage Devices Leveraging Flash Translation Layer, A Review. Electronics, 12(6), 1422. [CrossRef]
  3. V. D. Tran and D. J. Park, A Survey of Data Recovery on Flash Memory, International Journal of Electrical and Computer Engineering (IJECE), vol. 10, no. 1, pp. 360–376, Feb. 2020. [CrossRef]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.
Copyright: This open access article is published under a Creative Commons CC BY 4.0 license, which permit the free download, distribution, and reuse, provided that the author and preprint are cited in any reuse.
Prerpints.org logo

Preprints.org is a free preprint server supported by MDPI in Basel, Switzerland.

Subscribe

Disclaimer

Terms of Use

Privacy Policy

Privacy Settings

© 2026 MDPI (Basel, Switzerland) unless otherwise stated