Skip to content

hazemawadalla/fdp-flash-gui

Repository files navigation

Flash Storage System GUI with FDP Support

A comprehensive educational GUI application that simulates flash storage systems, including both conventional SSDs and NVMe Flexible Data Placement (FDP) technology.

Development Note: This project was developed through human-AI collaboration, combining domain expertise in flash storage systems with AI-assisted implementation. See Development Attribution for details.

Overview

This application provides an interactive visualization of how flash storage systems work, with a particular focus on comparing conventional SSD operations with the new FDP (Flexible Data Placement) architecture.

New FDP Features

What is FDP (Flexible Data Placement)?

FDP represents a paradigm shift in SSD data management, enabling the host to influence data placement strategies, reducing write amplification (WAF) and improving efficiency.

Key FDP Components

  • Reclaim Unit (RU): Logical grouping of NAND blocks (~GBs in size) where the host writes data
  • Reclaim Unit Handle (RUH): Host interface allowing writes to multiple RUs simultaneously
  • Reclaim Group (RG): Collection of RUs enabling data isolation at the die level
  • Data Streams: Hot (frequent updates), Cold (stable), Mixed access patterns

FDP vs Conventional SSDs

Aspect Conventional SSD FDP SSD
Data Placement Firmware-controlled superblocks Host-controlled via RUHs
Stream Segregation No stream awareness Hot/Cold stream isolation
Garbage Collection High overhead, mixed data Reduced overhead, stream-aware
Write Amplification WAF > 2.0 for random workloads WAF ≈ 1.0-1.2 (optimal segregation)
Multi-tenancy Limited isolation Die-level isolation via RGs

Features

Conventional SSD Operations

  • Write/Read Operations: Basic data storage and retrieval
  • Garbage Collection: Visualize how invalid pages are reclaimed
  • Sequential vs Random Fill: Compare WAF between different write patterns
  • Block Visualization: See real-time block states and page usage
  • LBA Mapping: Understand logical to physical address translation

FDP SSD Operations

  • Stream-Aware Writes: Separate hot and cold data streams via different RUHs
  • Host-Controlled Placement: Direct data to specific RUs for optimal organization
  • Reduced GC Overhead: Experience lower write amplification through stream segregation
  • Multi-RUH Operations: Parallel writes to different RUs for performance
  • RG Visualization: See die-level data isolation in action

Educational Content

  • Comprehensive Guide: Complete explanation of SSD technology
  • FDP Architecture: Detailed breakdown of FDP components and benefits
  • Performance Comparison: Side-by-side comparison of conventional vs FDP approaches
  • Interactive Demonstrations: Real-time visualization of concepts

Architecture

Core Components

  • flash_components.py: Basic flash memory building blocks (Cell, Page, Block, Die, Chip)
  • storage_system.py: Conventional SSD simulation with free block pool and GC
  • fdp_components.py: FDP-specific components (RU, RUH, RG, DataStream)
  • fdp_storage_system.py: Complete FDP storage system implementation
  • lba_mapping.py: Logical to physical address translation

GUI Components

  • main_window.py: Main application window with tabbed interface
  • block_view.py: Conventional SSD block visualization
  • fdp_view.py: FDP-specific visualization (RUHs, RUs, RGs)
  • lba_view.py: LBA mapping visualization
  • ssd_hierarchy_view.py: Physical architecture visualization

Installation

Prerequisites

  • Python 3.7+ (tested with Python 3.8-3.11)
  • Operating System: Windows, macOS, or Linux

Quick Start

  1. Clone the repository:

    git clone https://github.com/hazemawadalla/fdp-flash-gui.git
    cd fdp-flash-gui
  2. Install dependencies:

    pip install -r requirements.txt
  3. Run the application:

    python src/main.py

Manual Dependency Installation

If you prefer to install dependencies manually:

pip install PyQt5>=5.15.0
pip install psutil>=5.8.0

Alternative Installation Methods

Using Virtual Environment (Recommended)

# Create virtual environment
python -m venv fdp_env

# Activate virtual environment
# Windows:
fdp_env\Scripts\activate
# macOS/Linux:
source fdp_env/bin/activate

# Install dependencies
pip install -r requirements.txt

# Run application
python src/main.py

Using the Build Scripts

The project includes cross-platform build scripts:

Windows (PowerShell):

.\build.ps1

Windows (Command Prompt):

build.bat

Cross-platform (Python):

python build.py

Troubleshooting

Common Issues

PyQt5 Installation Issues:

  • On some systems, you may need: pip install PyQt5-tools
  • For Ubuntu/Debian: sudo apt-get install python3-pyqt5
  • For macOS with Homebrew: brew install pyqt5

Permission Issues:

  • Use pip install --user -r requirements.txt for user-only installation

Python Version Issues:

  • Ensure you're using Python 3.7 or newer: python --version
  • You may need to use python3 instead of python

Usage

Basic Usage

python src/main.py

Command Line Options

The application supports several configuration options through build_config.ini or you can modify settings directly in the GUI.

Application Tabs

  1. Conventional SSD: Traditional SSD operations and visualization
  2. FDP SSD: FDP operations with stream-aware data placement
  3. Educational: Comprehensive guide to SSD and FDP technology
  4. Advanced View: Detailed system architecture visualization

FDP Demonstrations

Hot/Cold Stream Segregation

  1. Navigate to the "FDP SSD" tab
  2. Click "Hot/Cold Stream Fill (0xBEEF)" to see stream segregation in action
  3. Observe the WAF staying close to 1.0 due to reduced GC overhead
  4. Watch how hot and cold data are isolated in different RUs

Host-Controlled Data Placement

  1. Use "Write HOT Data (RUH 0)" and "Write COLD Data (RUH 1)" buttons
  2. See how the host directs data to specific RUHs
  3. Observe RU assignments and stream isolation
  4. Compare with conventional SSD random writes

Performance Comparison

  1. Fill conventional SSD with random pattern (high WAF expected)
  2. Fill FDP SSD with mixed streams (low WAF expected)
  3. Compare final WAF values and GC overhead
  4. Analyze the performance benefits of stream segregation

Key Benefits Demonstrated

Write Amplification Reduction

  • Conventional Random Writes: WAF > 2.0 due to fragmentation
  • FDP Stream Segregation: WAF ≈ 1.0-1.2 due to better data organization

Garbage Collection Efficiency

  • Conventional GC: Mixed hot/cold data requires significant valid data movement
  • FDP GC: Stream-homogeneous RUs minimize valid data movement

Host Control Benefits

  • Firmware Limitations: Conventional SSDs rely entirely on firmware algorithms
  • Host Intelligence: FDP allows applications to optimize their own data placement

Technical Implementation

FDP Storage System

The FDP implementation includes:

  • Multi-RUH Support: Up to 8 concurrent RUH handles
  • Die-Level RGs: Reclaim Groups provide isolation at the die level
  • Stream-Aware GC: Garbage collection considers data stream types
  • Dynamic RU Assignment: RUs are assigned to RUHs based on availability
  • Performance Tracking: Detailed statistics on WAF, stream distribution, and efficiency

Visualization Features

  • Real-Time Updates: All components update during operations
  • Color-Coded Streams: Hot (red), Cold (blue), Mixed (purple) data streams
  • Interactive Controls: Direct manipulation of RUH assignments and data placement
  • Performance Metrics: Live WAF tracking and efficiency indicators

Educational Value

This application helps users understand:

  • Flash Memory Fundamentals: How NAND flash works at the physical level
  • SSD Architecture: Complete hierarchy from cells to controllers
  • Write Amplification: Why it occurs and how to minimize it
  • Garbage Collection: The necessity and impact of background maintenance
  • FDP Innovation: How host-controlled placement revolutionizes SSD performance
  • Stream Segregation: The power of separating hot and cold data
  • Future Storage: Next-generation SSD technologies and approaches

Research and Accuracy

The FDP implementation is based on:

  • Samsung FDP Whitepaper specifications
  • NVMe specification details for FDP commands
  • Real-world SSD performance characteristics
  • Academic research on write amplification reduction
  • Industry best practices for stream segregation

The simulator accurately represents the key concepts while simplifying implementation details for educational clarity.

Contributing

Contributions are welcome! Please focus on:

  • Additional FDP features (multi-tenancy, advanced placement hints)
  • Enhanced visualizations
  • Performance optimizations
  • Educational content improvements
  • Real-world workload simulations

Development Attribution

This project represents a collaborative effort between human expertise and AI assistance:

Human Contributions (hazemawadalla)

  • Project conception and vision: Original idea for FDP visualization and educational tool
  • Technical requirements and specifications: Defined FDP architecture requirements and educational goals
  • Domain expertise: Deep understanding of flash storage systems, FDP technology, and SSD internals
  • Architecture decisions: High-level system design, component relationships, and visualization approach
  • Quality assurance: Testing, validation, and ensuring technical accuracy
  • Project management: Organizing development phases and coordinating implementation

AI Assistance (GitHub Copilot)

  • Code implementation: Assisted with Python/PyQt5 development and GUI implementation
  • Documentation: Helped structure and write comprehensive documentation
  • Code organization: Suggested modular architecture and clean code practices
  • Debugging support: Helped identify and resolve implementation issues
  • Educational content: Assisted in creating clear explanations of complex technical concepts

Collaborative Approach

This project demonstrates effective human-AI collaboration in software development:

  • Human-driven: All technical decisions, architectural choices, and domain knowledge came from human expertise
  • AI-enhanced: Implementation speed, code quality, and documentation were significantly improved through AI assistance
  • Iterative refinement: Continuous collaboration to achieve both technical accuracy and educational clarity

The result is a more comprehensive and polished educational tool than would have been possible through either human effort or AI assistance alone.

License

This educational simulation is provided for learning purposes and demonstrates the concepts of flash storage systems and FDP technology.

About

GUI app that simulates flash storage systems, including both conventional SSD and FDP operation

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages