Manuscript Offprint
arXiv:2608.31004Storage-Centric System Designs for Enabling Fast, Efficient, and Low-Cost Genomic and Metagenomic Analyses
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
DISS. ETH NO. 31882
STORAGE-CENTRIC SYSTEM DESIGNS
FOR ENABLING FAST, EFFICIENT, AND LOW-COST GENOMIC AND METAGENOMIC ANALYSES
A thesis submitted to attain the degree of DOCTOR OF SCIENCES
(Dr. sc. ETH Zurich)
presented by
Nika Mansourighiasi
born on 03.06.1993
accepted on the recommendation of
Prof. Dr. Onur Mutlu, examiner
Prof. Dr. Can Alkan, co-examiner
Prof. Dr. Reetuparna Das, co-examiner
Prof. Dr. Wen-mei Hwu, co-examiner
Prof. Dr. Jangwoo Kim, co-examiner
Prof. Dr. Yatish Turakhia, co-examiner
2026
Nika Mansourighiasi: Storage-Centric System Designs for Enabling Fast, Efficient, and Low-Cost Genomic and Metagenomic Analyses, © 2026
Expanding the boundaries of science is challenging in itself.
This dissertation is dedicated to
the resilient students and researchers who push science forward
while navigating additional challenges beyond their scientific endeavors, such as
illness, poverty, bureaucratic hurdles, and the consequences of conflicts not of their making.
I first learned about computer architecture while following my interests in both engineering and art. While pursuing computer architecture further, I came across Professor Onur Mutlu's online lectures as an embodiment of this intersection between engineering and art. Starting from the first lecture, Onur introduced computer architecture through analogies between "how computers and computer architects evolve" and "how art and artists evolve." I immediately knew that this was someone from whom I wanted to learn much more. I am incredibly happy and grateful that I eventually had the opportunity to pursue my PhD with Onur. I arrived in Onur's group with a love for computer architecture and art, and I was pleasantly surprised by everything else I additionally encountered: freedom, borderless curiosity, courage, genuine excitement, strong rigor and care for the craft, inclusion, and diversity. Now, looking back, I realize it was only natural, as these are the very same qualities that both art and science nurture. I extend my deepest gratitude to Onur for creating such a beautiful environment for learning, exploration, and growth. It has been an immense experience and honor to have him as a teacher, and I hope to continue learning from him throughout the rest of my journey.
I am deeply grateful to my close mentors and collaborators. I thank Professor Jisung Park for his strong technical mentorship, friendship, and for believing in me at times I could not do so myself. I am grateful to Dr. Mohammad Sadrosadati for his profound insights and interesting discussions in computer architecture and many other realms. I extend my deep gratitude to Professor Subhasish Mitra for advising me during my visiting research period in his group at Stanford University and for his continual guidance in pursuing bold and ambitious research topics. I am grateful to Professor Nandita Vijaykumar for sharing deep insights about research and being a researcher, which played key roles in my academic journey. I am thankful to Dr. Juan Gomez Luna for his mentorship during my master's studies and his great attention to technical details. I am deeply grateful to Professor Zain Navabi, who was among the first to introduce me to computer architecture as an intersection of engineering and art during my undergraduate studies at the University of Tehran.
I also extend my sincere gratitude to my doctoral exam committee members: Professor Can Alkan, Professor Reetuparna Das, Professor Wen-mei Hwu, Professor Jangwoo Kim, and Professor Yatish Turakhia. Discussions with them and their constructive feedback greatly strengthened this thesis and also sparked interesting ideas for future research. I thank Professor Morteza Aramesh for chairing my doctoral exam.
iii
I thank all current and past members of the SAFARI Research Group for creating such a stimulating, inclusive, and family-like environment for doing research and experiencing life. I am especially thankful to my PhD buddies, Konstantinos Kanellopoulos and Rahul Bera. We started our PhDs at roughly the same time and had the chance to grow together as researchers and friends. Their friendship, support, genuine love for their research craft, and creativity made this long journey not only possible, but also pleasant. I thank Geraldo Francisco de Oliveira Junior for his pure heart and the light and joy he emanates to those around him. I learned a lot from him about processing-in-memory, gym exercises, and the joy of creating and sharing beautiful things (e.g., birthday cakes). I thank Can Firtina for many interesting collaborations, details about k-mers and methylation, and his sense of humor. I thank Abdullah Giray Yaglikci, Nisa Bostanci, Ataberk Olgun, Sahand Divsalar, Haiyu Mao, and Ismail Yuksel for their pure kindness and friendship. I thank Lois Orosa and Yaohua Wang for their kindness, friendship, and wisdom in the early parts of my journey in SAFARI. I thank Rakesh Nadig, Damla Senol Cali, Jeremie Kim, Konstantina Koliogeorgi, Rachata Ausavarung-nirun, and Banu Cavlak for great collaborations and discussions. I also sincerely thank my great mentees for what they achieved and for teaching me how to teach. I am especially thankful to Talu Güloglu, whose hard work and strong motivation (along with frequently humming joyful Christmas songs at any time of the year) played a key role in realizing some of the mechanisms introduced in this thesis, and to Eirini Tzermpou, Marc Rautmann, Timur Eke, and Wonyoung Cheon for the great time we have had working together so far. I also extend my deep gratitude to other past and present SAFARI members, especially Minesh Patel, Hasan Hassan, Christina Giannoula, Harshita Gupta, Mayank Kabra, Andreas Kosmas Kakolyris, Konstantinos Sgouras, Maria Makeenkova, Haocong Luo, Gagandeep Singh, and Zhiheng Yue. I thank Tracy Ewen for her kindness, wisdom, and help with many challenging administrative matters. I also thank Tulasi Blake for her administrative support.
Beyond the lab, I am incredibly fortunate to have amazing friendships that not only supported me immensely throughout my PhD but also deeply enriched my experience of life. I thank Mehrasa for being such a pure, bright, and beautiful expression of friendship in this world. I feel extraordinarily lucky to experience a friendship like ours. Her unwavering presence, even from another continent, has been a key source of my persistence through the ups and downs of research and life. I sincerely thank Yasmin for her kindness, patience, and for teaching me how to study deeply. I am grateful for our journey of studying, growth, and friendship. I thank Hashem for introducing me to computer architecture, many poems, and how computer architecture relates to some of those poems. I find his courage to wonder and his love to learn inspiring, in both research and life. I thank Julia for her joyful kindness, lively creativity, and for sharing her wisdom and support during some of the most difficult times of my life. I am also grateful to the avocado that initially sparked our friendship. I thank Pascal. Without his presence, I might never have started my PhD journey; had I started, I might not have finished it; and had I finished it, I certainly would not have explored life with as much depth along the way. I am grateful to Poulami for her positivity, inspiring strength, and generous advice, ranging from research journey in computer architecture to the housing market in Zurich. I thank Vesna, Michael, Aditi, and Niloofar, who taught me that friendship and profound connections persist through time and distance, even when life does not contain situations for us to meet so frequently.
Most importantly, I thank my family. I am grateful to my mother, Mehrangiz, for everything. Her name in Persian means “the one who inspires kindness and love,” and I think it is
iv such a fitting name. Like rays of sunshine, her love, kindness, strength, and wisdom bring light and warmth into my life. Yet unlike sunshine, which comes and goes, her light and warmth have always been there: constant, unwavering, and present. I thank my father, Amir, for supporting me throughout my education and for the experiences that led to me gaining a deeper understanding of myself. I thank my lovely brother, Ali, for his kindness and for tolerating me, as I was busy studying since the moment he opened his eyes to this world. While I hope to keep studying and learning in the rest of my journey, I dearly hope and will do my best to be a lot more present in our connection. I am grateful to my late grandmother, Narges, and Khaleh Golshan for their pure and strong love. They showed me that true love does not die, and such a fundamental understanding this is. I thank my uncle Masoud, aunt Mina, and cousin Mana for making me feel at home during my undergraduate studies in Tehran (particularly during the snowy seasons). I thank my cousins Arash and Azadeh for their kindness and support through the ups and downs of my life these past years. I thank Arash for introducing me to mindfulness, whose impact probably deserves its own chapter, if not a book. I am grateful to my husband's family, Tuncel, Niyazi, and Hazal, who supported me strongly and kindly throughout my PhD journey.
Finally, I thank my husband, Harun, who is my best friend and collaborator in life and research. I am thankful for his pure kindness, patience, knowledge, imagination, morality, and for teaching me about what I consider the most important element in life: unconditional love.
V
Abstract
Genomic analysis examines the genomic information of living organisms and other biological entities. To analyze this information computationally, a sample of a biological entity's genetic material, typically DNA or RNA (that has been reverse-transcribed into DNA), undergoes a process called sequencing. Sequencing converts the information in DNA molecules to sequences of digital data. Traditional genomics focuses on the genome sequences of an individual (or a small group of individuals) from a single known species, whereas metagenomic analysis examines genome sequences from multiple species in a shared environment. Genomic and metagenomic analyses play critical roles in many fields, such as precision medicine, urgent clinical settings, and discovering early warnings of communicable diseases, ensuring food safety through pathogen monitoring, agriculture, and scientific discovery. The adoption of genomic and metagenomic analyses has been rapidly increasing in recent years, driven by their critical importance and the rapid advancement of sequencing technologies. These factors have led to exponential growth in sequence data generation. Due to the challenges of analyzing and storing massive volumes of this data, significant efforts have been made in accelerating (meta)genomic analyses and storing sequence data in compressed forms. Despite the benefits of these techniques in improving the analysis and storage of large-scale sequence data, we identify two major outstanding problems in accessing stored sequence data and feeding it to the analysis units: (i) the overhead of moving large amounts of low-reuse data from the storage system and the unnecessary burden on the rest of the system (e.g., main memory and computation units), and (ii) the data preparation bottleneck, where compressed sequence data needs to be first decompressed and formatted before it can be analyzed.
In this dissertation, we aim to (i) alleviate the data movement overheads of genomics and metagenomics analyses from the storage system and reduce their overall computational burden, and (ii) mitigate the data preparation bottleneck while achieving high performance, energy efficiency, and compression ratios. We aim for our proposed designs to be lightweight so that they can seamlessly integrate with a broad range of (meta)genomic analysis systems.
To alleviate the overheads of moving large amounts of low-reuse (meta)genomic data from the storage system and reduce the overall computational burden, we propose storage-centric computing (SCC) systems for (meta)genomics. SCC refers to processing data inside the storage device, either on the SSD controller or on the flash dies. SCC can be a fundamental solution by processing data where it originally resides. To mitigate the data preparation bottleneck, we propose an algorithm-architecture co-design for highly-compressed storage and high-performance access of sequence data.
First, we propose GenStore, the first in-storage processing system designed for genomic analysis. We design low-cost in-storage accelerators to accurately filter out genomic data that does not require expensive computation during genomic analysis, directly inside the storage device. Second, we introduce MegIS, the first in-storage processing system designed to significantly reduce the data movement overhead of the end-to-end metagenomic analysis pipeline. The key idea of MegIS is to enable cooperative SCC for metagenomics, where we do not solely focus on processing inside the storage system, but instead, we capitalize on the strengths of processing both inside and outside the storage system. Third, we propose GRAINS, the first system for analysis on large-scale (meta)genomic sequence graphs in stor-
vi age. Through our detailed examination of typical analysis pipelines on large-scale sequence graphs, we perform storage-aware algorithm-architecture co-design to (i) make the pipelines more storage-friendly and (ii) improve performance, energy-efficiency, and cost-effectiveness via in-storage and in-flash processing. Fourth, to mitigate the data preparation bottleneck, we introduce SAGe, an algorithm-architecture co-design for highly-compressed storage and high-performance access of large-scale sequence data. SAGe's key insight is that the information encoded in genomic data follows specific trends, shaped by factors such as sequencing technology and common genetic phenomena. By carefully exploiting these characteristics to synergistically co-design algorithms and hardware, SAGe achieves high compression ratios, comparable to state-of-the-art genomic compressors, while enabling low decompression latencies, using only lightweight hardware and efficient streaming accesses. Finally, we demonstrate how our proposed designs can be put together in a unified system at low cost.
We demonstrate that by designing storage-centric systems that efficiently (i) analyze (meta)genomic data inside the storage system, and (ii) enable highly-compressed storage and high-performance access of large-scale sequence data, we can alleviate data movement overheads from the storage system, reduce the overall computational burden, and mitigate the data preparation bottleneck. We demonstrate that the proposed systems significantly improve system performance, energy efficiency, and system cost-efficiency of (meta)genomic analysis. We hope that the storage-centric systems proposed in this dissertation facilitate the broader adoption of (meta)genomic analyses and inspire future research to fundamentally improve the performance, energy efficiency, and cost-effectiveness of other data-intensive application domains related to health and life sciences.
vii
Zusammenfassung
Die Genomanalyse befasst sich mit der genomischen Information lebender Organismen sowie anderer biologischer Entitäten. Für die computergestützte Analyse wird zunächst eine Probe des Erbmaterials, typischerweise DNA oder RNA (die zuvor durch reverse Transkription in DNA überführt wurde), sequenziert. Die Sequenzierung überführt die in den DNA-Molekülen enthaltene Information in digitale Sequenzdaten. Die klassische Genomik befasst sich mit den Genomsequenzen eines Individuums (oder einer kleinen Gruppe von Individuen) einer einzelnen, bekannten Art. Die Metagenomik hingegen untersucht Genomsequenzen mehrerer Arten aus einer gemeinsamen Umgebung. Genom- und Metagenomanalysen spielen in vielen Bereichen eine entscheidende Rolle: in der Präzisionsmedizin, in der klinischen Akutversorgung, bei der frühzeitigen Erkennung von Warnsignalen für übertragbare Krankheiten, in der Lebensmittelsicherheit durch die Überwachung von Krankheitserregern, in der Landwirtschaft und beim wissenschaftlichen Erkenntnisgewinn.
Der Einsatz genomischer und metagenomischer Analysen hat in den vergangenen Jahren stark zugenommen, was sowohl auf ihre grosse Bedeutung in zahlreichen Anwendungsbereichen als auch auf die rasanten Fortschritte bei den Sequenzierungstechnologien zurückzuführen ist. Dadurch ist das Volumen der erzeugten Sequenzdaten exponentiell gewachsen. Angesichts der Herausforderungen bei der Analyse und Speicherung dieser enormen Datenmengen wurden zahlreiche Ansätze entwickelt, um (Meta-)Genomanalysen zu beschleunigen und Sequenzdaten komprimiert zu speichern. Trotz dieser Fortschritte in der Analyse und Speicherung (meta-)genomischer Daten bestehen beim Zugriff auf gespeicherte Sequenzdaten und bei deren Bereitstellung für die Analyseeinheiten weiterhin zwei wesentliche Probleme: (i) der Aufwand für den Datentransfer grosser Mengen von Daten mit geringem Wiederverwendungsgrad aus dem Speichersystem, der andere Systemkomponenten, etwa Hauptspeicher und Recheneinheiten, unnötig belastet, und (ii) der Engpass bei der Datenvorbereitung: Komprimierte Sequenzdaten müssen vor der Analyse zunächst dekomprimiert und formatiert werden.
Diese Dissertation verfolgt daher zwei Ziele: (i) den durch den Transfer genomischer und metagenomischer Daten aus dem Speichersystem entstehenden Aufwand sowie die gesamte Rechenlast zu reduzieren und (ii) den Engpass bei der Datenvorbereitung zu entschärfen, bei gleichzeitig hoher Leistung, Energieeffizienz und hohen Kompressionsverhältnissen. Die vorgeschlagenen Ansätze sollen dabei leichtgewichtig sein, sodass sie sich nahtlos in eine Vielzahl von Systemen zur (Meta-)Genomanalyse integrieren lassen.
Um den Aufwand für den Transfer grosser Mengen (meta-)genomischer Daten mit geringem Wiederverwendungsgrad aus dem Speichersystem sowie die gesamte Rechenlast zu reduzieren, entwickeln wir speicherzentrierte Rechensysteme (Storage-Centric Computing, SCC) für die (Meta-)Genomanalyse. Bei SCC werden die Daten direkt im Speichergerät verarbeitet, entweder auf dem SSD-Controller oder direkt auf den Flash-Dies. SCC bietet hierfür einen grundlegenden Lösungsansatz, da die Daten dort verarbeitet werden, wo sie gespeichert sind. Um zudem den Engpass bei der Datenvorbereitung zu entschärfen, entwickeln wir einen Algorithmus-Architektur-Co-Design-Ansatz für hochkomprimierte Speicherung und leistungsfähigen Zugriff auf Sequenzdaten.
Erstens stellen wir GenStore vor, das erste In-Storage-Processing-System für die Genomanalyse. Wir entwerfen kostengünstige In-Storage-Beschleuniger, die direkt im Speichergerät genomische Daten zuverlässig herausfiltern, deren weitere Analyse keine aufwendigen Berechnungen erfordert. Zweitens präsentieren wir MegIS, das erste In-Storage-Processing-System, das den Datentransfer über die gesamte Metagenomik-Analysepipeline hinweg deutlich reduziert. Die Kernidee von MegIS ist ein kooperativer SCC-Ansatz für die Metagenomik: Anstatt die Verarbeitung ausschliesslich in das Speichersystem zu verlagern, nutzen wir gezielt die jeweiligen Stärken der Verarbeitung sowohl innerhalb als auch ausserhalb des Speichersystems.
Drittens schlagen wir GRAINS vor, das erste System zur Analyse sehr grosser (meta-)genomischer Sequenzgraphen direkt im Speichergerät. Auf Grundlage einer detaillierten Untersuchung typischer Analysepipelines auf grossen Sequenzgraphen verfolgen wir einen auf das Speichersystem abgestimmten Algorithmus-Architektur-Co-Design-Ansatz, um (i) die Pipelines für die Verarbeitung im Speichersystem zu optimieren und (ii) Leistung, Energieeffizienz und Kosteneffizienz durch In-Storage- und In-Flash-Processing zu verbessern.
Viertens stellen wir SAGe vor, einen Algorithmus-Architektur-Co-Design-Ansatz für die hochkomprimierte Speicherung und den leistungsfähigen Zugriff auf grosse Mengen von Sequenzdaten, mit dem wir den Engpass bei der Datenvorbereitung entschärfen. SAGe beruht auf der zentralen Erkenntnis, dass die in genomischen Daten kodierte Information charakteristische Muster aufweist, die etwa durch die Sequenzierungstechnologie und typische genetische Phänomene geprägt werden. Durch die gezielte Nutzung dieser Eigenschaften und das Co-Design von Algorithmen und Hardware erzielt SAGe Kompressionsverhältnisse, die mit denen modernster genomischer Kompressionsverfahren vergleichbar sind, und ermöglicht zugleich geringe Dekompressionslatenzen. Dabei kommt SAGe mit leichtgewichtiger Hardware und effizienten Streaming-Zugriffen aus. Schliesslich zeigen wir, wie sich unsere Ansätze kostengünstig in einem Gesamtsystem integrieren lassen.
Wir zeigen, dass speicherzentrierte Systeme, die (i) (meta-)genomische Daten effizient direkt im Speichersystem analysieren und (ii) eine hochkomprimierte Speicherung und einen leistungsfähigen Zugriff auf grosse Mengen an Sequenzdaten ermöglichen, den durch Datentransfers aus dem Speichersystem entstehenden Aufwand verringern, die gesamte Rechenlast reduzieren und den Engpass bei der Datenvorbereitung entschärfen. Die vorgeschlagenen Systeme verbessern Systemleistung, Energieeffizienz und Kosteneffizienz der (Meta-)Genomanalyse erheblich. Wir hoffen, dass die in dieser Dissertation vorgestellten speicherzentrierten Systeme den breiteren Einsatz genomischer und metagenomischer Analysen erleichtern und künftige Forschung dazu anregen, auch die Leistung, Energieeffizienz und Kosteneffizienz anderer datenintensiver Anwendungsbereiche der Gesundheits- und Lebenswissenschaften grundlegend zu verbessern.
ix
Contents
Acknowledgments iii
Abstract vi
Zusammenfassung viii
List of Figures xvi
List of Tables xx
1 Introduction 1
1.1 Problem Discussion 4
1.2 Goal 7
1.3 Thesis Statement 7
1.4 Our Approach 7
1.4.1 In-Storage Filters for Genomic Analysis 8
1.4.2 Cooperative In-Storage Processing for Metagenomic Analysis 9
1.4.3 Storage-Aware Algorithm-Architecture Co-Design for Graph-Based Genomic and Metagenomic Analyses 10
1.4.4 Algorithm-Architecture Co-Design for Highly-Compressed Storage and High-Performance Access of Sequence Data 11
1.4.5 Putting It All Together 12
1.5 Contributions 13
1.6 Dissertation Outline 16
2 Background 17
2.1 Solid State Drive Organization 17
2.2 Genomic and Metagenomic Workflows 19
2.2.1 Sequencing 20
X xi
2.2.2 Basecalling ..... 22
2.2.3 Analysis ..... 23
2.3 Genomic Analysis ..... 23
2.3.1 Read Mapping Process ..... 23
2.3.2 Pre-Alignment Read Filtering ..... 25
2.3.3 Further Steps in Analysis ..... 26
2.3.4 Importance of High-Performance and Energy-Efficient Genomic Analysis ..... 26
2.4 Metagenomic Analysis ..... 27
2.4.1 Presence/Absence Identification ..... 27
2.4.2 Abundance Estimation ..... 28
2.4.3 Importance of High-Performance and Energy-Efficient Metagenomic Analysis ..... 29
2.5 Graph-Based Genomic and Metagenomic Analysis ..... 30
2.5.1 Importance of High-Performance and Energy-Efficient Graph-Based Genomic Analysis ..... 33
2.5.2 Unique Characteristics of Genome Graphs ..... 33
2.6 Storing and Compressing Sequence Data ..... 34
2.7 Summary and Outlook ..... 37
3 Related Work ..... 39
3.1 Techniques for Reducing Storage I/O Overheads ..... 39
3.1.1 Reducing the I/O System Stack Overheads ..... 39
3.1.2 User-Controlled Data Placement ..... 41
3.1.3 Request Batching, Scheduling, and Prefetching ..... 41
3.1.4 Caching and Buffering ..... 41
3.1.5 Data Reduction ..... 42
3.1.6 Hybrid Storage and Memory Systems ..... 42
3.1.7 Memory and Storage Disaggregation and Expansion ..... 43
3.1.8 I/O Amplification Reduction ..... 43
3.1.9 Improving the Performance of the Storage Device ..... 44
3.1.10 Storage-Centric Computing ..... 45
3.2 Memory-Centric Computing ..... 47
3.3 Accelerating Genomic Analysis ..... 48
3.4 Accelerating Metagenomic Analysis ..... 49
3.5 Accelerating Graph-Based Genomics and Metagenomics Analysis ..... 49 xii
3.6 Compressing Sequence Data ..... 51
4 GenStore: In-Storage Filtering for Genomic Analysis ..... 52
4.1 Motivational Studies ..... 52
4.1.1 Methodology ..... 52
4.1.2 Results & Analysis ..... 54
4.1.3 Our Goal ..... 56
4.2 GenStore ..... 56
4.2.1 Overview ..... 57
4.2.2 GenStore-EM for Exactly-Matching Reads ..... 58
4.2.3 GenStore-NM for Non-Matching Reads ..... 63
4.2.4 GenStore Flash Translation Layer (FTL) ..... 69
4.3 Evaluation Methodology ..... 70
4.4 Evaluation ..... 72
4.4.1 Area and Power Analysis ..... 72
4.4.2 GenStore-EM Analysis ..... 73
4.4.3 GenStore-NM Analysis ..... 76
4.4.4 Energy Analysis ..... 77
4.5 Discussion ..... 79
4.6 Summary ..... 80
4.6.1 Impact and Influence ..... 80
5 MegIS: Cooperative In-Storage Processing for Metagenomic Analysis ..... 81
5.1 Motivational Analysis ..... 81
5.1.1 Data Movement Overheads ..... 81
5.1.2 Our Goal ..... 83
5.2 MegIS ..... 84
5.2.1 Overview ..... 84
5.2.2 Step 1: Preparing the Input Queries ..... 85
5.2.3 Step 2: Finding Candidate Species ..... 88
5.2.4 Step 3: Abundance Estimation ..... 92
5.2.5 MegIS FTL ..... 93
5.2.6 Storage Interface Commands ..... 95
5.2.7 Multi-Sample Analysis ..... 95
5.3 Evaluation Methodology ..... 96
5.4 Evaluation ..... 98 xiii
5.4.1 Presence/Absence Identification Analysis ..... 98
5.4.2 Abundance Estimation Analysis ..... 103
5.4.3 Multi-Sample Use Case ..... 104
5.4.4 Area and Power ..... 104
5.4.5 Energy ..... 105
5.5 Summary ..... 106
5.5.1 Impact and Influence ..... 106
6 GRAINS: Storage-Aware Algorithm-Architecture Co-Design for Graph-Based Genomic and Metagenomic Analysis ..... 108
6.1 Motivational Analysis ..... 108
6.1.1 Data Movement Overheads ..... 108
6.1.2 Alleviating Data Movement Overheads ..... 111
6.2 GRAINS ..... 112
6.3 Data Structures ..... 113
6.4 Input Query Processing ..... 115
6.5 Graph Query ..... 116
6.6 FTL Integration and Reliability Support ..... 119
6.7 Interface Commands ..... 121
6.8 Deployment and Integration ..... 121
6.9 Methodology ..... 122
6.10 Evaluation ..... 124
6.10.1 Performance ..... 124
6.10.2 Area and Power Overheads ..... 128
6.10.3 Energy ..... 129
6.11 Summary ..... 130
6.11.1 Impact and Influence ..... 130
7 SAGe: Algorithm-Architecture Co-Design for Highly-Compressed Storage and High-Performance Access of Sequence Data ..... 132
7.1 Motivational Analysis ..... 132
7.1.1 Data Preparation Bottleneck in Genome Sequence Analysis Accelerators ..... 132
7.1.2 Challenges and Goal ..... 133
7.2 SAGe: Overview ..... 135
7.3 SAGe: Detailed Design ..... 136
7.3.1 Compression Algorithm and Data Structures ..... 136 xiv
7.3.2 Hardware for Data Preparation ..... 144
7.3.3 Data Layout ..... 146
7.3.4 Interface Commands ..... 146
7.4 Case Studies of SAGe's Hardware Integration ..... 147
7.5 Methodology ..... 148
7.6 Evaluation ..... 150
7.6.1 Performance ..... 150
7.6.2 Area and Power ..... 152
7.6.3 Energy ..... 153
7.6.4 Compression Ratio ..... 154
7.6.5 Compression Time ..... 155
7.6.6 Resource Requirements ..... 156
7.7 Summary ..... 157
7.7.1 Impact and Influence ..... 157
8 Putting It All Together ..... 158
8.1 Motivation for Combining the Proposed Designs into a Unified System ..... 158
8.1.1 Storage-Centric Computing on Compressed Data ..... 158
8.1.2 Facilitating Wider Adoption ..... 159
8.2 Design of the Unified System ..... 159
8.2.1 Hardware Units ..... 159
8.2.2 FTL ..... 159
8.2.3 Interface Commands ..... 160
8.3 Cost-Benefit Analysis of the Unified System ..... 160
9 Conclusions and Future Directions ..... 163
9.1 Future Research Directions ..... 165
9.1.1 Expanding the Capabilities of In-Storage Filters for Genomic Data ..... 165
9.1.2 Expanding the Capabilities of Storage-Centric Systems for Metagenomic Analysis ..... 166
9.1.3 Storage-Centric Computing for Other Biological Data ..... 167
9.1.4 Storage-Centric Designs for Constructing and Updating Large-Scale Sequence Databases and Graphs ..... 167
9.1.5 Highly-Compressed Storage and High-Performance Access of Other Biological Data Types ..... 168
9.1.6 Genomic Privacy in the Era of Storage-Centric Computing ..... 169
XV
9.1.7 Facilitating Portable Genomic and Metagenomic Analysis ..... 170
9.1.8 Combining Memory-Centric and Storage-Centric Computing for Efficient Biological Sequence Analysis ..... 170
9.1.9 From New Technologies to New Capabilities in Health, Life Sciences, and Beyond ..... 171
9.2 Concluding Remarks ..... 171
A Other Works of the Author 172
A.1 Architectures and Algorithms for Health and Life Sciences ..... 172
A.1.1 Other Work on Storage-Centric Computing for Genomics and Metagenomics ..... 172
A.1.2 Other Algorithm-Architecture Co-Designs ..... 172
A.1.3 Algorithms and Software in Genomics ..... 173
A.1.4 Architecture for Health (Arch4Health) Initiative ..... 173
A.2 Data-Centric Computing ..... 178
A.2.1 Other Works on Storage-Centric Computing ..... 178
A.2.2 Memory-Centric Computing and 3D Integration Technologies ..... 178
A.3 Optimizing Memory and Storage Systems ..... 178
A.4 Other Algorithm-Architecture Co-Designs ..... 179
B Complete List of the Author's Contributions 180
B.1 Major Contributions Led by the Author ..... 180
B.2 Summary and Initiative Papers Led by the Author ..... 181
B.3 Co-supervised Contributions ..... 181
B.4 Other Contributions ..... 182
B.5 Open Source Tools and Repositories ..... 185
C Curriculum Vitae of the Author 186
Bibliography 203
List of Figures
1.1 Growth rate (log scale) of the Sequence Read Archive (SRA) [1] data volumes compared to Moore's Law projections [2,3]. ..... 2
1.2 Effect of data preparation (i.e., decompressing and formatting genomic sequence data before analysis) on genome analysis performance. ..... 6
1.3 Overview of the proposed designs and the chapters in which they are discussed. 13
2.1 Organizational overview of a modern SSD. ..... 18
2.2 Overview of a typical genomic workflow. ..... 20
2.3 Overview of a typical read mapping process. ..... 24
2.4 Overview of metagenomic analysis. ..... 27
2.5 An example de Bruijn graph (DBG) and its compacted form. ..... 31
2.6 High-level overview of graph-based genome analysis. ..... 32
2.7 Overview of genomics-specific compression. ..... 36
4.1 Execution time of read mapping with four different storage configurations. ..... 54
4.2 Overview of GenStore. ..... 57
4.3 Overview of the key idea of GenStore-EM. ..... 60
4.4 Overview of GenStore-EM. ..... 61
4.5 Alignment probability as a function of the number of seeds per read in a long read mapping use case. ..... 65
4.6 Overview of GenStore-NM. ..... 66
4.7 Chaining processing element (PE) in GenStore-NM. ..... 68
4.8 GenStore-EM performance under different SSDs, when integrated with a (a) software read mapper (b) hardware read mapper. ..... 73
4.9 GenStore-EM performance versus input size and exact match rate, when integrated with (a) software read mapper (b) hardware read mapper. ..... 75
4.10 GenStore-NM performance under different SSDs, when integrated with (a) software read mapper (b) hardware read mapper. ..... 76
xvi xvii
4.11 GenStore-NM performance versus input size and read alignment rate, when integrated with (a) software read mapper (b) hardware read mapper. ..... 77
4.12 Energy breakdown of different systems for (a) short read mapping and (b) long read mapping. ..... 78
4.13 Energy breakdown of different systems, excluding the host CPU, for (a) short read mapping and (b) long read mapping. ..... 79
5.1 Performance of (a) Random-Qry and (b) Stream-Qry under different storage configurations and database sizes. ..... 82
5.2 Overview of MegIS. ..... 85
5.3 Overview of the k-mer extraction process in MegIS. ..... 87
5.4 Overview of the intersection finding process in MegIS. ..... 89
5.5 Overview of sketch data structures. ..... 91
5.6 Overview of the TaxID retrieval process in MegIS. ..... 92
5.7 Merging the reference indexes to facilitate read mapping during abundance estimation. ..... 93
5.8 Data layout and mapping data structure in MegIS. ..... 94
5.9 Timeline of analyzing single or multiple samples in the baseline and MegIS. ..... 96
5.10 Speedup for different SSDs and input sets. ..... 98
5.11 Time breakdown with different SSDs for CAMI-L. ..... 99
5.12 Speedup with different database sizes. ..... 100
5.13 Speedup with different number of SSDs. ..... 100
5.14 Speedup with different main memory capacities. ..... 101
5.15 Speedup with varying SSD internal bandwidth. ..... 102
5.16 Speedup of MegIS on a cost-optimized system over baselines on cost-performance-optimized systems. ..... 102
5.17 Speedup over a PIM-accelerated baseline [4]. ..... 103
5.18 Speedup for abundance estimation. ..... 103
5.19 Speedup for multi-sample analysis. ..... 104
5.20 Energy breakdown of different systems (a) with and (b) without host CPU energy. 106
6.1 Normalized throughput of (i) Fulgor and (ii) MetaGraph under different storage configurations and query sizes. ..... 109
6.2 Normalized throughput of (i) Fulgor and (ii) MetaGraph under different storage configurations and graph sizes. ..... 109
6.3 Overview of GRAINS. ..... 113
6.4 Overview of the DBG structures and k-mer query. ..... 114 xviii
6.5 Graph color encoding used in GRAINS. ..... 115
6.6 Overview of GRAINS's query processing. ..... 116
6.7 Overview of GRAINS's Offsets lookups. ..... 117
6.8 Overview of GRAINS's Strings lookups. ..... 118
6.9 Overview of GRAINS's Colors lookups. ..... 119
6.10 Speedups with different input query sets and SSDs. ..... 124
6.11 Speedup of GRAINS on a low-cost system, i.e., GRN($), over baselines on low-cost and performance-optimized systems. ..... 125
6.12 Execution time breakdown. ..... 126
6.13 Ablation tests of different GRAINS optimizations. ..... 126
6.14 Speedups with different numbers of SSDs. ..... 127
6.15 Speedup over IdealAccMem. ..... 128
6.16 Speedups for read mapping. ..... 128
6.17 Speedups for read mapping with alignment. ..... 128
6.18 Energy breakdown of different systems (a) with and (b) without host CPU energy. 130
7.1 End-to-end throughput for different read sets. ..... 133
7.2 High-level overview of SAGe's (a) data preparation and (b) data compression and storage. ..... 136
7.3 Overview of SAGe's compression mechanism. ..... 137
7.4 Distribution of (a) #bits needed to store the delta-encoded mismatch positions, and (b) mismatch counts per read. Cumulative distribution of (c) indel block lengths, (d) #bases in indel blocks of different lengths. ..... 139
7.5 Example of decoding mismatch positions for long reads in SAGe. ..... 141
7.6 Example of a chimeric read. ..... 142
7.7 Distribution of #bits needed to store the delta-encoded matching position. ..... 143
7.8 Overview of SAGe's hardware. ..... 145
7.9 SAGe's integration with genome analysis systems. ..... 147
7.10 End-to-end speedup for different read sets. ..... 151
7.11 Data preparation speedup. ..... 152
7.12 End-to-end speedup with different SSD counts. ..... 152
7.13 End-to-end energy reduction. ..... 153
7.14 Energy breakdown of different systems. ..... 153
7.15 Effect of different SAGe optimizations on the storage size of mismatch information. ..... 154
7.16 Normalized compression time. ..... 155 xix
8.1 End-to-end speedup for different read sets. ..... 162
List of Tables
4.1 Fraction of aligning reads in various read mapping use cases with short and long reads. ..... 64
4.2 Area and power breakdown of GenStore's logic ..... 72
5.1 SSD configurations. ..... 97
5.2 Area and power consumption of MegIS's logic. ..... 105
6.1 Evaluated SSD configurations. ..... 123
6.2 Area and power consumption of GRAINS's logic units. ..... 129
7.1 Area and power consumption of SAGe's logic. ..... 153
7.2 Compression ratios for different read sets. ..... 154
7.3 Comparison of decompression tools. ..... 156
XX
Chapter 1
Introduction
Genome sequence analysis, which examines the genomic information of living organisms and other biological entities, plays an important role in many fields, such as personalized medicine [5-33], tracing outbreaks of communicable diseases [34-59], cancer research [60-106], ensuring food safety through pathogen monitoring [107,108], agriculture [109-124], scientific discovery [125-127], biodiversity conservation [128,129], evolutionary biology [130-147], and antimicrobial resistance surveillance [148-150]. To analyze genomic information computationally, a sample of an organism's or a biological entity's genetic material, typically DNA or RNA that has been reverse-transcribed into DNA [151,152], undergoes a process called sequencing [153-196]. Sequencing converts the information from DNA molecules to digital data. Current sequencing technologies cannot sequence long DNA molecules end-to-end. Instead, state-of-the-art sequencers generate randomly- and redundantly-sampled smaller and inexact DNA fragments, called reads. Sets of genomic reads (called read sets) are then used in genomic analysis. Traditional genomics analyzes genome sequences of a genomic sample from an individual (or a small group of individuals) of the same known species.
Since sometimes a sample contains organisms or biological entities with different species present in a common environment (e.g., human gut, soil, or oceans), genomic analysis is complemented by metagenomic analysis [122, 126, 127, 148, 197–203]. Metagenomic analysis refers to the study of the genome sequences of various organisms or biological entities with different species present in a common environment. Since metagenomics deals with genome sequences whose species are not known in advance in many cases, it requires comparisons of the target sequences against large databases of many reference genomes. Metagenomics has led to groundbreaking advances in many fields, such as precision medicine [204–209], urgent clinical settings [26–28, 210–220], understanding microbial diversity of an environment [148, 198–200, 202, 221, 222], discovering early warnings of communicable diseases [223–226], and outbreak tracing [59, 227–229].
CHAPTER 1. INTRODUCTION
2
As genomic databases grow in complexity, graph-based (meta)genomic analysis has emerged as a powerful approach for querying of massive and complex (meta)genomic databases [230–237]. Sequences in a graph are represented by graph walks [231]. Genome graphs provide two fundamental benefits, making them indispensable, particularly in modern, population-scale genomics [148, 232, 238–240]. First, the graph topology, along with its associated metadata¹ offers vastly strong expressive power [239–242]. A graph naturally encodes the evolutionary history and diversity of the organisms in a database, revealing their shared and distinct sequences [237, 239, 241, 243]. This leads to reduced bias and improved analysis accuracy. For example, genome graphs improve disease diagnosis by capturing population-specific variants often missed by traditional, linear sequences [239, 244, 245]. Second, genome graphs leverage the inherent redundancy of genomic data to avoid redundant computation on shared sequences. This is because shared genomic regions across database entries are stored only once and do not need to be queried separately.
The adoption of genomic and metagenomic analyses has been rapidly increasing in recent years [26–28, 30–32, 54, 59, 205, 246–249], driven by their critical importance and the rapid advancement of sequencing technologies (i.e., reduced costs and increased throughput [250]). These factors have led to exponential growth in genomic and metagenomic sequence data generation. Figure 1.1 demonstrates an example of the growth of the Sequence Read Archive (SRA) [1] data volumes after the breakthroughs in low-cost, high-throughput sequencing, highlighting the significantly larger growth rate of sequence data (by more than three orders of magnitude) compared to Moore’s Law projections [2, 3].² Analyzing large-scale sequence data

Figure 1.1: Growth rate (log scale) of the Sequence Read Archive (SRA) [1] data volumes compared to Moore’s Law projections [2, 3].
¹Metadata can include the original species or samples of a graph node’s sequence [230, 231], associations with patient outcomes [232], and more.
²Please note that this figure only shows data size in a major public repository (SRA). With advances in sequencing, a growing, large volume of data now resides in private repositories whose sizes are not publicly available.
CHAPTER 1. INTRODUCTION
3
on conventional, general-purpose systems poses significant challenges due to three reasons, as we describe next.
First, the sequencing and basecalling steps for a sample are usually one-time tasks [251–253]. In many cases, the reads from a single sequenced sample can be analyzed by multiple studies or at different times in the same study. This is because (i) there are many heuristics and parameters involved in (meta)genomics, which need to be tuned to achieve a desired sensitivity-specificity tradeoff [254], (ii) there are different databases created with different parameters or genomes that need to be used for achieving different accuracy goals [255], and (iii) a sample can be analyzed several times with reference genomes or databases that are regularly updated, personalized, or task-specific [250, 255–262].
Second, even when performing the (meta)genomic analysis step only once for a sample, the throughput of this step is significantly lower than the sequencing throughput of modern sequencers (e.g., [263]). While sequencing one sample can take a long time, a single sequencing machine can sequence many samples from different sources in parallel [252, 264], achieving very high throughput. As an example, our analysis with a state-of-the-art metagenomic tool [265] shows that analyzing the data, sequenced and basecalled by a sequencer in 48 hours, takes 38 days on a high-end server node (detailed configurations in Chapter 5). Such long analysis poses serious challenges, specifically for time-critical use cases that require fast decision making (e.g., clinical settings [210] and timely surveillance of infectious diseases [227]). Since the growth rate of sequencing throughput is higher than Moore's Law [3, 250], this already large gap between sequencing and analysis throughput is widening [252, 266–268], and simply scaling up traditional systems for analysis is not efficient.
Third, the development of sequencing technologies that enable analysis during sequencing [269–275] increasingly necessitates the need for fast analysis that can keep up with sequencing throughput. The possibility to perform analysis during sequencing enables new features, where sequencing can be dynamically stopped once a target pathogen is identified, or sufficient coverage is reached [34, 269–271, 274, 276–288]. Therefore, to achieve this feature, the analysis throughput must match or exceed the sequencing throughput. Otherwise, the analysis step bottlenecks the entire process and makes this feature impractical in time-critical settings.
The analysis step is also the primary energy bottleneck in the workflow, and optimizing its efficiency is vital as sequencing technologies rapidly evolve. For example, a high-end sequencer [263] uses 405 KJ to sequence and basecall 100 million reads, with 92.5 Mbp/s throughput and 2,500 W power consumption [263]. In contrast, processing this dataset on a commodity server (detailed configurations in Chapter 5) requires 675 KJ, accounting for 63% of the total energy of the workflow. The need to enhance the analysis' energy efficiency is further increas-ing for two reasons. First, sequencing efficiency has been continually improving. For example, a new version of Illumina sequencer from 2023 [263] provides 44× higher throughput at only 1.5× higher power consumption compared to an older version [289] from 2020, resulting in much better sequencing energy efficiency. Therefore, simply relying on scaling up commodity systems to improve the analysis throughput worsens the energy bottleneck. Second, the increased adoption of compact portable sequencers [290] for on-site (meta)genomics (e.g., in remote locations [291] or for personalized bedside care [246]) offers high-throughput sequencing with low energy costs. The drive towards portability further amplifies the need for energy-and cost-effective analysis that can match the portability and convenience of these sequencers.
Due to the challenges of analyzing and storing massive volumes of genomic and metagenomic data, significant efforts have been made in two directions: (i) Accelerating genomic and metagenomic analyses, and (ii) Storing genomic and metagenomic data in compressed forms.
Accelerating Genomic and Metagenomic Analysis. There have been extensive efforts to improve the performance and energy efficiency of genomic and metagenomic analysis. For genomics, many works propose efficient heuristics and algorithmic optimizations (e.g., [238, 292–320]), hardware accelerators (e.g., [253, 272, 321–415]), various filters that try to efficiently and accurately prune reads that do not require expensive computation (e.g., [299, 300, 363, 366, 416–427]). For metagenomics, many works propose algorithmic optimizations (e.g., [232, 236, 265, 428–439]), sampling to reduce database sizes, usually at the cost of accuracy loss (e.g., [434–439]), and hardware acceleration (e.g., [4, 34, 121, 282, 440–453]).
Storing Genomic and Metagenomic Data in Compressed Forms. It is common practice to store genomic and metagenomic sequence data in compressed forms [250, 454–458] because storing uncompressed sequence data is impractical due to its massive size. In fact, due to the importance of storing sequence data in a space-efficient manner, there exist many compression techniques (e.g., [233, 459–484]) specialized for sequence data to achieve significantly higher compression ratios than state-of-the-art general-purpose compression methods (e.g., [485–500]).
1.1 Problem Discussion
Although there have been significant efforts to improve the analysis and storage of large-scale genomic and metagenomic data, we identify major outstanding problems in accessing stored sequence data and feeding it to the analysis units.
Overhead of Moving Large Amounts of Low-Reuse Data from the Storage System to Main Memory and Computation Units. Genomic and metagenomic analyses incur unnecessary data movement from the storage system for large amounts of low-reuse data. In genomics, while existing filters prune many reads to avoid expensive computation, they still need to first read the entire read set from the storage system all the way to the main memory, processor-side caches, and register files, even though a large fraction of the reads would be filtered out and not be reused in the analysis. Chapter 4 analyzes the state-of-the-art genomic analysis tools and accelerators and finds that the movement of large amounts of low-reuse genomic data from the storage system significantly hinders the end-to-end performance and energy-efficiency of genomic analysis due to storage I/O (input/output) overheads and unnecessary computational burden on the rest of the system. As we demonstrate in Chapter 4, these overheads can bottleneck the performance and energy of genomic analysis in both conventional (software-based) and emerging (hardware-accelerated) genomics systems, while having a larger impact on systems that reduce other (e.g., computation and main memory) bottlenecks [253, 272, 321–415].
In metagenomics, analysis also suffers from significant data movement overhead due to the need to access large amounts of low-reuse data. Since we do not know the species present in a metagenomic sample, metagenomic analysis requires searching large databases (e.g., several TBs [232, 501–505] or more than a hundred TBs in emerging databases [502, 503]) that contain information on different organisms' genomes. Database sizes are expected to increase further in the future, and at a fast pace.³ Two notable reasons for this growth are 1) the rapid evolution of viruses and bacteria [507], which necessitates frequent updates with new reference genomes [508, 509], and 2) the fact that databases may include sequences from both highly curated reference genomes and from less curated metagenomic sample sets [232, 502]. Particularly, as over 99% of Earth's microbes remain unidentified and excluded from curated reference genome databases [392, 510], the expanded databases improve sensitivity [392]. Recent advances in the automated and scalable construction of genomic data from more organisms have further contributed to database growth by enabling the rapid addition of new sequences to databases [511, 512]. As we demonstrate in Chapter 5, data movement overhead from the storage system to the rest of the system significantly impacts the end-to-end performance and energy efficiency of the state-of-the-art metagenomic analysis tools. Due to its low reuse, the data needs to move all the way from the storage system to the main memory, processor-side caches, register files, and processing units for its first use, and it will likely not be used again or reused very little during analysis. This unnecessary data movement, combined with the low computation intensity of metagenomic analysis and the limited I/O bandwidth, leads to large storage data movement overheads for metagenomic analysis. The impact of this over-
³For example, based on recently published trends, the ENA assembled/annotated sequence database size currently doubles every 19.9 months [267], and the BLAST nt database size doubled from 2021 to 2022 [506].
head becomes even larger on systems that reduce other (e.g., computation and main memory) bottlenecks [4, 34, 121, 282, 440–453].
As we demonstrate in Chapter 6, the overhead of moving large amounts of low-reuse data from the storage system and its burden on the rest of the system is also significant in graph-based (meta)genomic analysis. Our evaluation using the state-of-the-art tools for analysis with large-scale genome graphs shows that this overhead significantly hinders their end-to-end performance and energy efficiency.
Data Preparation Bottleneck. In this dissertation, we introduce and extensively analyze the data preparation bottleneck, where compressed genomic sequence data needs to be first decompressed and formatted before it can be analyzed. As we demonstrate in Chapter 7, the benefits of prior works on accelerating genome sequence analysis are significantly diminished due to this bottleneck. For example, Figure 1.2 shows the execution timeline of data preparation and genome analysis for a real-world genomic dataset (Chapter 7) in three different configurations. The evaluated analysis task is read mapping, a fundamental process in genomics (Section 2.2). The configurations are (i) Baseline: a state-of-the-art software analysis tool [294] with a state-of-the-art software genomic decompressor for data preparation [459]; (ii) Acc. Analysis: a state-of-the-art hardware-accelerated analysis tool [513] with the same data preparation as Baseline; (iii) Acc. Analysis w/ Ideal Prep.: the same accelerated analysis with ideal preparation, where preparation is overlapped with analysis. For all configurations, preparation and analysis operate in a pipelined manner and in batches (i.e., when decompressing batch #i, the mapper analyzes batch #i−1). Decompressed data batches are directly fed to the analysis stage. We observe that ① hardware acceleration of genome analysis can potentially offer substantial performance benefits; ② however, as analysis gets faster, data preparation emerges as a critical bottleneck that hinders the full realization of these benefits. In Chapter 7, we further demonstrate and extensively analyze this bottleneck across various real-world scenarios.

Figure 1.2: Effect of data preparation (i.e., decompressing and formatting genomic sequence data before analysis) on genome analysis performance.
1.2. GOAL
7
1.2 Goal
The goal of this dissertation is to (i) alleviate the data movement overheads of genomics and metagenomics analyses from the storage system and reduce the computational burden from the rest of the system, and (ii) mitigate the data preparation bottleneck while achieving high performance, energy efficiency, and compression ratios. We aim for our proposed designs to be lightweight such that they can seamlessly integrate with a broad range of genomic and metagenomic analysis systems.
1.3 Thesis Statement
The following thesis statement encompasses our approach:
By designing customized storage-centric systems that efficiently
-
analyze genomic and metagenomic data inside the storage system
-
enable highly-compressed storage and high-performance access of large-scale sequence data,
we can alleviate data movement overheads from the storage system, reduce the computational burden from the rest of the system, and mitigate the data preparation bottleneck,
thereby significantly (e.g., by one to two orders of magnitude) improving system performance, energy efficiency, and cost of genomic and metagenomic analysis.
1.4 Our Approach
To alleviate the overheads of moving large amounts of low-reuse sequence data from the storage system and reduce the overall computational burden from the rest of the system, we propose storage-centric computing (SCC) systems for 1) genomic analysis, 2) metagenomic analysis, and 3) graph-based (meta)genomic analysis, which plays critical roles in population-scale scenarios. SCC refers to processing data inside the storage device, either on the SSD controller (in-storage processing, i.e., ISP) or on the flash dies (in-flash processing, i.e., IFP). SCC can be a fundamental solution for alleviating this data movement overhead by processing data where it originally resides. To mitigate the data preparation bottleneck, we propose an algorithm-architecture co-design for highly-compressed storage and high-performance access of sequence data. In the rest of this section, we briefly overview our new mechanisms developed as part of this dissertation.
1.4.1 In-Storage Filters for Genomic Analysis
Read mapping [253, 272, 299, 300, 321, 326–344, 347–364, 366–368, 388, 417, 421–425, 514–516] is a fundamental step in many genomics applications. It is used to identify potential matches and differences between reads of a sequenced genome and an already known genome (called a reference genome). Read mapping is costly because it needs to perform approximate string matching (ASM) [262, 307, 363, 366, 421–424, 517–520] on large amounts of data. To address the computational challenges in genomic analysis, many prior works (e.g., [253, 272, 292–308, 321–387, 418, 420, 426, 427]) propose various approaches such as accurate filters that select the reads within a dataset of genomic reads (called a read set) that must undergo expensive computation, efficient heuristics, and hardware acceleration. While effective at reducing the amount of expensive computation, all such approaches still require the costly movement of a large amount of data from storage to the rest of the system, which significantly lowers the end-to-end performance of read mapping in conventional and emerging genomics systems.
This dissertation introduces GenStore, the first in-storage processing system designed for genomic analysis that significantly reduces both storage data movement and computational overheads of genomic analysis by exploiting low-cost and accurate in-storage filters. GenStore leverages hardware/software co-design to address the challenges of in-storage processing, supporting reads with 1) different properties such as read lengths and error rates, which highly depend on the sequencing technology, and 2) different degrees of genetic variation compared to the reference genome, which highly depends on the genomes that are being compared. Through rigorous analysis of read mapping processes of reads with different properties and degrees of genetic variation, we meticulously design low-cost hardware accelerators and data/computation flows inside a NAND flash-based solid-state drive (SSD).
Our evaluation using a wide range of real genomic datasets shows that GenStore, when implemented in three modern NAND flash-based SSDs, significantly improves the read mapping performance of three state-of-the-art software (hardware) baselines [294, 333, 419] by 2.07-6.05× (1.52-3.32×) for read sets with high similarity to the reference genome and 1.45-33.63× (2.70-19.2×) for read sets with low similarity to the reference genome. Our energy analysis shows that GenStore reduces energy consumption by on average (up to) 3.92× (3.97×) for read sets with high similarity to the reference genome, and on average (up to) 27.17× (29.25×) for read sets with low similarity to the reference genome.
GenStore is published at the International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS) in 2022 [515]. It is fully open-sourced at [521]. An extended version of the ASPLOS 2022 paper is available on arXiv [522]. A sig-significant amount of work (e.g., [365,523–529]) has already been influenced by GenStore, as we discuss in Chapter 4.
1.4.2 Cooperative In-Storage Processing for Metagenomic Analysis
Since the species present in a metagenomic sample are not known in advance, metagenomic analysis commonly involves the key tasks of determining the species present in a sample and their relative abundances. These tasks require searching large metagenomic databases containing information on different species' genomes. Metagenomic analysis suffers from significant data movement overhead due to moving large amounts of low-reuse data from the storage system to the rest of the system. In-storage processing can be a fundamental solution for reducing this overhead. However, designing an in-storage processing system for metagenomics is challenging because none of the existing tools for metagenomic analysis can be directly implemented in storage effectively due to the hardware limitations of modern SSDs.
This dissertation proposes MegIS, the first in-storage processing system designed to significantly reduce the data movement overhead of the end-to-end metagenomic analysis pipeline. The key idea of MegIS is to enable cooperative ISP for metagenomics, where we do not solely focus on processing inside the storage system but, instead, we capitalize on the strengths of processing both inside and outside the storage system. We enable cooperative ISP via a synergistic hardware/software co-design between the storage system and the host system. We design MegIS as an efficient pipeline between the SSD and the host system to (i) leverage and (ii) orchestrate the capabilities of both. Based on our rigorous analysis of the end-to-end metagenomic analysis pipeline, we propose a new hardware/software co-designed accelerator framework that consists of five aspects. First, we partition and map different parts of the metagenomic analysis pipeline to the host and the ISP system such that each part is executed on the most suitable architecture. Second, we coordinate the data/computation flow between the host and the SSD such that MegIS (i) completely overlaps the data transfer time between them with computation time to reduce the communication overhead between different parts, (ii) leverages SSD bandwidth efficiently, and (iii) does not require large DRAM inside the SSD or a large number of writes to the flash chips. Third, we devise storage technology-aware metagenomics algorithm optimizations to enable efficient access patterns to the SSD. Fourth, we design lightweight in-storage accelerators to perform MegIS's ISP functionalities while minimizing the required SRAM/DRAM buffer spaces inside the SSD. Fifth, we design an efficient data mapping scheme and Flash Translation Layer (FTL) specialized to the characteristics of metagenomic analysis to leverage the SSD's full internal bandwidth. MegIS's design is flexi-ble, capable of supporting different types of metagenomic input datasets, and can be integrated into various metagenomic analysis pipelines.
Our evaluation shows that MegIS outperforms two state-of-the-art performance- and accuracy-optimized software metagenomic tools [265, 435] by and , respectively, while matching the accuracy of the accuracy-optimized tool. MegIS achieves speedup compared to the state-of-the-art metagenomic hardware-accelerated (using processing-in-memory [4]) tool, while achieving significantly higher accuracy. MegIS provides large average energy reductions of and compared to software and hardware performance-optimized baselines, respectively, and compared to the accuracy-optimized baseline.
MegIS is published at the International Symposium on Computer Architecture (ISCA) in 2024 [527]. It is fully open-sourced at [530]. An extended version of the ISCA 2024 paper is available on arXiv [531]. MegIS has already influenced several subsequent works (e.g., [525, 526, 528, 529, 532]) as we discuss in Chapter 5.
1.4.3 Storage-Aware Algorithm-Architecture Co-Design for Graph-Based Genomic and Metagenomic Analyses
Graph-based representations of genomic and metagenomic sequences have emerged as a powerful approach for representing massive sequence databases in an expressive and efficient manner [230–237]. Compared to traditional, linear sequences, sequence graphs enable more accurate and efficient genomic and metagenomic analyses, particularly in complex, population-scale settings, such as public health, precision medicine, and agriculture. Despite its benefits, analysis on large-scale sequence graphs incurs significant data movement overhead from the storage system due to accessing large amounts of low-reuse data. Processing data directly inside the storage device, where data originally resides, can be a fundamental solution for mitigating this overhead. However, none of the existing tools for graph-based genomic and metagenomic analyses (e.g., [238,309–320,388–415]) can be efficiently implemented inside the storage system due to the limited internal hardware resources in modern SSDs. At the same time, prior storage-centric systems developed for (i) traditional, linear non-graph-based genomic and metagenomic analyses (e.g., [365,398,515,523,524,527,533]) or (ii) conventional, non-genomic graph analysis (e.g., [534–542]) are unsuitable for the unique data structures and access patterns of graph-based genomic and metagenomic analysis.
This dissertation introduces GRAINS, the first system for analysis on large-scale genomic and metagenomic sequence graphs in storage. Through our detailed examination of typical analysis pipelines on large-scale sequence graphs, we perform storage-aware algorithm-architecture co-design to (i) make the pipelines more storage-friendly and (ii) improve performance, energy-efficiency, and cost-effectiveness via in-storage and in-flash processing. GRAINS's co-design is based on three key aspects. First, we propose a new batching technique and execution flow, based on unique features of sequence graphs, that reduces the number of random storage accesses. Second, via in-flash and in-storage processing, we avoid transferring low-reuse or unused flash pages, preventing SSD channel and external I/O bandwidth waste. Third, to enable leveraging the full parallelism of all flash dies during in-flash processing, we design an effective, yet lightweight, scheduling technique, enabled by re-purposing the existing SSD structures in a new way. GRAINS's design is versatile and flexible as it supports major operations on sequence graphs and can be integrated in various analysis pipelines.
Our evaluation shows that GRAINS provides 2.7×–47.8× speedup over the state-of-the-art software baselines [232–235], and 1.5×–17.0× speedup over a hardware-accelerated (with processing-in-memory) baseline. GRAINS provides significantly higher energy efficiency of on average 16.4× and 9.8× over software and hardware baselines, respectively.
GRAINS is published at the International Symposium on Computer Architecture (ISCA) in 2026 [528]. We plan to open-source GRAINS to facilitate future research. An extended version of the ISCA 2026 paper is available on arXiv [543].
1.4.4 Algorithm-Architecture Co-Design for Highly-Compressed Storage and High-Performance Access of Sequence Data
Given the importance of genomics and the exponentially growing volumes of sequence data, there are extensive efforts to accelerate genomic analysis (e.g., [253,272,321–387]). In this work, we demonstrate a major bottleneck that significantly limits and diminishes the benefits of state-of-the-art genomic analysis accelerators: the data preparation bottleneck, where genomic sequence data is stored in compressed form and needs to be first decompressed and formatted before an accelerator can operate on it.
To mitigate the data preparation bottleneck, this dissertation proposes SAGe, an algorithm-architecture co-design for highly-compressed storage and high-performance access of large-scale genomic sequence data. The key challenge is to improve data preparation performance while maintaining high compression ratios (comparable to genomic-specific compression algorithms) at low hardware cost. SAGe addresses this challenge based on the key insight that the information encoded in genomic data follows specific trends, shaped by factors such as sequencing technology (e.g., error rates and read lengths) and common genetic phenomena (e.g., typical spatial distributions of genetic variations within genomes). By carefully exploiting these characteristics to synergistically co-design algorithms and hardware,
SAGe achieves high compression ratios, comparable to state-of-the-art genomic compressors, while enabling low decompression latencies, using only lightweight hardware and efficient streaming accesses. SAGe's co-design consists of new (i) lossless (de)compression algorithm, (ii) hardware that decompresses data with lightweight operations and efficient streaming accesses, (iii) storage data layout, and (iv) interface commands to access data. SAGe is highly versatile, as it supports datasets from different sequencing technologies and species. Due to its lightweight design, SAGe can be seamlessly integrated with a broad range of hardware accelerators for genome sequence analysis to mitigate their data preparation bottlenecks.
Our results demonstrate that SAGe improves the average end-to-end performance and energy efficiency of two state-of-the-art genome sequence analysis accelerators [513, 515] by 3.0×–32.1× and 13.0×–34.0×, respectively, compared to when the accelerators rely on state-of-the-art software and hardware decompression tools.
SAGe is published at the IEEE International Symposium on High-Performance Computer Architecture (HPCA) in 2026 [529]. We plan to open-source SAGe to facilitate future research. An extended version of the HPCA 2026 paper is available on arXiv [532].
1.4.5 Putting It All Together
This dissertation proposes various storage-centric designs for addressing the problems of data movement overheads from the storage system and data preparation bottleneck in genomic and metagenomic analyses. In Chapter 8, we describe how to combine all proposed designs (i.e., GenStore, MegIS, GRAINS, and SAGe) into a unified system. First, we motivate the need for such a system by explaining how it (i) mitigates both data movement overheads and data preparation bottleneck, and enables SCC without relying on large-scale (meta)genomic data to be stored in uncompressed formats, and (ii) can facilitate wider adoption of the proposed designs since the unified system can support a wide range of critical genomic and metagenomic analysis tasks at low cost. Given that the unified system can merge common hardware components across designs (e.g., specific buffers used in each design), it has a smaller area compared to the sum of the areas of the individual designs. Second, we discuss the design details of the unified system. Finally, we show that the unified system provides significant benefits while still maintaining low costs.
Figure 1.3 provides an overview of the proposed designs and specifies the chapters in which they are discussed.

Figure 1.3: Overview of the proposed designs and the chapters in which they are discussed.
1.5 Contributions
This dissertation makes the following contributions:
- We identify that although there have been significant efforts to improve the analysis and storage of large-scale genomic and metagenomic data, there remain two major problems in accessing the stored data and feeding it to the analysis units: 1) the overhead of moving large amounts of low-reuse data from the storage system to main memory and computation units, and 2) the data preparation bottleneck, where compressed genomic sequence data needs to be first decompressed and formatted before it can be analyzed. We develop a comprehensive understanding of how these two major problems hinder the end-to-end performance of genomic and metagenomic analyses.
-
Chapters 4, 5, and 6 demonstrate our detailed and comprehensive empirical analysis of the effects of storage data movement overheads.
-
Chapter 7 demonstrates our detailed analysis of the data preparation bottleneck.
-
We make the case for and quantitatively substantiate the benefits of storage-centric system designs to fundamentally alleviate data movement overheads from the storage system (by analyzing data directly inside the storage system, where it originally resides) and to mitigate the data preparation bottleneck in genomics and metagenomics. Despite the benefits of storage-centric systems, designing such systems is challenging due to the hardware limitations of modern storage systems. By addressing these challenges, we demonstrate novel examples of storage-centric system designs: GenStore, MegIS, GRAINS, and SAGE.
-
We propose GenStore (Chapter 4), the first in-storage processing system designed for genomic analysis. We design low-cost in-storage accelerators to accurately filter out
reads that do not require the expensive ASM computation during read mapping, directly inside the storage device.
– We address the challenges of storage-centric computing with hardware/software co-design in three key directions. First, based on our detailed analysis of read mapping, we design two different accelerators that can accelerate a wide range of read mapping applications. Each accelerator filters a large fraction of genomic read datasets using simple operations. Second, we develop storage technology-aware algorithmic optimizations to replace expensive random accesses with more efficient sequential accesses to storage devices. Third, we carefully design an efficient technique for data placement inside the storage device that takes full advantage of the internal SSD bandwidth.
– Using a wide range of real genomic datasets, we show that GenStore significantly improves the read mapping performance of three state-of-the-art software (hardware) baselines [294, 333, 419] by 2.07-6.05× (1.52-3.32×) for read sets with high similarity to the reference genome and 1.45-33.63× (2.70-19.2×) for read sets with low similarity to the reference genome. Our energy analysis shows that GenStore reduces energy consumption by on average 3.92×/29.25× for read sets with high/low similarity to the reference genome.
• We propose MegIS (Chapter 5), the first in-storage processing system designed to reduce the data movement overheads inside the end-to-end metagenomic analysis pipeline.
– To address the challenges of in-storage processing for metagenomics, we enable cooperative in-storage processing, where we do not solely focus on processing inside the storage system but, instead, we capitalize on the strengths of processing both inside and outside the storage system for metagenomic analysis. We realize cooperative in-storage processing via a synergistic hardware/software co-design between the storage system and the host system.
– We show that MegIS outperforms two state-of-the-art performance- and accuracy-optimized software metagenomic tools [265, 435] by 2.7×-37.2× and 6.9×-100.2×, respectively, while matching the accuracy of the accuracy-optimized tool. MegIS achieves 1.5×-5.1× speedup compared to the state-of-the-art metagenomic hardware-accelerated (using processing-in-memory [4]) tool, while achieving significantly higher accuracy. MegIS provides large average energy reductions of 5.4× and 1.9× compared to software and hardware performance-optimized baselines, respectively, and 15.2× compared to the accuracy-optimized baseline.
- We propose GRAINS (Chapter 6), the first system for analysis with large-scale genomic and metagenomic sequence graphs in storage.
-
We address the challenges of storage-centric computing through our detailed examination of typical analysis pipelines on large-scale sequence graphs and performing storage-aware algorithm-architecture co-design with two key aspects. First, we make the graph-based (meta)genomic analysis pipelines more storage-friendly. Second, we improve performance, energy-efficiency, and cost-effectiveness via in-storage and in-flash processing.
-
We show that GRAINS provides speedup over the state-of-the-art software baselines [232–235], and speedup over a hardware-accelerated (with processing-in-memory) baseline, while providing significantly higher energy efficiency at low cost. GRAINS provides significantly higher energy efficiency of on average and over software and hardware baselines, respectively.
- We propose SAGe (Chapter 7) to mitigate the data preparation bottleneck, while maintaining high compression ratios (comparable to genomic-specific compression algorithms) and ensuring a lightweight design. To this end, we propose an algorithm-architecture co-design for highly-compressed storage and high-performance access of large-scale genomic sequence data.
-
To address the challenge of improving data preparation performance while maintaining high compression ratios at low hardware cost, we leverage the key insight that the information encoded in genomic data follows specific trends, shaped by factors such as sequencing technology and common genetic phenomena. By carefully exploiting these characteristics to synergistically co-design algorithms and hardware, SAGe achieves high compression ratios, comparable to state-of-the-art genomic compressors, while enabling low decompression latencies, using only lightweight hardware and efficient streaming accesses.
-
We demonstrate that SAGe improves the average end-to-end performance and energy efficiency of two state-of-the-art genome sequence analysis accelerators [513, 515] by and , respectively, compared to when the accelerators rely on state-of-the-art software and hardware decompression tools.
- We demonstrate in Chapters 4, 5, 6, and 7 that our storage-centric systems provide these performance and energy benefits without relying on costly hardware resources throughout the system (e.g., external I/O bandwidth, large DRAM capacity, extensive computational units), making genomics and metagenomics more accessible for wider adoption.
1.6. DISSERTATION OUTLINE
16
-
We describe how all storage-centric designs presented in this dissertation can be put all together at low cost. Chapter 8 describes the combined design and its evaluations.
-
We describe future opportunities and new directions enabled by the contributions presented in this dissertation. Chapter 9 discusses these opportunities and directions, including storage-centric computing for other biological data types, storage-centric designs for constructing and updating large-scale genomic databases and graphs, highly-compressed storage and high-performance access of other biological data types, and genomic privacy in the era of storage-centric computing.
1.6 Dissertation Outline
This dissertation is organized into nine chapters. Chapter 2 provides relevant background regarding genomic and metagenomic analyses, graph-based analysis, and storing sequence data. Chapter 3 discusses related works on techniques for alleviating storage I/O overheads (including storage-centric computing), memory-centric computing, accelerating genomic and metagenomic analyses, and genomic-specific compression techniques. Chapter 4 presents GenStore and its evaluation. Chapter 5 presents MegIS and its evaluation. Chapter 6 presents GRAINS and its evaluation. Chapter 7 introduces the data preparation bottleneck, along with presenting SAGe and its evaluations. Chapter 8 discusses how we can put all the storage-centric designs proposed in this dissertation together. Finally, Chapter 9 provides future research directions and concluding remarks.
Chapter 2
Background
This chapter provides an overview of the background necessary for understanding the contributions, evaluations, and discussions in this dissertation. Section 2.1 provides details on storage systems based on solid state drives (SSDs). Section 2.2 explains the overall genomic and metagenomic workflow, which involves three key steps of sequencing, basecalling, and analysis (which in itself consists of multiple steps). Section 2.3 explains genomic analysis in more detail, and Section 2.4 explains metagenomic analysis in more detail. Section 2.5 describes graph-based genomic and metagenomic analyses. Section 2.6 explains genomics-specific compression.
2.1 Solid State Drive Organization
In this thesis, we focus on storage systems based on solid state drives (SSDs) using NAND flash memory, the prevalent memory technology in modern storage systems [525, 544–603]. We expect that our proposed designs would also provide performance and energy benefits with storage devices that are built using emerging or older non-volatile memory technologies (e.g., [604–611]).
Figure 2.1 depicts the internal organization of a modern NAND flash-based solid-state drive (SSD) that consists of three main components: ① NAND flash packages, ② an SSD controller, and ③ DRAM.
NAND Flash Memory. An SSD consists of multiple NAND packages, each comprising multiple dies (also called chips) that share the package's I/O pins. One or more packages share command/data busses (called channels) to connect to the SSD controller. Dies sharing the same channel can operate independently of each other, but only one die can communicate with the SSD controller (e.g., for data transfer) at a time via the shared channel. A die has multiple
2.1. SOLID STATE DRIVE ORGANIZATION
18

Figure 2.1: Organizational overview of a modern SSD.
(e.g., 2–8) planes. Each plane contains thousands of blocks. A block includes hundreds to thousands of pages, each of which is 4–16 KiB in size. NAND flash memory performs read/write operations at page granularity but erase operations at block granularity. Planes in the same die share the peripheral circuitry used to access pages; as such, they can concurrently operate only when accessing pages (or blocks) at the same offset, which are called multi-plane operations [544, 595, 612–614].
SSD Controller. An SSD controller has two main components: (i) multiple cores to run SSD firmware, commonly called the flash translation layer (FTL), and (ii) per-channel hardware flash controllers for request handling and error-correcting codes (ECC) for underlying NAND flash chips. The FTL is responsible for communication with the host system, internal I/O scheduling, and various SSD management tasks required for hiding the unique characteristics of NAND flash memory from the host system [544–582]. For example, a page of NAND flash memory needs to first be erased before it can be programmed,¹ so the FTL always performs out-of-place updates by writing the new data of a logical page to a new physical page that was erased previously. To this end, the FTL maintains logical-to-physical (L2P) address mappings [544, 615] for reads and performs garbage collection [545, 551, 563, 564, 568, 616, 617] to reclaim new physical pages for writes.
SSD-Internal DRAM. A modern SSD employs large low-power DRAM (e.g., 4GB LPDDR4 DRAM for a 4TB SSD [618]) to store metadata for SSD management tasks. Most of the DRAM capacity is used to store the L2P mappings for address translation. It is common practice to maintain the L2P mappings at 4KiB granularity to provide high random access I/O performance [565, 567], so in a 32-bit architecture, the memory overhead for the L2P mappings is approximately 0.1% of the SSD capacity (4 bytes per 4KiB data).
¹This is called the erase-before-write property [544, 560].
While the majority of this DRAM capacity is used to store the L2P mappings, SSD-internal DRAM is also used for several other critical functions. These include buffering and coalescing host write data, maintaining wear-leveling and garbage-collection metadata, storing bad block information, tracking open blocks and free space, and supporting firmware execution [544].
SSD I/O Bandwidth. To mitigate the large performance gap between main memory and the storage system, SSD manufacturers increase the external bandwidth of SSDs by employing advanced I/O interfaces between the host system and SSDs. For example, older SATA3 SSDs from 2018 provide around 500MB/s sequential-read bandwidth [618,619], but newer and state-of-the-art PCIe-Gen5 SSDs from 2025 provide significantly higher sequential-read bandwidth, up to 16 GB/s for four-lane PCIe-Gen5 SSDs (e.g., 14.8 GB/s in Samsung 9100 Pro SSD [620]).
A modern SSD’s internal bandwidth, i.e., I/O bandwidth between NAND flash chips and SSD controller (@ in Figure 2.1) is usually higher than its external bandwidth, i.e., I/O bandwidth between the host and the SSD (b). For example, an enterprise SSD controller [621] from 2020 supports 6,550MB/s external bandwidth and 19.2GB/s internal bandwidth (16 channels, each with a bandwidth of 1.2 GB/s). In another example from 2025, a state-of-the-art SSD controller [622] delivers 14 GB/s of external bandwidth and up to 57.6 GB/s of internal bandwidth (achieved via 16 channels and a peak bandwidth of 3.6 GB/s per channel). Over-provisioning the internal bandwidth is reasonable since 1) a modern SSD needs to perform various internal management tasks (e.g., garbage collection [545, 551, 563, 564, 568, 616, 617], wear-leveling [545, 551, 623], and data refresh [545, 551, 552, 556–559, 569, 570, 624]) and 2) a higher number of channels reduces contention between requests by interleaving data between the channels.
2.2 Genomic and Metagenomic Workflows
Traditional genomics analyzes genome sequences from a genomic sample, which contains an individual (or a small group of individuals) of the same known species. Metagenomics requires the analysis of the genome sequences of various organisms in a metagenomic sample, which contains different species present in a common environment (e.g., human gut, soil, or oceans) [122, 126, 127, 148, 197–203].
Given a genomic or a metagenomic sample, a typical workflow consists of three key steps [250, 253, 416, 417]: (i) sequencing, (ii) basecalling, and (iii) analysis. Figure 2.2 shows an overview of these steps, as we will explain in the rest of this section.

Figure 2.2: Overview of a typical genomic workflow.
2.2.1 Sequencing
The first step, sequencing (① in Figure 2.2) [153–196], converts DNA into raw digital signals. Sequencers cannot read many organisms' entire genomes as complete, error-free sequences. Instead, they produce many shorter overlapping sequences called reads that are randomly sampled from different locations in the genome. To mitigate the impact of sequencing errors, multiple reads cover each genomic position. The average number of reads per location is called the sequencing depth. Deeper sequencing provides more information per location, which allows later analysis steps to better distinguish between true biological signals and sequencing errors.
Sequencers are distinguished by the characteristics of their reads. Examples include sequencers that produce short reads (75 to 300 characters) with very high accuracy (~99.9%) [187–190] and long reads (typically 500 to 25k characters, and up to ~2.2M characters [191–193]) with intermediate accuracy (~99%) [190, 193–196]. We describe the three major sequencing technologies in more detail.
Sequencing-by-synthesis (SBS) sequencing [153–161] is a widely-used, accurate, and cost-effective sequencing technology. The SBS sequencing process has four key steps. First, the DNA molecule is fragmented into short pieces (e.g., approximately 200 bases), called reads. To enable attaching these reads to a specialized glass slide called a flow cell, a few nucleotides, called adapters, are attached to each read. Second, these fragments are amplified into clusters of identical fragments to increase signal redundancy and improve sequencing reliability. Third, a complementary DNA strand from a read is synthesized base by base. To this end, during each sequencing cycle, an enzyme called DNA polymerase incorporates a single fluorescently-labeled nucleotide into the growing complementary strand. Each base emits a distinct light color upon incorporation, thereby enabling the identification of each individual nucleotide. Fourth, the flow cell is imaged after every cycle, and the resulting series of images constitutes the raw sequencing data. This cycle of nucleotide incorporation and imaging is repeated for each position in the DNA fragment, progressively reconstructing its full sequence from the fluorescent signals recorded across successive cycles. Basecalling algorithms then decode these fluorescent signals into nucleotide sequences while correcting for sequencing errors [625–640]. SBS provides high accuracy. However, due to its cycling procedure, SBS is inherently limited to producing short reads. This limitation can pose challenges for downstream analyses such as large genome assembly and the resolution of complex genomic regions [641, 642].
Single Molecule Real-Time (SMRT) sequencing [162] is a high-throughput sequencing technology that avoids the cycle-by-cycle approach of SBS, enabling the generation of longer reads (e.g., up to a few thousand bases). The SMRT sequencing process typically has five key steps. First, similar to SBS, DNA is fragmented into smaller pieces (i.e., reads). Second, these fragments are circularized using hairpin adapters that form closed circular molecules, allowing the same fragment to be sequenced multiple times. Third, a single DNA polymerase enzyme is attached to each circularized template to initiate the synthesis of a complementary strand. Fourth, circularized fragments are loaded into Zero-Mode Waveguide (ZMW) wells [643], which are nano-scale structures that confine the sequencing reaction to a small volume, thereby reducing background noise and achieving a high signal-to-noise ratio. Fifth, unlike the discrete cycles in SBS, sequencing proceeds continuously in real time. As the polymerase incorporates fluorescently labeled nucleotides into the growing strand, each incorporation event emits a distinct light signal that is captured as a continuous stream of image data in movie format. SMRT sequencing supports two primary modes: (i) Circular Consensus Sequencing (CCS) [162, 644], in which the polymerase repeatedly sequences the same circular template to produce a highly accurate consensus sequence, and (ii) Continuous Long Read (CLR) mode [645], which prioritizes read length at the cost of higher error rates. Although SMRT sequencing images can be rapidly converted into nucleotide sequences, the inherent noise in the technology necessitates additional error-correction steps [646–665], including sequence alignment, consensus assembly construction, and assembly polishing.
Nanopore sequencing [163–186] is a high-throughput sequencing technology that enables the sequencing of nucleic acid molecules (e.g., double-stranded DNA, dsDNA) as they pass through nano-scale pores, called nanopores. The nanopores are embedded in a membrane that isolates the two sides. The nanopore sequencing process has three key steps. First, a voltage is applied across the membrane such that the upper part of the membrane (i.e., cis side) is negatively charged and the lower part (i.e., trans side) is positively charged, driving negatively charged DNA or RNA molecules through the nanopore from the cis to the trans side.
A motor protein attached to one end of the molecule guides it toward a nanopore, separates the two strands (for dsDNA), and controls the translocation speed, which is a factor critical for sequencing accuracy. Second, as the molecule passes through the nanopore, specific sequences of k nucleotides (i.e., k-mers, with k typically between 6 and 9 [167, 666]) partially disrupt the ionic current flowing through the pore's sensing regions, producing characteristic current changes that enable nucleotide identification. However, several sources of noise can affect measurement accuracy, including variations in translocation speed [667], stochastic current fluctuations [167], and environmental factors such as temperature [668]. Third, raw electrical signals are generated from each nanopore at a certain frequency (e.g., approximately 5,000 signals per second), typically with many reads sequenced simultaneously across multiple pores in the sequencer's flow cell. These electrical signals encode the characteristics and content of the nucleic acid molecules passing through the pores. Due to the nature of its sequencing method, nanopore sequencing enables the generation of ultra-long reads (e.g., up to a few million bases [191–193]).
2.2.2 Basecalling
The second step, basecalling [253,322,324,669–693], converts the sequencer's raw signals to strings. The basecalling process depends on the sequencing technology. For SBS sequencing signals, basecalling analyzes image intensities to identify the nucleotide sequences [625–640]. For SMRT sequencing signals, basecalling interprets fluorescence pulses to determine the nucleotide sequences [162,196]. In nanopore sequencing, basecalling converts the changes in the electrical signals into nucleotide sequences [671–693].
Due to the noisy electrical signals, basecalling nanopore sequencing signals is more challenging compared to the more direct signal to nucleotide translation in SBS and SMRT. To improve the accuracy of nanopore basecalling, many modern basecallers propose techniques based on deep neural networks (DNNs) [671–689]. These models typically include convolutional neural networks (CNNs), recurrent neural networks (RNNs), or a combination of both. CNNs enable the extraction of structured features from raw signals that deep learning models can use to predict the nucleotide sequence. RNNs, often bidirectional Long short-term memory (LSTM), capture temporal dependencies to improve prediction accuracy under noisy conditions of nanopore sequencing. To handle signal segments of varying length caused by varying translocation speed, basecalling models employ flexible decoder mechanisms such as Connectionist Temporal Classification (CTC) layers, Conditional Random Field (CRF) decoders, or a combination of both, thereby enabling accurate assignment of bases to variable-length signal windows.
At the end of the basecalling process, each DNA read is converted to: (i) the DNA encoded using an alphabet representing the nucleotides (also called base pairs) A, C, G, T (along with N to represent unknowns), (ii) a quality score [694] for each nucleotide, encoding its probability of being incorrect using an ASCII character (the incorrect bases can arise due to the fact that sequencing signals are inherently noisy and must be computationally interpreted to infer the underlying nucleotide sequence), and (iii) a header. The strings from all reads in a sample (i.e., a read set) are then written to a file. This file format is FASTQ [669], the most common read set format [695]. The file is then typically stored compressed (see Section 2.6) for future analysis.
2.2.3 Analysis
The third step is analysis on a collection of read sets. Since read sets are typically stored compressed [250,454–457], they need to be prepared (i.e., decompressed and formatted) before analysis. A typical genomic analysis workflow quantifies mismatches between the reads and a reference genome. However, since metagenomics deals with genome sequences whose species are not known in advance in many cases, it requires comparisons of the target sequences against large databases of many reference genomes. Section 2.3 and Section 2.4 explain genomic and metagenomic analysis in more detail, and Section 2.5 further details graph-based (meta)genomic analysis.
2.3 Genomic Analysis
In this section, we explain the key parts of genomic analysis and the importance of high-performance and energy-efficient genomic analysis.
2.3.1 Read Mapping Process
A typical analysis workflow quantifies mismatches between the reads and a reference genome. Since the sequencing process does not provide location information for reads, genomic analysis typically starts with the computationally-expensive read mapping process [253, 294, 310, 416, 417, 696, 697], which finds the potential matching locations of reads in the reference genome. For each matching location, i.e., the location of each matching subsequence in the reference genome, a read mapper computes an alignment score, a numerical value that quantifies the degree of similarity between the read and the region of the reference to which the read aligns.
Since each read is much shorter than the reference genome (e.g., the human reference genome contains 3.2 billion base pairs, yet a read is usually 75–300/500-25k base pairs in short/long read sequencing technologies), a read mapper typically uses an index of the reference genome to reduce the search space for each read. The index is a dictionary, i.e., a key-value store, where the keys are unique k-length subsequences (called k-mers) extracted from the reference genome, and the values are the exactly-matching locations of these k-mers in the reference genome [299,514]. The value of k is fixed during the offline index generation step and used for all subsequent steps.² To greatly reduce the storage overhead of the index and speed up queries against it, without significantly changing the final outcome of read mapping, some read mappers index only a subset of reference genome k-mers called minimizers [699–701]. A minimizer is a representative k-mer of a set of k-mers according to a scoring mechanism. For example, some read mappers [294,702] calculate hash values for all k-mers in a window of w consecutive k-mers from an input sequence, and mark the k-mer with the smallest hash value as the minimizer k-mer.
Read mapping is a three-step process. Figure 2.3 shows an overview of these steps, as we will explain in the rest of this section.

Figure 2.3: Overview of a typical read mapping process.
In the first step, seeding (① in Figure 2.3), the read mapper queries the reference index to determine potential locations in the reference genome where the read could map. To do so, the read mapper looks up in the reference index every minimizer k-mer fetched from a read. If the minimizer k-mer hits in the reference index, the read mapper marks the locations of such a k-mer in the reference genome as the read's potential matching locations, also called seeds.
In the second step, seed filtering and/or chaining (②), the read mapper prunes the potential matching locations in the reference to which the read cannot possibly align (due to large differences between the read and the reference at those locations). If all of the potential matching locations of the read get filtered (i.e., excluded from further consideration), the read mapper discards the read from further analysis. The read mapper uses a dynamic programming (DP) algorithm [363,366,416,417,421–424,518,519] to 1) merge overlapping seeds into longer regions,
²k is typically between 11 and 31 [294,435,698], depending on the application.
called chains [294], and 2) calculate their corresponding chaining scores, which are values that quantify the approximation of the entire read's alignment score in these regions. If the read mapper finds one or more chains with a sufficiently high chaining score (indicating a high degree of similarity to the reference genome), then the read mapper performs the third step. If the read has no chain with a sufficiently high score, the read mapper excludes the read from further consideration and skips the third step.
In the third step, sequence alignment [295–297, 363, 381, 518–520, 703–713] (③), the read mapper determines the exact differences between a read and the reference genome at the potential matching locations. Sequence alignment is done with a computationally-expensive DP algorithm [363, 366, 416, 417, 421–424, 518, 519] to perform approximate string matching (ASM). Finally, the read mapper returns the locations in the reference genome with the best alignment scores for each read.
2.3.2 Pre-Alignment Read Filtering
To mitigate the high performance overhead of sequence alignment, read filtering approaches are widely used. Read filters can be incorporated at any stage of the process before alignment. There are two main filter types.
The first filter type [299, 300, 366, 421–425] aims to efficiently filter out from consideration potential matching locations in the reference genome that lead to a large number of edits (larger than a user-defined threshold) between the read and the reference genome at those locations. Doing so avoids a costly alignment step for potential locations at which the read would not match the subsequences of the reference genome.
The second filter type [419] aims to detect if a read matches a subsequence of the reference genome with no edits (i.e., exact-match) or very few (e.g., 1-5) edits. Reads that satisfy this requirement are guaranteed to align to the reference genome without requiring the costly read alignment process, and thus can be filtered (i.e., be excluded from the costly alignment process). This filter type is particularly effective for read sets with a large number of exactly-matching reads (e.g., 80% in human short read sets [419, 714, 715]).
While both filter types reduce computation overhead, they still require a large number of random memory accesses for each read. In a typical read set of several gigabytes, read filters incur several random accesses per read 1) to the reference index for seeding, and potentially, 2) to the reference genome to compare the read with the subsequence of reference genome at each potential matching location.
2.3.3 Further Steps in Analysis
The result of read mapping (matching locations and the alignment scores at these locations) can be fed to various downstream analysis tasks (e.g., variant calling [253, 716–759], genome assembly [186, 230, 253, 333, 511, 512, 647, 702, 760–790], and taxonomic classification [4, 265, 428–435, 437–439, 504, 791–798]). Analysis workflows typically access all base pairs of each read, but only a small fraction of the corresponding quality scores. This is because read mapping, while using all base pairs, typically ignores quality scores [294, 467, 761, 769, 799]. The subsequent steps (e.g., variant calling) only need quality scores from the positions surrounding mismatches [723, 755–757] to distinguish true biological variation from sequencing errors.
2.3.4 Importance of High-Performance and Energy-Efficient Genomic Analysis
The performance and energy efficiency of the analysis step is critical for three key reasons. First, it often begins with existing, already sequenced and basecalled read sets because, in many cases, a single read set needs to be analyzed many times and at different times [250, 257–259, 800]. For example, some applications (e.g., measuring population genetic diversity [259, 801–804]) require analyzing a read set with many reference genomes at different times. Other applications require repeating the analysis many times (e.g., with updated or personalized references [250, 256–262]) to improve accuracy. Second, long analysis times pose critical challenges in time-critical use cases such as clinical settings [26–28, 210–220] and timely surveillance of diseases across a population [34–38]. Given the large throughput of modern sequencers and the growth rate of sequencing throughput being higher than Moore's Law [250], the analysis throughput has emerged as a critical bottleneck [252, 266–268, 805]. Therefore, simply scaling up traditional systems for analysis is not efficient (both in terms of cost and energy). Third, the development of sequencing technologies that enable analysis during sequencing [269–275, 283] increasingly necessitates the need for fast analysis that can keep up with sequencing throughput.
Due to the criticality of the analysis step and the challenges of analyzing large amounts of sequencing reads on conventional systems, a large body of works (e.g., [253, 272, 321–415]) propose techniques to improve performance and energy efficiency of genomic analysis, particularly read mapping (e.g., [253, 272, 299, 300, 321, 326–344, 347–364, 366–368, 388, 417, 421–425, 514–516]), which is one of the most critical bottlenecks in many analysis applications [250]. Section 3.3 provides a more comprehensive overview of works on accelerating genomic analysis.
2.4 Metagenomic Analysis
In this section, we explain the key parts of genomic analysis and the importance of high-performance genomic analysis. While traditional genomics studies genome sequences from an individual (or a small group of individuals) of the same known species, metagenomics requires the analysis of the genome sequences of various organisms of different species present in a common environment (e.g., human gut, public transport vehicles, soil, or oceans) [122, 126, 127, 148, 197–203]. Figure 2.4 shows an overview of metagenomic analysis, which involves determining the species present/absent in the sample ① and their relative abundances (i.e., the relative frequencies of the occurrence of different species in the sample) ②.

Figure 2.4: Overview of metagenomic analysis.
2.4.1 Presence/Absence Identification
To find the species present in the sample (① in Figure 2.4), many tools (e.g., [4, 265, 429–435, 437–439, 504, 791–794]) extract k-mers (i.e., subsequences of length ) from the input queries in a sample read set (@ in Figure 2.4) and search for the k-mers in an input reference database (⑦). Each database contains k-mers extracted from reference genomes of a wide range of species. The database associates each indexed k-mer with a taxonomic identifier () of the reference genome(s) the k-mer comes from. At the end of the presence/absence identification process, the metagenomic tool outputs the taxIDs of the species present in the sample (©).
The GB- or TB-scale databases typically support random (e.g., [4, 429–431, 433–435, 437, 439, 791–793]) or streaming (e.g., [265, 432, 438, 504, 794]) access patterns. To gain a deeper understanding of data movement overheads in metagenomics, we discuss these access patterns in more detail.
Tools with Random Access Queries (Random-Qry). Some presence/absence identification
A taxID is an integer attributed to a cluster of related species.
tools (e.g., [4, 429–431, 433–435, 437, 439, 791–793]) commonly perform random accesses to search their database. A state-of-the-art tool in this category is Kraken2 [435], which maintains a hash table that maps each indexed k-mer to a taxID. To identify which species are present in a set of queries, Kraken2 extracts k-mers from the read queries and searches the hash table to retrieve the k-mers' associated taxIDs. For each read, Kraken2 collects the taxIDs of that read's k-mers and, based on the occurrence frequencies of these taxIDs, uses a classification algorithm to assign a single taxID to each read. Finally, Kraken2 identifies the species present in the sample based on the taxIDs of the reads in the sample.
Tools with Streaming Access Queries (Stream-Qry). Some presence/absence identification tools (e.g., [265, 432, 438, 504, 794]) predominantly feature streaming accesses to their databases. A state-of-the-art tool in this category is Metalign [265]. Presence/absence identification in Metalign is done via 1) preparing the input read set queries, and 2) finding species present in them. To process the queries, the tool extracts k-mers from the reads and sorts them. Finding the species in the sample involves two steps. First, the tool finds the intersecting k-mers, which are k-mers that are common between the query k-mers and a pre-sorted reference database. In this step, the tool uses large k-mers (e.g., k = 60) for both the queries and the database to maintain a low false positive rate. This is because large k-mers are more unique, and matching a long k-mer ensures that the queries have at least one long and specific match to the database. Second, the tool finds the taxIDs of the intersecting k-mers by searching for the intersecting k-mers or their prefixes in a smaller sketch database of variable-sized k-mers. Each sketch is a small representative subset of k-mers associated with a given taxID. Searching for both the intersecting k-mers and their prefixes in this step increases the true positive rate (i.e., species correctly identified as present in the sample out of all species actually present in the sample) by expanding the number of matches.
2.4.2 Abundance Estimation
After finding the taxIDs of the species present in the sample, some applications require a more sensitive step to find the species' relative abundances [265, 428, 430, 434, 437, 439, 791, 794–797] in the sample (2 in Figure 2.4). Different tools implement their own approaches for estimating abundances, from lightweight statistical models [428, 796, 797] to more accurate but computationally-intensive read mapping [265, 430, 434, 439, 791, 793]. Lightweight statistical models use the taxIDs assigned to each read, along with the relationships between taxIDs encoded in the taxonomic tree, to assign species to each read, determining the number of reads belonging to each species. Read mapping is the process of finding potential matching locations of reads against one or more reference genomes. Metagenomic tools can map the reads against reference genomes of species in the sample, accurately determining the number of reads belonging to each species.
2.4.3 Importance of High-Performance and Energy-Efficient Metagenomic Analysis
By enabling the analysis of the genomes of organisms from different species in a common environment, metagenomics overcomes a limitation of traditional genomics, which requires culturing individual known species in isolation. This limitation has been a major roadblock in many clinical and environmental use cases [806]. The impact of metagenomics has been rapidly increasing in many areas that each has broad implications for society, such as precision medicine [204–209], urgent clinical settings [26–28, 210–220], understanding microbial diversity of an environment [148, 198–200, 202, 221, 222], discovering early warnings of communicable diseases [223–226], outbreak tracing [59, 227–229], agriculture [229], and many other critical areas. Due to its importance, metagenomics has attracted wide global attention, with medical and government health institutions heavily investing in metagenomic analysis [226, 229, 807]. The global amount of genomic data that is incorporated in metagenomic workflows is growing exponentially [2,508], doubling every several months [267,506,508,808], and is projected to surpass the data growth rate of various major internet media platforms [2,4,808].
In metagenomics, the analysis step bottlenecks the end-to-end performance of the workflow, and therefore, poses a pressing need for acceleration [4, 126, 190, 210, 246, 452] for three reasons. First, the sequencing and basecalling steps for a sample are usually one-time tasks [251–253]. In many cases, the reads from a single sequenced sample can be analyzed by multiple studies or at different times in the same study. This is because (i) there are many heuristics and parameters involved in metagenomics, which need to be tuned to achieve a desired sensitivity-specificity tradeoff [254], (ii) there are different databases created with different parameters or genomes that need to be used for achieving different accuracy goals [255], and (iii) a sample can be analyzed several times with databases that are regularly updated with new genomes, or with syndrome-specific targeted databases [255].
Second, even when performing the metagenomic analysis step only once for a sample, the throughput of this step is significantly lower than the sequencing throughput of modern sequencers (e.g., [263]). While sequencing one sample can take a long time, a single sequencing machine can sequence many samples from different sources in parallel [252, 264], achieving very high throughput. Our analysis with a state-of-the-art metagenomic tool [265] shows that analyzing the data, sequenced and basecalled by a sequencer in 48 hours, takes 38 days on a high-end server node (detailed configurations in Chapter 5). Such long analysis poses serious challenges, specifically for time-critical use cases that require fast decision making (e.g., clinical settings [210] and timely surveillance of infectious diseases [227]). Since the growth rate of sequencing throughput is higher than Moore's Law [3, 250], this already large gap between sequencing and analysis throughput is widening [252, 266–268], and simply scaling up traditional systems for analysis is not efficient.
Third, the development of sequencing technologies that enable analysis during sequencing [269–275] increasingly necessitates the need for fast analysis that can keep up with sequencing throughput. The possibility to perform analysis during sequencing enables new features, where sequencing can be dynamically stopped once a target pathogen is identified, or sufficient coverage is reached [34, 269–271, 274, 276–288]. Therefore, to achieve this feature, the analysis throughput must match or exceed the sequencing throughput. Otherwise, the analysis step bottlenecks the entire process and makes this feature impractical in time-critical settings.
The analysis step is also the primary energy bottleneck in the metagenomic workflow, and optimizing its efficiency is vital as sequencing technologies rapidly evolve. For example, a high-end sequencer [263] uses 405 KJ to sequence and basecall 100 million reads, with 92.5 Mbp/s throughput and 2,500 W power consumption [263]. In contrast, processing this dataset on a commodity server (detailed configurations in Chapter 5) requires 675 KJ, accounting for 63% of the total energy of the metagenomic workflow. The need to enhance the analysis' energy efficiency is further increasing for two reasons. First, sequencing efficiency has been continually improving. For example, a new version of Illumina sequencer from 2023 [263] provides 44× higher throughput at only 1.5× higher power consumption compared to an older version [289] from 2020, resulting in much better sequencing energy efficiency. Therefore, simply relying on scaling up commodity systems to improve the analysis throughput worsens the energy bottleneck. Second, the increased adoption of compact portable sequencers [290] for on-site metagenomics (e.g., in remote locations [291] or for personalized bedside care [246]) offers high-throughput sequencing with low energy costs. The drive towards portability further amplifies the need for energy- and cost-effective analysis that can match the portability and convenience of these sequencers.
2.5 Graph-Based Genomic and Metagenomic Analysis
Sequence Graphs have emerged as a powerful approach for representing and querying massive and complex genomic databases (e.g., containing reference genomes from many species or previously sequenced samples) [230–237,388,809–812]. Unlike traditional models of represent-ing genomic sequences, which represent genomic databases as a collection of disjoint, linear sequences, sequences in a graph are represented by graph walks [230, 231]. Genome graphs collapse subsequences shared across different database entries into single nodes and indicate adjacent subsequences with edges, compacting sequence sets (by up to thousand-fold [232]). A node's metadata then indicates which entries contain the represented sequence.
Sequence graphs provide two fundamental benefits, which make them indispensable, particularly in modern, population-scale genomics [148, 232, 238–240]. First, the graph topology, along with its metadata, offer vast expressive power [239–242, 813]. A graph naturally encodes the evolutionary history and diversity of a cohort of organisms, revealing their shared and distinct sequences [237, 239, 241, 243]. This leads to reduced bias and improved accuracy in analyses. For example, genome graphs improve disease diagnosis by capturing population-specific variants often missed by analyses on traditional, linear sequences [239, 244, 312, 814]. Second, genome graphs leverage the inherent redundancy of genomic data to avoid redundant computation. This is because shared genomic regions across database entries are stored only once and do not need to be queried separately. This is essential in settings such as population-scale pathogen surveillance [815–817], where public health systems must rapidly match new pathogen genomes against large national databases [148, 232, 811, 818–820], enabling timely detection of local outbreaks and limiting broader spread [38, 47, 48, 225, 226, 228, 821, 822].
De Bruijn Graphs. To efficiently represent large-scale genome graphs, de Bruijn graphs (DBGs), which are a type of overlap graph [230–237, 388, 779, 809, 810, 823], have been adopted by many recent works [230, 232–237, 809, 810, 824, 825]. While other sequence graph classes exist [243, 826, 827], DBGs scale much better with both the entries' size and genetic diversity of genomic databases [232, 234, 828, 829], which is why they are preferred in these contexts. Figure 2.5 shows an example of ① linear sequences, ② their corresponding DBG, and ③ the corresponding compacted DBG. In a DBG, each node is a unique k-mer that is observed in the input, and there is a directed edge from node u to node v if the suffix -mer of u

Figure 2.5: An example de Bruijn graph (DBG) and its compacted form.
is equal to the prefix -mer of . Each node is then assigned a color, representing its metadata. Example metadata can be the IDs of the database entries from which the k-mer originates, the occurrence frequencies of the k-mer [233, 236, 830], and the k-mer's exact locations [233, 471, 818, 831]. A common strategy to reduce a DBG's size is to instead store its corresponding compacted DBG, where all -mers from a maximal non-branching path are merged into a single node. There are two common ways to represent (compacted) DBGs [832]. A node-centric DBG of order (e.g., [236, 824, 833]) stores all -mers observed in the entries and defines its edges implicitly (Figure 2.5). An edge-centric DBG of order (e.g., [232–235, 809, 834, 835]) stores observed -mers as nodes and only stores the edges that represent observed -mers. In the rest of this dissertation, we refer to compacted DBG as DBG for short.
Graph-based sequence analysis follows the same high-level goal as the conventional analyses described in Sections 2.3 and 2.4: it involves querying reads from a sample against a set of sequences (either genomes of the same species, or a database of genomes of different species or already sequenced samples) to determine what species or genomic features are present in the sample [232, 236, 431, 809, 824, 836] and/or to find their differences from genomes in the database [244, 259]. The key difference lies in how the reference sequences and databases are represented and queried. In conventional, linear sequence-based analysis, reference sequences and databases are stored as one or more independent linear sequences. Consequently, analysis identifies candidate positions of input query reads in these linear sequences and, when needed, aligns each read against the corresponding sequence regions. In graph-based analysis, reference sequences and databases are encoded as graph walks. Therefore, a read is matched not simply to a position in a linear sequence, but to one or more nodes or walks through the graph. The metadata associated with the matched nodes can additionally indicate which genomes, species, or database entries contain those sequences.
As shown in Figure 2.6, queries fall into two categories: ① k-mer set lookups (where k-mers in a read set are matched against the graph to determine the species present in a sample), and read mapping (where each read is analyzed individually). Read mapping can be done by either ② with the alignment step, i.e., alignment-based (e.g., [232, 233, 238, 309, 313, 813, 837, 838])

Figure 2.6: High-level overview of graph-based genome analysis.
or ③ without the alignment step, i.e., alignment-free (e.g., [231, 232, 236, 809, 824, 839–841]). Alignment-free approaches (more common for large-scale studies [232, 233]) match all k-mers of a read to the graph, retrieve the metadata associated with the graph nodes to which the k-mers match, and classify the read using this metadata. Alignment-based approaches introduce an additional, computationally expensive approximate string matching step, where candidate regions identified by k-mer matches are refined via dynamic programming to determine precise differences between the read and the graph.
2.5.1 Importance of High-Performance and Energy-Efficient Graph-Based Genomic Analysis
Due to similar reasons explained in Sections 2.3.4 and 2.4.3, the performance and energy efficiency of the analysis step in graph-based genome analysis is critical. Due to this criticality and the challenges of analyzing large amounts of sequencing reads on conventional systems, a large body of work (e.g., [388–415]) proposes techniques to improve the performance and energy efficiency of graph-based genomic analysis.
2.5.2 Unique Characteristics of Genome Graphs
The type of data encoded in genome graphs and the underlying goals of querying genome graphs exhibit unique features not encountered in conventional, non-genome graphs (e.g., social networks, web graphs, road networks). General-purpose graph data structures and methods do not account for these features, leading to significant inefficiencies in storage and computation requirements and missed opportunities. This has led to significant efforts in both software (e.g., [238,309–320]) and hardware (e.g., [388–401]) to develop specialized techniques for genome graphs.
The unique semantic characteristics in genome graphs manifest in three key aspects regarding the graph structure, storage (e.g., sparsity and degree distribution), and access patterns. First, in a traditional graph with nodes, there are to edges that must all be stored explicitly (e.g., adjacency lists [842, 843], compressed sparse row formats [844, 845]). Genome graphs, most commonly represented as DBGs, are structurally constrained in that they either store nodes or edges and the other is obtained implicitly. This is a feature necessitated by the massive scale of genome graphs and enabled by the inherent overlap structure of the sequences they encode.
Second, traditional graphs typically exhibit power-law distributions, in which a small number of nodes have very high degree and many graph-processing optimizations (e.g., [846–848]) exploit this skew. However, DBG node outdegrees and indegrees are at most four (determined by the fixed alphabet size, A, C, G, T, in the underlying data) regardless of the overall graph size. Therefore, optimizations that exploit skewed degree distributions, a common strategy in conventional graph processing systems, are not well-suited to genome graphs, necessitating different optimization approaches.
Third, due to the differences in underlying graph structures, access pattern optimization opportunities vary between genome graphs and non-genome graphs. The compressed data structures used in large-scale genome graphs enforce specific node orderings and, thus, restrict node reordering, a technique commonly used in non-genome graphs to improve access patterns [833, 834]. However, the fact that genome graphs encode biological sequences, and that queries are themselves biological sequences, opens new avenues for improving access pattern locality that are unavailable in conventional graph workloads. For example, k-mers from different query reads that share common substrings map to nearby regions in the graph's index structures. In contrast, most conventional non-genome graph queries do not exhibit this kind of structural coupling between the queries and the graph, limiting opportunities for analogous locality-aware optimizations.
2.6 Storing and Compressing Sequence Data
Importance and Growth of Sequence Data. Driven by continuing exponential drops in sequencing costs [849, 850] and the pivotal importance of genomic and metagenomic sequence analysis, sequence data volumes in public [1, 266, 267] and private [851, 852] repositories are growing by an order of magnitude every few years, approaching and expected to exceed the data volumes generated by various major internet media platforms [1, 2, 266, 267]. While genomic analysis also works on other data types (e.g., assembled genomes [243, 853, 854], epigenetic markers [855–858], and 3D chromosomal contact maps [859–861]), analyzing genomic sequence data is one of the most critical processes in genomics, with sequence data constituting the largest fraction of data stored and analyzed [862]. For example, sequence data is the largest class of data maintained at institutions like the National Center for Biotechnology Information and the European Molecular Biology Laboratory [862, 863]. Note that many other genomic data types (e.g., assembled genomes, epigenetic markers, and 3D chromosomal contact maps) are also derived from sequence data, so it is critical to store this sequence data to ensure both reproducibility and to enable reanalysis with future improved workflows. For example, while some tasks (e.g., variant calling as explained in Section 2.3.3) can start with already mapped reads, best-practice guidelines dictate that reads should be remapped during the course of a study to ensure the use of appropriate (updated [250,256,257,259–261] or personalized [257,258]) reference genomes and mapping parameters. This is reflected in the fact that, as of October 2025, 75.9% (18 peta DNA bases) of publicly-deposited whole-genome sequencing read sets [266,862] are in unmapped, i.e., FASTQ format [669], and their overall size has been growing at a rate of 42.5% on average per year over the last decade.
Genomic-Specific Compression. Due to the importance of storing genomic data space-efficiently, there exist many compression techniques (e.g., [459–470, 472–476, 483, 484]) specialized for genomic read sets. These techniques attain higher compression ratios (e.g., typically from ~2 to ~40 [459, 464, 469, 470]) than general-purpose compressors (e.g., typically from ~2 to ~6 [459]), because general-purpose approaches fail to leverage longer-range similarities common in DNA data [454, 864]. This large gap in compression ratios exists even with state-of-the-art general-purpose compressors in software (e.g., [485–491]) or hardware (e.g., [492–500]), which is the reason for the large emphasis in genomics to use genomic-specific compressors [472,864]. For example, hardware-based general-purpose Intel QAT [865] and IBM zEDC [866] compression accelerators lead to 2.6× and 2.7× lower average compression ratios, respectively, than genomic compressors [459,467] on our evaluated datasets (Chapter 7). Similarly, state-of-the-art software-based general-purpose compression algorithms such as xz [867] (a state-of-the-art LZMA-based compressor) and zstd [485], both at their highest levels, lead to 2.13× average (up to 6.7×) worse compression ratios than genomic compressors [459,467] on our datasets.
A genomic read set consists of two key parts: DNA bases and quality scores (as detailed in Section 2.2.2). Since quality scores do not have the same redundancy patterns as DNA bases, state-of-the-art genomic compressors process them in separate streams and compress them using various techniques (e.g., lossless context models [460, 462, 466, 468, 469] or block sorting [459], and lossy quantization [465]). Some tools (e.g., [232, 467, 471]) discard quality scores altogether since many recent workflows (e.g., [294, 435, 437, 769, 815]), particularly those using accurate reads, do not use quality scores.
Figure 2.7 shows an example of a typical genomic compression technique for DNA bases. Genomic compressors typically represent the DNA bases in each read set with a ① consensus sequence and ② the mismatches of each read in the read set compared to that consensus sequence [463, 465, 468, 470]. A consensus sequence is an approximation of the organism's genome, and can either be a user-provided reference [470] or a de-duplicated string derived from the reads, representing the most likely character at each location [463, 465]. Note that it is not sufficient to store only the consensus sequence to represent the read set because the consensus sequence alone does not capture the variations in the original reads. Individual reads

Figure 2.7: Overview of genomics-specific compression.
often contain unique differences, including sequencing errors [187, 188, 251, 868] or biological variation [773].
Given a consensus sequence, a lossless encoding of a read’s DNA bases consists of ① the read’s matching position in the consensus sequence (many compressors, e.g., [463–465, 467], store matching positions based on their order of appearance in the consensus, which enables space-efficient delta-encoding), ② mismatch positions (delta-encoded), ③ mismatch bases and types (i.e., substitution, insertion, deletion), and ④ read length (especially for long reads since they have variable lengths). This encoding of the DNA bases is then more compressible using general-purpose compressors (e.g., [465]), which are then used by the state-of-the-art genomic compressors to further compress the mismatch information.
Compression Does Not Replace Read Mapping. Note that identifying matching positions of a read against the consensus sequence during compression in genomic-specific compressors is independent from and does not eliminate the need for read mapping operations during subsequent analysis stages [257, 717, 869]. This is due to three complementary reasons. First, during compression, the exact reference genomes required for all potential future mapping analyses may not be known [257]. Second, as explained in Section 2.2, a read set may undergo mapping multiple times or at different times, with different reference genomes or mapping parameters. Therefore, simply having the matches against a single consensus sequence is insufficient. Third, during compression, only one matching position for each read is stored (to minimize the size of the read set), whereas various mapping use cases require many matching positions of each read [294, 717, 869].
2.7. SUMMARY AND OUTLOOK
37
2.7 Summary and Outlook
Genomic analysis examines the genomic information of living organisms and other biological entities. Traditional genomics focuses on the genome sequences of an individual (or a small group of individuals) from a single known species, whereas metagenomic analysis examines genome sequences from multiple species in a shared environment. Genomic and metagenomic analyses play critical roles in many fields, such as precision medicine, urgent clinical settings, and discovering early warnings of communicable diseases, ensuring food safety through pathogen monitoring, agriculture, and scientific discovery. The adoption of genomic and metagenomic analyses has been rapidly increasing in recent years, driven by their critical importance and the rapid advancement of sequencing technologies. These factors have led to exponential growth in sequence data generation. Due to the challenges of analyzing and storing massive volumes of this data, significant efforts have been made in accelerating (meta)genomic analyses and storing sequence data in compressed forms. Despite the benefits of these techniques in improving the analysis and storage of large-scale sequence data, we identify two major outstanding problems in accessing stored sequence data and feeding it to the analysis units: (i) the overhead of moving large amounts of low-reuse data from the storage system and the unnecessary burden on the rest of the system (e.g., main memory and computation units), and (ii) the data preparation bottleneck, where compressed sequence data needs to be first decompressed and formatted before it can be analyzed.
The goal of this dissertation is to (i) alleviate the data movement overheads of genomics and metagenomics analyses from the storage system and reduce the computational burden from the rest of the system, and (ii) mitigate the data preparation bottleneck while achieving high performance, energy efficiency, and compression ratios. We aim for our proposed designs to be lightweight such that they can seamlessly integrate with a broad range of genomic and metagenomic analysis systems.
To alleviate data movement overheads of moving large amounts of low-reuse sequence data from the storage system and reduce the overall computational burden from the rest of the system, we propose storage-centric computing (SCC) systems for genomic analysis (Chapter 4), metagenomic analysis (Chapter 5), and graph-based (meta)genomic analysis (Chapter 6), which plays critical roles in population-scale scenarios. SCC refers to processing data inside the storage device, either on the SSD controller (in-storage processing, i.e., ISP) or on the flash dies (in-flash processing, i.e., IFP). SCC can be a fundamental solution for alleviating this data-movement overhead by processing data where it originally resides. To mitigate the data preparation bottleneck, we propose an algorithm-architecture co-design for highly-compressed storage and high-performance access of sequence data (Chapter 7). Finally, we
2.7. SUMMARY AND OUTLOOK
38
describe how all storage-centric designs presented in this dissertation can be put all together at low cost (Chapter 8) and describe future opportunities and new directions enabled by the contributions presented in this dissertation (Chapter 9).
Chapter 3
Related Work
This chapter provides an overview of related work and describes where the prior work falls short. Section 3.1 discusses related work on techniques for reducing storage I/O overheads, including storage-centric computing. Section 3.2 discusses an overview of related work on memory-centric computing. Section 3.3 and Section 3.4 provide an overview of related work on accelerating genomic and metagenomic analyses, respectively. Section 3.5 discusses related work on accelerating graph-based (meta)genomics. Section 3.6 explains related work on genomic-specific compression.
3.1 Techniques for Reducing Storage I/O Overheads
The performance of many data-intensive applications is bottlenecked by storage I/O. A large body of work proposes techniques to reduce storage I/O overheads across different layers of the system stack. We summarize several key approaches.
3.1.1 Reducing the I/O System Stack Overheads
Several works aim to reduce the overhead of the software layers in the storage I/O stack (e.g., file system, block layer, device drivers, and various kernel subsystems). These layers introduce overheads related to context switches, data copies, lock contention, and interrupt handling. We discuss two broad classes of approaches that alleviate these overheads: (i) accelerating the I/O stack operations using specialized hardware or streamlined data paths, and (ii) bypassing the kernel via user-space I/O frameworks.
Accelerating the I/O Stack Operations
Various approaches aim to accelerate the I/O stack by offloading or streamlining its operations. We explain several key examples in this section.
Zero-Copy Techniques. Some techniques (e.g., [870–875]) reduce I/O overhead by eliminating unnecessary data copies between kernel and user space. For example, the mmap system call [870–872] maps files directly into the application's virtual address space, allowing applications to access stored data through memory load/store operations without relying on read/write system calls. While mmap avoids the cost of copying data into user-space buffers, it relies on the kernel's page-fault handling mechanism, which can cause large overheads. Other zero-copy techniques (e.g., [873,874]) reduce data copies for specific I/O patterns (e.g., transferring data between file descriptors) but still operate within the kernel I/O stack. io_uring [875] provides a modern asynchronous I/O interface that uses shared ring buffers between user and kernel space to reduce system call overheads, and supports zero-copy for both storage and network I/O.
Data Processing Units. Some works (e.g., [876–882]) propose Data Processing Units (DPUs), which are specialized units designed to offload data-centric infrastructure tasks from the host system and reduce the additional burden on the host. For example, some DPUs can handle NVMe protocol processing, compression, deduplication, and encryption. DPU-based storage offloading is particularly beneficial in multi-tenant cloud environments and disaggregated storage, where infrastructure tasks compete with application tasks for hardware resources.
Direct Storage Access for Accelerators. Some works (e.g., [584, 585, 883–886]) reduce the involvement of the host CPU from the storage access path by enabling hardware accelerators (e.g., GPUs) to access storage devices directly. Traditionally, GPU-based executions rely on the host CPU to manage all storage accesses, thereby introducing significant overheads. NVIDIA GPUDirect [883, 885, 886] and related technologies, such as Big accelerator Memory (BaM) [584, 585], accelerate GPU storage access by enabling direct access between storage devices and GPUs, reducing CPU involvements and overheads. These approaches are particularly effective for emerging workloads that require fine-grained, data-dependent access to large data structures stored in the storage system.
User-Space I/O Frameworks
Another approach for reducing I/O stack overheads is to bypass the kernel and enable applications to deal with storage devices directly from user space. For example, kernel-bypass approaches (e.g. [887–890]) provide a set of user-space libraries and drivers that bypass the ker-nel storage layers. Key examples include Storage Performance Development Kit (SPDK) [887], which unbinds NVMe devices from the kernel driver, and NVMeDirect [888], which provides a user-space I/O framework that leverages the kernel NVMe driver for control-plane operations while enabling user-space data-plane access.
3.1.2 User-Controlled Data Placement
Several storage interface standards (e.g., [615,891–894]) expose the internal organization of the storage device to the host system. This enables users to optimize data placement and reduce internal device overheads. For example, Zoned Namespaces (ZNS) SSDs [891,892] partition the storage address space into zones that must be written sequentially and give the host control over data placement within each zone. By leveraging zones across applications, the host can reduce write amplification and garbage collection (GC) overhead within the SSD. Open-Channel SSDs [615,894] expose the physical configuration of the SSD (e.g., channels, dies, blocks) to the host, allowing host-side software to implement its own specialized flash translation layer (FTL). This enables users to optimize data mapping, wear leveling, and GC policies based on the specific needs of their workloads.
3.1.3 Request Batching, Scheduling, and Prefetching
Some techniques reduce I/O overheads by considering relationships across different I/O requests. Request batching techniques (e.g., [895–897]) amortize I/O request overheads (e.g., interrupts, command encoding) across multiple requests. I/O scheduling techniques (e.g., [898–901]) reorder and merge requests to improve spatial locality and provide more storage-friendly access patterns. Prefetching techniques (e.g., [902–904]) predict future access patterns and proactively fetch data from the storage system into memory (or caches), overlapping I/O overheads with useful computation. However, the effectiveness of these techniques depends on the predictability of the applications' access patterns.
3.1.4 Caching and Buffering
Caching and buffering are fundamental techniques for reducing the number of storage accesses. By keeping frequently or recently accessed data in faster media (e.g., DRAM, SRAM), caches leverage temporal and spatial locality to serve some I/O requests without accessing the storage device itself. Operating systems maintain a page cache that transparently buffers recently accessed file data in main memory [905–908]. Database systems implement their own buffers with application-aware replacement policies that can outperform generic OS caching strategies [909, 910]. SSD controllers maintain internal DRAM caches for metadata (e.g., the flash translation layer mapping table) and for buffering write data before committing it to NAND flash. The effectiveness of caching techniques depends on the working set size relative to the cache size and the applications' access pattern locality.
3.1.5 Data Reduction
Data reduction approaches reduce the volume of data transferred between storage and computational units, thereby lowering the demands for I/O bandwidth and storage capacity. We explain two key techniques for data reduction.
Compression. Data compression (e.g., [485–500, 911–918]) reduces the size of stored data, thereby reducing the amount of data transferred during I/O operations. Compression can be applied at multiple levels: within the application, in the file system, block layer, or inside the storage device itself. Several works (e.g., [492–500, 911–918]) propose hardware compression to further improve compression performance. The trade-off is between compression ratio, performance, energy efficiency, and computational cost of compression/decompression. We further detail genomic-specific compression in Section 3.6.
Data Deduplication. Data deduplication techniques (e.g., [919–922]) identify and eliminate redundant copies of data, storing only unique data blocks and replacing duplicates with references to the unique copy. Deduplication can operate at the file level (coarse-grained) or at the sub-file block level (fine-grained), and can be performed inline (during writes) or as a post-processing step. In storage systems with high data redundancy, deduplication can reduce both storage capacity requirements and I/O overheads. However, deduplication can introduce metadata management overhead (for tracking block references and hash indices) and can lead to fragmentation of the logical-to-physical mapping, potentially increasing read amplification.
3.1.6 Hybrid Storage and Memory Systems
Hybrid storage and memory systems combine multiple storage and memory technologies with varying cost, capacity, and performance characteristics (e.g., HDDs, capacity-optimized SSDs, performance-optimized SSDs, persistent memory, and DRAM) to achieve different trade-offs. Various works (e.g., [547, 611, 923–931]) analyze these hybrid systems and/or propose placement and migration policies that determine where data resides across tiers based on access patterns and/or workload-specific heuristics. Tiered storage systems can operate transparently (managed by the OS or storage controller) or with the user's control.
3.1.7 Memory and Storage Disaggregation and Expansion
Rather than reducing the cost of each I/O operation, another class of approaches changes where data resides and over which interconnect it is reached. We explain two key techniques: expanding the byte-addressable memory tier beyond a single node, and decoupling storage capacity from the compute node.
CXL-Based Memory and Storage Expansion. Compute Express Link (CXL) [932, 933] is a cache-coherent interconnect layered on top of PCIe that allows a host to attach memory devices accessible via load/store instructions rather than through the block I/O stack. CXL memory expanders and memory pools increase the capacity of the memory tier well beyond the DIMM slots of a single node and enable capacity to be shared across hosts [932, 934], thereby reducing how often an application's working set spills to the storage device. However, despite its benefits, CXL technology does not eliminate the need to store and access large, low-reuse datasets in the storage system. We further evaluate the benefits of our proposed storage-centric designs compared to systems with large main memory in Chapters 5 and 6.
Disaggregated Storage. Disaggregated storage decouples storage capacity from the compute node and accesses it over a network fabric. For example, NVMe over Fabrics (NVMe-oF) [935] extends the NVMe command set across network fabrics, enabling a host to access remote SSDs with a latency approaching that of a locally attached device. This allows compute and storage to scale independently, improves device utilization, and simplifies capacity provisioning. However, every access additionally traverses the network stack and the fabric, which adds protocol-processing overhead, increases latency, and exposes requests to congestion and to interference from other tenants sharing the fabric and the remote device. These techniques are orthogonal to those we propose in this dissertation. In fact, disaggregation increases the value of reducing the volume of data that crosses the storage interface, since each byte that leaves the device also traverses the network fabric. Storage-centric computing (Section 3.1.10) therefore becomes even more beneficial as the storage system moves further away from the computational units.
3.1.8 I/O Amplification Reduction
I/O amplification occurs when the amount of data actually read from or written to the storage device exceeds the amount logically requested by the application. Write amplification in NAND flash-based SSDs mainly stems from garbage collection. Read amplification can occur due to mismatches between the application's access granularity and the storage device's minimum read unit. Several works (e.g. [615, 891, 936, 937]) propose techniques to reduce I/O amplification via more efficient log-structured storage [936], key-value separation that stores large values separately from their keys to reduce compaction overhead [937], and alignment of application data structures with the device's internal page and block sizes [615, 891]. As discussed in Section 3.1.2, techniques such as ZNS SSDs [891] and Open-Channel SSDs [615] enable host-managed data placement that can fundamentally reduce write amplification by ensuring that data with similar lifetimes is co-located in the same erase blocks.
3.1.9 Improving the Performance of the Storage Device
Orthogonal to system-level optimizations, improvements within the storage device itself can also reduce I/O latency and increase throughput. We describe several key examples.
Reducing Contention
Contention within the storage device arises when multiple requests compete for shared resources, such as channels, dies, planes, or internal buses. Some works aim to alleviate this contention by proposing efficient data placement (e.g., [938, 939]), lightweight network structures between the flash chips within the SSD (e.g., [562, 940, 941]), or reducing the overhead of management tasks within the SSD, such as GC (e.g., [942–944]).
Improving NAND Flash Chip Latency
Improvements in the NAND flash chip can directly reduce the fundamental read/write latencies of the storage device. Advances in NAND flash technology, such as transitions from SLC to MLC, TLC, and QLC, increase storage density but also increase read and write latencies [544, 545, 548, 549, 553, 555]. Various techniques aim to improve NAND flash performance via (i) voltage optimizations that reduce read latency by tuning the read reference voltages to the specific wear state of each block (e.g., [550–552]), (ii) optimizing read retry mechanisms (e.g., [566, 596, 945]), and (iii) partial programming techniques that enable finer-grained writes, thereby reducing the effective write latency for small updates (e.g., [556, 946, 947]), (iv) erase operation optimizations (e.g., [560]). Continual advances in memory technologies (e.g., 3D NAND with improved cell architectures) offer denser storage with improved scalability compared to planar NAND [559, 624, 948].
Other Storage Device Optimizations
Device-level optimizations include a range of controller and firmware improvements that enhance I/O performance. Some works (e.g., [568, 949, 950]) implement efficient command scheduling and queue management to improve performance, fairness across different applications/users, and quality of service.
3.1.10 Storage-Centric Computing
Storage-centric computing (SCC) is a computing paradigm that aims to overcome data movement overheads between the storage systems and computational units by making storage systems compute-capable. SCC can be a fundamental solution for alleviating storage I/O data-movement overheads by processing data where it originally resides. The benefits of SCC stem from three key reasons. First, SCC eliminates unnecessary data movement of low-reuse data across the system. Second, SCC reduces the computational burden imposed by low-reuse data on the rest of the system (e.g., main memory and computational units), thereby freeing resources for other useful work. Third, SCC can leverage the high internal bandwidth of SSDs [515, 592, 951–957]. In modern SSDs, the internal bandwidth often surpasses the external bandwidth. Over-provisioning the internal bandwidth is reasonable since 1) a modern SSD needs to perform various internal management tasks (e.g., garbage collection [545, 551, 563, 564, 568, 616, 617], wearleveling [545, 551, 623], and data refresh [545, 551, 552, 556–559, 569, 570, 624]) and 2) a higher channel count reduces contention between requests by interleaving data between the channels. The effective internal bandwidth increases even further when processing directly in the NAND flash dies, without the need to traverse the SSD channels [587, 589, 595].
SCC approaches can be broadly divided into three categories based on where computation is performed relative to the storage medium: (i) tightly attached processing, which places computational units outside but in close proximity to the storage device; (ii) in-storage processing (ISP), which places computational units within the storage device, on the storage controller; and (iii) in-flash processing (IFP), which performs computation within the flash dies. We briefly describe these three approaches.
Tightly attached processing places computational units outside the storage device but connects them closely to storage. Prior works, for example, tightly couple SSDs with computation units (e.g., [535, 537, 539, 540, 921, 956, 958–961]), enabling data accessed from storage to be processed without first moving to the conventional host processor and memory hierarchy. This approach benefits from the flexibility and computational capability of external accelerators. However, since computation remains outside the storage device, data must still cross the storage device's external interface before it can be processed, thereby limiting the amount of data movement that can be eliminated.
ISP places computational units within the storage device, typically in or near the SSD controller, as general-purpose computing units (e.g., [954, 962–974]), as FPGAs (e.g., [975–977]) or GPUs (e.g., [978]) tightly connected to the flash dies, or computing units specialized for different applications, such as artificial intelligence/machine learning (e.g., [526, 536, 951, 952, 955, 979–981]), pattern processing and k-mer counting (e.g., [523, 533]), graph analytics (e.g., [534, 538, 541, 542]), and others (e.g., [957, 982–990]). These works augment the computational capabilities already present in modern storage controllers with general-purpose or specialized processing units that operate directly on application data. Performing computation within the SSD avoids transferring all accessed data across the external storage interface and enables only the required results to be sent to the host. Compared with tightly attached processing, ISP eliminates data movement across the external SSD interface before computation. However, data must still be transferred from the flash dies through the SSD channels to the controller, where computation is performed.
IFP moves computation even closer to the stored data by performing computation within the NAND flash dies. IFP approaches (e.g., [525, 587–603]) add computational logic to the flash dies or exploit the existing operational properties of NAND flash arrays to perform computation. IFP can avoid not only data movement between the storage device and the host but also a significant fraction of the data movement between the flash dies and the SSD controller. It can further exploit the high internal parallelism and bandwidth available within individual flash chips. However, compared with tightly attached processing and controller-level ISP, IFP generally requires more substantial modifications to the flash die's architecture. Several works (e.g., [561, 592, 991]) propose SCC designs that combine ISP, IFP, and processing-in-memory (PIM).
Various works propose SCC for different applications, such as artificial intelligence/machine learning (e.g., [526, 536, 590, 591, 601, 951, 952, 955, 979–981]), pattern processing and k-mer counting (e.g., [523, 533, 992]), graph analytics (e.g., [534–542]), and others (e.g., [593, 598–600, 602, 957, 960, 982–990]). To our knowledge, our work, GenStore, is the first in-storage system designed for accelerating genome sequence analysis. GenStore works with both short and long reads, and different degrees of genetic variation between the compared genomes. A later work [524] proposes an additional filter for genomics in storage, which can be orthogonally combined with our design. Our work on SCC design for metagenomics, MegIS, is the first SCC system designed to significantly reduce the data movement overhead of the end-to-end metagenomic analysis pipeline. By addressing the challenges of leveraging ISP for metagenomics, MegIS fundamentally alleviates its data movement overhead from the storage system via its efficient and cooperative pipeline between the host and the SSD. Our work, GRAINS, enables SCC for graph-based (meta)genomic analyses via storage-aware algorithm-
3.2. MEMORY-CENTRIC COMPUTING
47
architecture co-design to (i) make the pipelines more storage-friendly and (ii) further improve performance, energy-efficiency, and cost-effectiveness via ISP and IFP.
Through storage-centric designs, our proposed techniques significantly alleviate the overhead of moving large amounts of low-reuse data from the storage system to the main memory and computational units, while reducing the computational burden on the rest of the system. Our techniques can be complementarily combined with various other approaches discussed in this section to further improve end-to-end performance. For example, our optimizations that make the genomic and metagenomic analysis pipelines more storage-friendly enable these pipelines to better leverage the available storage bandwidth provided by techniques such as direct storage access, user-space I/O frameworks, and storage device optimizations.
3.2 Memory-Centric Computing
Memory-centric computing (MCC) or Processing-in-Memory (PIM) is a computing paradigm that aims to overcome data movement overheads between main memory and computational units by making memory systems compute-capable [993–1002]. There are two general categories of MCC or PIM: (i) Processing near memory (PNM), which places computational units on the same die as memory controllers, the logic layer of 3D-stacked memory, or the memory itself, and (ii) Processing using memory (PUM), which leverages the analog properties of the memory technology to perform computation. We briefly describe these two approaches.
PNM can be divided into three general approaches. The first approach adds computational units to memory controllers (e.g., [1003–1007]). These works enable the memory controller to perform more tasks than just scheduling the memory requests. For example, some works devise computational units on the memory controller to reduce the round-trip cost of data movement, avoiding the latency of moving data within the cache hierarchy. While these works provide the key benefit of seamless integration with conventional memory technologies such as DDRx, they do not eliminate the data movement overhead from the memory device itself. As the memory controller typically resides on the same chip as the CPU, these works still require moving data between computational units and main memory.
The second approach places computational units in close physical proximity to (but not within) the memory chip, enabling near-data processing without modifying the memory chip itself (e.g., [1008–1011]). These designs typically rely on either (i) 2.5D integration, in which logic is placed alongside high-bandwidth memory chips on a silicon interposer, providing low-latency, high-bandwidth communication between the logic and memory dies; or (ii) module-level integration, in which logic is embedded on the same printed circuit board (PCB) as the memory chips. While this approach benefits from avoiding off-chip data transfers between the
3.3. ACCELERATING GENOMIC ANALYSIS
48
host processor and main memory, it still suffers from data movement between memory chip(s) and computational chip(s). Such data movement consumes more energy than data movement only within each memory chip.
The third approach adds computational units to the memory chip itself, either (i) on the logic layer of a 3D-stacked memory (e.g., [363, 366, 1012–1055]) or (ii) near memory banks (e.g., [1036, 1037, 1056–1069]) by leveraging manufacturing techniques that support mixing logic and memory within the chip. This approach benefits from the larger memory bandwidth inside the memory chip and higher energy efficiency compared to the two previous approaches.
PUM takes advantage of the existing interconnects and analog operational behavior of conventional memory architectures (e.g., SRAM, DDRx, LPDDRx, HBM, NVM, and NAND flash), without requiring dedicated computational units or a logic layer, and typically with low additional area and power overheads (e.g., [324, 331, 419, 1070–1154]). This approach takes advantage of the high internal bandwidth available within each memory cell array.
Our work on storage-centric design can be combined with memory-centric designs to provide large end-to-end benefits. For example, in Chapter 4, we demonstrate and evaluate how our proposed in-storage filter can be combined with a PIM-based read-mapping accelerator to remove I/O data movement overheads of the end-to-end read mapping process.
3.3 Accelerating Genomic Analysis
There have been extensive efforts to accelerate genomic analysis. Many works propose efficient heuristics and algorithmic optimizations (e.g., [238, 292–320]) and hardware accelerators (e.g., [253, 272, 321–415]).
Several works (e.g., [253, 272, 299, 300, 321, 326–344, 347–364, 366–368, 388, 417, 421–425, 514–516]) accelerate read mapping, a commonly-used operation in genomics. These works tend to follow two general directions: 1) non-filtering and 2) filtering approaches.
Non-filtering approaches accelerate one or more non-filtering steps of read mapping (e.g., seeding and approximate string matching) using hardware accelerators. Examples of these accelerators include processing-in-memory architectures [327–332, 363], ASICs [333–335], GPUs [336–347], and FPGAs [348–362].
Filtering approaches accelerate the pre-alignment filtering step of read mapping. These works provide highly-parallel read filtering heuristics that quickly eliminate dissimilar sequences before invoking computationally-expensive alignment algorithms. Examples of these accelerators include processing-near-memory architectures [418–420, 426], FPGAs [421–424, 427], GPUs [424, 425, 427], or traditional CPU-based acceleration [299, 300, 424].
3.4. ACCELERATING METAGENOMIC ANALYSIS
49
Our works on in-storage filters for genomics, GenStore, and on mitigating genomic data preparation bottleneck, SAGe, can be orthogonally combined with these works to improve the end-to-end performance of genome analysis. We show examples of integrating GenStore and SAGe with state-of-the-art genome analysis accelerators in Chapters 4 and 7, respectively.
3.4 Accelerating Metagenomic Analysis
There have been extensive efforts to accelerate metagenomic analysis.
Software Optimizations. Several tools (e.g., [265,428–433,437]) use comprehensive databases for high accuracy, but usually incur significant computational and I/O costs. Some tools (e.g., [434–439]) apply sampling to reduce database size, but at the cost of accuracy loss.
Hardware Optimizations. Several works use GPUs (e.g., [440–446]), FPGAs (e.g., [447–449]), and PIM (e.g., [4, 121, 450–453]) to accelerate metagenomics by alleviating its computation or main memory overheads. These works do not reduce I/O overheads, whose impact on end-to-end performance becomes even larger when other bottlenecks are alleviated. Some works [34, 282] accelerate metagenomic analyses that use raw genomic signals in targeted sequencing [271, 273, 274, 1155]. Targeted sequencing is not a focus of our work since this application looks for specific known targets in a sample, while we focus on cases where the contents of the sample are not known in advance and require looking up significantly larger databases.
Our work on SCC design for metagenomics, MegIS, is the first SCC system designed to significantly reduce the data movement overhead of the end-to-end metagenomic analysis pipeline. By addressing the challenges of leveraging ISP for metagenomics, MegIS fundamentally alleviates its data movement overhead from the storage system via its efficient and cooperative pipeline between the host and the SSD. We compare MegIS against a state-of-the-art processing-in-memory baseline in Chapter 5.
3.5 Accelerating Graph-Based Genomics and Metagenomics Analysis
Accelerating Operations on (Meta)Genome Sequence Graphs. Many works (e.g., [238, 309–320]) propose software tools for (meta)genome sequence graphs. Several works propose hardware tools for querying sequence graphs by alleviating computation (e.g., [388–397]) and/or memory overheads (e.g., [388, 398–401]). However, they do not alleviate I/O over-
3.5. ACCELERATING GRAPH-BASED GENOMICS AND METAGENOMICS ANALYSIS
50
heads, whose impact on end-to-end performance becomes even larger as other overheads are alleviated.
As shown in our evaluations in Chapter 6, our SCC system for sequence graphs, GRAINS, can flexibly integrate with these works to alleviate their I/O overhead. GRAINS enables SCC for graph-based (meta)genomic analyses via storage-aware algorithm-architecture co-design to (i) make the pipelines more storage-friendly and (ii) further improve performance, energy-efficiency, and cost-effectiveness via ISP and IFP. Some works (e.g., [402–414]) accelerate sequence graph construction, which is an important, but orthogonal task.
Accelerating Non-Genomic Graph Analysis. Many works accelerate graph analysis by alleviating computation (e.g., [847, 1118, 1156–1170]), main memory (e.g., [1012, 1121, 1169, 1171–1180]), or I/O (e.g., [534–540, 542, 961]) overheads. However, they are neither applicable to nor target the unique demands of genome graphs.
Our work, GRAINS, is the first SCC system designed to significantly reduce the data movement overhead of the end-to-end analysis pipelines on genome graphs. Although some works propose SCC systems to mitigate I/O in conventional, non-genomic graph analytics (e.g., [534–540, 542, 961]), they are neither designed for nor directly applicable to genome graphs, which have fundamentally different structures, access patterns, and analysis requirements. As detailed in Section 2.5, large-scale genome graphs use fundamentally different data structures than non-genomic graphs (e.g., those for the web, social networks, or road networks). For example, DBGs often store only nodes (or edges) and encode edges (or nodes) implicitly via overlaps, since explicitly storing both is prohibitively wasteful at the genomic scale. Therefore, optimizations for conventional graphs are not only insufficient for genome graphs but also miss opportunities to exploit their distinctive structure.
Some techniques reduce I/O overheads with techniques other than SCC. For example, some works perform graph node reordering (e.g., [1181, 1182]), but they cannot be applied to genome graphs since their state-of-the-art representations have stringent node ordering requirements [833, 834]. Some works (e.g., [1183, 1184]) propose data partitioning to partially alleviate I/O overheads in systems with relatively small main memory. Note that as shown in our motivational analysis in Chapter 6, which is on a system with sufficient main memory capacity (i.e., where main memory is larger than the whole accessed data structures and working set), large I/O overheads still exist due to the need for moving large amounts of low-reuse data from the SSD to main memory. In Chapter 6, we further evaluate a system with limited main memory capacity while incorporating graph partitioning in the baselines, and show that GRAINS achieves significant speedups in this setting as well.
3.6. COMPRESSING SEQUENCE DATA
51
3.6 Compressing Sequence Data
Efficient and compact compression techniques for genomics data are of critical importance due to the continuing exponential growth of genomics data repositories [1,2,266].
Genomics-Specific Compression. Many works (e.g., [233,459–484]) propose genomic compression. As detailed in Chapter 7, some works (e.g., [474,1185–1192]) accelerate certain computational kernels (e.g., BWT [1186, 1187], FM-Index search [1188–1190], and LZMA [474, 1192]) widely used in genomic compressors. Despite their benefits, these approaches (i) are unsuitable for resource-constrained environments and/or (ii) do not fully mitigate the end-to-end preparation bottleneck (evaluated in Chapter 7). While some works [1193, 1194] use algorithms that do not rely on expensive resources, they compress poorly. As a strongly conservative evaluation, 0TimeDec (evaluated in Chapter 7) can serve as an idealized representation of decompressors that, despite their optimized performance, cannot be integrated in resource-constrained environments. As shown in our evaluations, by integration in a resource-constrained environment, our proposal, SAGe, leads to significant performance benefits over 0TimeDec.
General-Purpose Compression. Many works propose general-purpose compression in software (e.g., [485–491]) or hardware (e.g., [492–500, 911–918]). However, as analyzed in Chapter 7, general-purpose compressors achieve poor compression ratios for genomic data [454, 864].
To our knowledge, our proposal for sequence data preparation, SAGe, is the first system to mitigate the data preparation bottleneck in sequence analysis. SAGe achieves compression ratios comparable to state-of-the-art genomic compressors and maintains a lightweight design for integration with a wide range of genomic and metagenomic systems.
Chapter 4
GenStore: In-Storage Filtering for Genomic Analysis
4.1 Motivational Studies
We perform experimental studies to understand the potential of efficient in-storage accelerators for improving the performance of genome sequence analysis applications.
4.1.1 Methodology
Read Mappers. We evaluate five read mapping systems, each of which adopts different optimization techniques to accelerate read mapping: 1) Base uses Minimap2 [294], a state-of-the-art software tool for read mapping. 2) SW-filter extends Minimap2 to filter out exactly-matching reads (i.e., reads that exactly match subsequences in one or more locations in the reference genome) using simple single-instruction-multiple-data (SIMD) operations, without requiring costly ASM operations. 3) Ideal-ISF uses an ideal In-Storage Filter (ISF) that can concurrently filter out exactly-matching reads inside the SSD while the host CPU performs read mapping for non-filtered reads. 4) ACC uses a state-of-the-art hardware accelerator for short read mapping, GenCache [419]. 5) Ideal-ISF+ACC uses an ideal in-storage filter (ISF) that can concurrently filter out exactly-matching reads inside the SSD while a hardware accelerator (ACC) performs read mapping for non-filtered reads.
System Configuration. To assess the impact of the storage subsystem on end-to-end application performance, we evaluate each of the five systems with four different configurations: 1) a low-end SSD (SSD-L) [619] with a SATA3 interface [1195], 2) a mid-end SSD (SSD-M) [1196] using a PCIe Gen3 M.2 interface [1197], 3) a high-end SSD (SSD-H) [1198] with a PCIe Gen4 interface [1199], and 4) a system where all of the processed data is pre-loaded to DRAM with no performance cost for pre-loading (DRAM), as the idealized case where storage I/O overheads are completely eliminated (we do not evaluate DRAM for Ideal-ISF and Ideal-ISF+ACC since using in-storage processing is contradictory to pre-loading all the data to main memory). We assume 8 channels for SSD-L and 16 channels for SSD-M and SSD-H, where the maximum bandwidth per channel is 1.2 GB/s. The maximum internal bandwidth is calculated by 1.2 GB/s × channel count. The external bandwidth of SSD-L, SSD-M, and SSD-H for sequential reads is 500 MB/s, 3.5 GB/s, and 7 GB/s, respectively. Hence, the internal bandwidth of SSD-L, SSD-M, and SSD-H for sequential reads is 19.2×, 5.48×, and 2.74× that of its external bandwidth, respectively.
We evaluate Base and SW-filter by running Minimap2 on a high-end server (AMD EPYC 7742 CPU [1200] with 1TB DDR4 DRAM). We simulate the performance of the other three systems using our simulation environment that faithfully models system components including DRAM and storage devices (see Section 4.3). We map all reads of a short read dataset against the human reference genome, where 80% of the reads have one or more exactly-matching subsequences in the reference genome [714, 715].
Key Features of an Ideal In-Storage Filter. We assume two key features for Ideal-ISF and Ideal-ISF+ACC. First, I/O overheads due to limited external SSD bandwidth are completely eliminated for filtered reads. Second, the system provides high in-storage filtering performance such that the filtering process can concurrently run in the SSD, and the latency of this filtering process is fully hidden by the read mapping of unfiltered reads in the host CPU (Ideal-ISF) or hardware accelerator (Ideal-ISF+ACC). We assume that the accelerator or the CPU streams through the input reads in batches and analyzes a batch concurrently with reading the next batch. Thus, the execution time of Ideal-ISF (+ACC) can be modeled as follows:
where , , and are the latency of reading the reference genome from the SSD into main memory, the latency of reading the unfiltered genomic reads from the SSD, and the latency of read mapping of the unfiltered reads, respectively. For a given input size, varies depending on the computation unit used for read mapping (i.e., the host CPU or accelerator), while the I/O-latency values only depend on the SSD configuration.
4.1.2 Results & Analysis
Figure 4.1 shows the execution time of read mapping in the five evaluated systems, each with four different storage subsystem configurations. We make four key observations.

Figure 4.1: Execution time of read mapping with four different storage configurations.
Observation 1. The ideal in-storage filter provides significant performance improvements over other systems. Ideal-ISF significantly outperforms Base and SW-filter (by and , respectively), and Ideal-ISF+ACC provides a large speedup ( ) over ACC, when they all use SSD-H. These large improvements are due to two key benefits provided by the ideal in-storage filter: 1) mitigation of data movement from the storage devices and 2) removal of the burden of filtering out 80% of the input read set from the rest of the system, including processors and main memory. To distinguish the effects of these two benefits, we analyze an ideal outside-storage filter (Ideal-OSF) that provides only the second benefit; this filter concurrently runs with the read mapper and fully overlaps the filtering process with the read mapping process of unfiltered reads. The execution time of Ideal-OSF (+ACC) can be formulated as follows:
where is the latency for reading all genomic reads from the SSD into main memory. Using SSD-H, Ideal-OSF leads to an execution time of 1.15 seconds, which is 60% slower than the Ideal-ISF+ACC. This is because is significantly larger than both and (in Equation (4.1)).
The remaining observations dive deeper into the effects of the I/O bottleneck on each read mapping system.
Observation 2. In Base and SW-filter, using high-end SSDs significantly improves read mapping performance over low-end SSDs, effectively reducing the storage performance bottleneck that exists in low-end SSDs. For example, using SSD-H instead of SSD-L reduces the execution time of Base and SW-filter by 24% and 38%, respectively, showing comparable performance to DRAM, where all the data is pre-loaded to main memory (i.e., no I/O accesses). This is because, by using SSD-M and SSD-H, the performance bottleneck of the application shifts to parts of the system other than I/O (e.g., CPU or main memory). This observation shows that I/O has a significant impact on application performance but this impact can be alleviated at the cost of expensive storage devices and interfaces. Note that, while SSD-M and SSD-H provide an order-of-magnitude higher bandwidth for sequential reads compared to SSD-L, it is challenging to scale a storage system's capacity using the high-end SSDs due to their significantly-higher prices and the relatively smaller number of the PCIe slots in a server.¹
Observation 3. Even though SW-filter outperforms Base, its filtering process is slow. Potentially, SW-filter could provide significant performance benefits over Base due to two reasons; 1) as explained, 80% of reads in the dataset exactly match the reference genome, so only 20% of the reads need to undergo the costly ASM computation; 2) exact-match filtering requires only simple computation, i.e., SIMD XOR operations used by SW-filter. However, even with DRAM, SW-filter's speedup over Base is only 41%. The limited speedup is mainly due to the large number of random memory accesses concurrently issued from all threads to the reference index (explained in Section 2.3.1). This observation highlights the potential of in-storage filtering. Even though both SW-filter and Ideal-ISF filter out the same fraction of reads, filtering outside the SSD must compete with the read mapping for the resources in the system (e.g., the limited main memory bandwidth). In contrast, filtering of reads inside the SSD (where the reads originally reside) can remove the burden of filtering from the rest of the system.
Observation 4. With a hardware accelerator (ACC), using the state-of-the-art SSD (SSD-H) does not fully alleviate the storage bottleneck, showing 23% longer execution time compared to when all the data is pre-loaded to main memory (DRAM). While using SSD-M and SSD-H in Base and SW-filter shifts the bottleneck away from I/O, ACC turns I/O into a bottleneck again. This is because ACC greatly reduces the computational bottleneck, which increases the relative effect of the storage subsystem on the end-to-end execution time. The ACC and Ideal-ISF+ACC results clearly show that data movement between the storage devices and the hardware accelerator, which has not been properly considered in prior read mapping acceler-
¹The cost of the total storage system depends on both the price of each SSD and the available interconnection slots in the systems. High-bandwidth interconnects such as PCIe take up very large space in the system. As a result, there are fewer PCIe slots than SATA slots in a system. For example, building a 16-TB storage system with a single PCIe SSD (Micron 9300 PRO [1201]) costs more than 3,000 USD, while the cost is less than 1,600 USD if we use four 4-TB SATA SSDs (WD BLUE [1202]).
ators [327, 328, 333–338, 348–351, 363, 419], can significantly bottleneck the potential benefits of the accelerator.
Comparison to Other Near-Data Processing Systems. Even though read mapping could also benefit from other near-data processing (NDP) approaches such as processing-in-main memory (PIM) [328, 366, 1203, 1204] or processing-in-caches [419], in-storage processing can fundamentally address the data movement problem by filtering large, low-reuse data where the data initially resides. As an extreme example, even if an ideal accelerator achieved a zero execution time for read mapping by addressing all of the computation and main memory overheads, there would still exist the need to bring the data from storage to the accelerator. In our motivational study, even SSD-H takes at least 1.55 seconds to read the entire dataset, which is slower than the execution time that Ideal-ISF+ACC provides (0.72 seconds). Thus, even though solutions such as processing-in-memory can improve read mapping execution times, they still need to pay the cost of data movement from storage to the main memory [327–333, 363, 366, 418]. Therefore, an in-storage filter can be further integrated with any mapping accelerator, including PIM accelerators, to alleviate their data movement overhead.
4.1.3 Our Goal
Based on our observations, we conclude that an efficient in-storage filter can be a key enabler for read mappers to achieve high performance in both conventional software-based (e.g., Base and SW-filter) and new hardware-accelerated (e.g., ACC) genomics systems. In particular, in-storage filtering enables the system to take full advantage of the high computation capability of hardware accelerators by fundamentally addressing the data movement bottleneck. Our goal is to design an in-storage filter for genome sequence analysis in a cost-effective manner.
We have three key objectives in designing our new system. First, the system should provide high in-storage filtering performance to overlap the filtering with the read mapping of unfiltered data (as Ideal-ISF does in our motivation study). Second, it should support reads with 1) different properties (e.g., lengths and error rates) and 2) different degrees of genetic variation in the compared genomes. Third, it should not require significant additional hardware overhead, e.g., complicated logic circuits or large SRAM/DRAM memory.
4.2 GenStore
We propose GenStore, the first in-storage processing system tailored for genome sequence analysis. GenStore greatly reduces both data movement and computational overheads of genome sequence analysis by exploiting low-cost and accurate in-storage filters. GenStore supports reads with different properties (lengths and error rates) and different degrees of genetic variation in the compared genomes. We primarily design GenStore as an in-storage accelerator, which is an extension of the existing SSD controller and flash translation layer (FTL). GenStore is designed to be integrated into the system such that, when the accelerator is not in use, the entire storage device is available to all other applications, just like in a general-purpose system today.
4.2.1 Overview
The key idea of GenStore is to exploit low-cost in-storage accelerators to accurately filter out the reads that do not require the expensive alignment step in read mapping and thus significantly reduce unnecessary data movement from the storage system to main memory and processors. Figure 4.2 shows the overall architecture of GenStore and how it interacts with the host system. GenStore employs two types of hardware accelerators: ① a single SSD-level accelerator and ② channel-level accelerators, each of which is dedicated to a channel. The GenStore-FTL ③ communicates with the host system and manages the metadata and data flow over the SSD hardware components (i.e., NAND flash chips, internal DRAM, and in-storage accelerators).

Figure 4.2: Overview of GenStore.
Once the host system indicates that the SSD should start analysis as required by a read mapping application (① in Figure 4.2), GenStore prepares for operation as an accelerator (②). It flushes the conventional FTL metadata necessary to operate as a regular SSD (e.g., L2P mappings [563]), while loading the GenStore metadata necessary for each use case (Section 4.2.4 provides more details on GenStore FTL). After finishing the preparation, GenStore starts the filtering process. It keeps concurrently reading the data to process from all NAND flash chips
(③) via multi-plane operations (i.e., it exploits the SSD’s full internal bandwidth, which is much higher than the I/O bandwidth between the SSD and host system [952, 954]), while filtering out reads (④) that do not have to undergo further analysis (e.g., ASM computation). Doing so is possible due to multiple channel-level accelerators that provide computational throughput matching the SSD’s internal bandwidth even for the most complicated computation required for filtering. The host system performs further computation as soon as GenStore sends unfiltered reads (⑤), which removes GenStore’s filtering process almost completely from the critical path of the application.
As explained in Section 2.1, most of the internal DRAM is occupied by the regular L2P mapping. Therefore, flushing the regular L2P mapping data into NAND flash memory enables GenStore to exploit most of the GB-scale DRAM (e.g., 4GB DRAM in a 4TB SSD [618]) for its operations, which significantly reduces the overhead of additional internal DRAM that might otherwise be required to store the GenStore metadata necessary for the filtering process. We carefully design the GenStore filtering algorithms to only sequentially access the underlying NAND flash chips, so GenStore requires only a small amount of metadata to access the stored data. Therefore, GenStore can use most of the internal DRAM space for such metadata. We envision that all GenStore metadata are built offline by the host or some other system (e.g., by the sequencing machine when the read set or reference genome are initially stored to the SSD). Constructing GenStore metadata is a one-time preprocessing step that can be performed independently of the read mapping process, while the result of the preprocessing step can be used multiple times for different genomics applications.
There exist two main challenges in designing GenStore as an efficient in-storage filter for read mapping. First, the behavior and data-access patterns in read mapping significantly vary depending on the read properties (length and error rate) and genetic variation between the compared genomes. Second, hardware resources (e.g., CPU and DRAM) are quite limited even in modern high-end SSDs. We address these challenges via thorough hardware/software co-design tailored for filtering 1) exactly-matching reads, i.e., reads that exactly match subsequences of the reference genome (Section 4.2.2), and 2) most of the non-matching reads, i.e., reads that would not align to any subsequence of the reference genome (Section 4.2.3).
4.2.2 GenStore-EM for Exactly-Matching Reads
Approach Overview
GenStore-EM accelerates read mapping by using an efficient in-storage filter for reads that have at least one exact match in the reference genome. Due to the low error rates of short reads, combined with low genetic variation between the compared genomes, a large fraction of short reads map exactly to the reference genome [419,714,715]. For example, on average 80% of human short reads map exactly to the human reference genome [419,714,715]. Since exact-match detection is computationally cheaper than ASM, concurrently filtering exact-matching reads inside the SSD can significantly improve the runtime of read mapping (as we demonstrate in Section 4.1). Note that, GenStore-EM is not applicable to long reads due to their greater length. For example, for a 10K base pair-long human read, even with zero sequencing error rate, the probability of the read exactly matching a subsequence in the reference genome is very low (e.g., ) due to natural genetic variation.²
Key Challenges. The key challenge in designing GenStore-EM is the large number of random accesses to large data structures inside the SSD. As explained in Section 2.3.2, identifying exact matches for read mapping requires a number of random accesses for each k-mer in a read to two large data structures: 1) a large k-mer index, to find potential matching locations of each k-mer in the reference genome, and 2) the reference genome, to find candidate matching sequences at the candidate matching locations in the reference genome. Handling random accesses to large data structures is challenging for NAND flash-based SSDs for two reasons. First, NAND flash memory exhibits poor performance for random access reads. Second, we cannot use in-SSD DRAM to store the large data structures that are randomly accessed, since even in high-end SSDs, the size of internal DRAM is relatively small (e.g., 4 GB [618]) compared to the size of the data structures that GenStore-EM needs to handle (e.g., 7 GB for the human reference genome and its index [294]).
Key Idea. The key idea in GenStore-EM is to sequentialize most data accesses via a carefully designed metadata structure and data layout. To do so, we design a new sorted, read-sized k-mer index structure. This index enables sequential scanning of the read set and the new index, with only one index lookup per read while performing filtering.
Figure 4.3 shows the key idea of GenStore-EM with a simplified example in which each short read consists of three base pairs (bps).³ Suppose that we have two data structures: 1) a sorted read table (SRTable), each entry of which stores a read and its unique ID, and 2) a sorted k-mer index (SKIndex), which contains all unique read-sized k-mers of the reference genome, along with each k-mer’s corresponding locations in the reference genome. Each data structure is sorted by read/k-mer in alphabetical order. With these two data structures, it is possible to identify each read’s exactly-matching locations in the reference genome by streaming both reads and k-mers through a simple comparator. We use two pointers, r and k, which point to
²A typical human genome contains genetic variations at ~4.1 to 5 million [714] out of a total of ~3.2 billion base pairs [1205]. Thus, each 10K-bps read contains, on average, ~12.5 to 15.3 base pairs that are different from the reference genome.
³In a realistic scenario, the read length is much larger (e.g., 150 bps).

Figure 4.3: Overview of the key idea of GenStore-EM.
the current entries we are examining in SRTable and SKIndex, respectively. We sequentially increment the two pointers in three different ways based on the comparison result of the current read and k-mer. First, when the current read and k-mer are identical (① in Figure 4.3), we record the read as an exactly-matching read and increment r and k. Second, if the read is alphabetically larger than the k-mer (②), we conclude that the k-mer does not match any read in SRTable and increment k (so that we can examine if the next k-mer matches the read). Third, if the k-mer is alphabetically larger than the read (③), we conclude that the read does not match any k-mer in SKIndex. We record the read as not an exact match and increment r (so that we can examine the next read).
GenStore-EM’s two data structures and filtering algorithm enable an exact-match filter highly suitable for in-storage processing. First, since these two data structures are only sequentially accessed, the filtering process can be done in a streaming manner, leveraging the high sequential read bandwidth of NAND flash memory. Second, we can easily perform exact-match detection of a read and a read-sized k-mer with simple comparator logic and fully pipeline the filtering process with sequential access to the data structures.
A read-sized k-mer index increases the total amount of accessed data for read mapping. The reason is that a read-length value of k (e.g., k=150) significantly increases the number of unique k-mers, compared to the k values commonly used in conventional read mappers (e.g., k=15). For example, the size of an index structure for all unique k-mers in the human reference genome is 21 GB when k=15, while the size increases to 126 GB when k=150. However, our proposal (i.e., a large yet sequentially-accessed SKIndex) is feasible and desirable for in-storage processing due to the large capacity and high internal bandwidth of modern NAND flash-based SSDs.
Design of GenStore-EM
Figure 4.4 illustrates the overall operational flow of GenStore-EM, which consists of two steps: Step 1. data fetching and Step 2. exact-match filtering. GenStore-EM uses the two data structures explained in Section 4.2.2: 1) a sorted read table (SRTable) for storing the read set and 2) a sorted k-mer index (SKIndex) for storing read-sized k-mers from the reference genome. Step 1 reads the two data structures from NAND flash chips to the SSD's internal DRAM in a batched manner (① in Figure 4.4). Step 2 performs exact-match filtering within each read batch, using simple comparator logic in the SSD-level accelerator (②). Steps 1 and 2 are performed in a pipelined manner. During filtering, GenStore-EM sends the unfiltered reads to the host system for full read mapping. This enables the concurrent filtering of reads in the SSD and read mapping of the unfiltered reads in the host system.

Figure 4.4: Overview of GenStore-EM.
Data Structures. We carefully design SRTable and SKIndex to minimize performance and storage overheads of GenStore-EM, by extending the two data structures described in Figure 4.3 in two aspects. First, both SRTable and SKIndex contain a strong hash value (e.g., SHA-1 [1206] or MD5 [1207]) of each read and read-sized k-mer, respectively, which is used as both the sorting criterion of the data structures and a fingerprint of each read and k-mer that is used by the comparator logic. Second, unlike the data structures described in Figure 4.3, SKIndex no longer contains the k-mers of the reference genome but only the fingerprints of the k-mers. Using strong hash values enables GenStore-EM to determine exact matches between a read and a k-mer by comparing only their fingerprints, which provides two benefits. First, it reduces the storage overhead of SKIndex by obviating the need to store the raw read-sized k-mers.⁴ For the human reference genome, the size of the optimized SKIndex (which stores fingerprints instead of read-sized k-mers) is 32 GB when the read size is 150 bps, which is 3.9× smaller than the size of the unoptimized SKIndex. Second, using fingerprints significantly reduces the performance overhead of exact-match detection by avoiding comparisons of reads and k-mers that are hundreds of bytes in size.
Note that such exact-match detection does not affect the accuracy of read mapping due to the extremely low collision rate of strong hash functions. Even in an extremely rare case of a hash collision, the impact of the collision on GenStore’s accuracy will be negligible [522], since the DNA information loss due to the falsely filtered read will highly likely be compensated by other reads generated from the neighboring locations in the DNA, which almost fully overlap with the falsely filtered read but have totally different hash values. This is because it is common practice to sequence each DNA fragment several times (i.e., with high coverage) to improve the accuracy of downstream genetic analyses [252, 1208–1210].
We envision that all GenStore data structures are built offline by the host or some other system (e.g., by the sequencing machine when the read set or reference genome are initially written to the SSD). This preprocessing overhead can be hidden by two essential initial steps of the genome sequence analysis pipeline: 1) sequencing and 2) basecalling. For example, in the current highest-throughput Illumina NovaSeq 6000 sequencer [289], sequencing and base-calling work in a pipelined manner and generate genomic read data at a limited throughput of 18.9 MB/s [289]. We analyze the throughput of GenStore’s preprocessing step (i.e., generating hash values and sorting reads) and observe that even a personal laptop [1211] can provide 174 MB/s of preprocessing throughput. Therefore, GenStore’s preprocessing can be done in a pipelined manner with sequencing/basecalling, without decreasing the overall throughput of these steps. This low preprocessing overhead can be further amortized since the preprocessed data can be reused multiple times in different read mapping experiments.
Step 1. Data Fetching. GenStore-EM reads SRTable and SKIndex in batches, while exploiting the full internal bandwidth of the SSD. In Figure 4.4, we refer to each batch of SRTable as an SRTable Batch and each batch of SKIndex as an SKIndex batch. The batch size is equal to the size of data that can be read in parallel by a multi-plane read operation for each chip (i.e., Number of Planes in the SSD × Page Size), which enables 100% utilization of the NAND flash chips while reading a batch. As shown in Figure 4.4 (bottom), GenStore-EM stores the SRTable and SKIndex to NAND flash chips in an interleaved manner so that each of the data structures can be sequentially, evenly distributed across all the NAND flash chips.
⁴We design SRTable to store the raw reads so that we can transfer unfiltered reads to the host for full read mapping after we detect them as non-exactly-matching reads.
GenStore-EM exploits the SSD’s full internal bandwidth using double buffering. As shown in Figure 4.4, GenStore-EM employs two sets of batch buffers in the internal DRAM: SRTable Buffer (for SRTable) and SKIndex Buffer (for SKIndex), each of which can store two batches of the respective data structure. After Step 1 finishes fetching Batch#i, it proceeds to fetching Batch#i + 1, while Step 2 starts working on Batch#i. If the two steps work with the same throughput, we only need to buffer two batches for each data structure. For example, to enable double-buffering in an 8-channel SSD (with four 2-plane dies per channel and 16-KiB pages), the batch buffers require 8MB DRAM space in total.
Step 2. Exact-Match Filtering. Step 2 scans through each batch of SRTable and SKIndex stored in SRTable Buffer and SKIndex Buffer, respectively, comparing the fingerprints (strong hash values) with a simple hardware comparator. When (where is the fingerprint of , and and are the -th read and -th k-mer in the current batch, respectively), Step 2 scans SKIndex while increasing until it finds such that . If , it is guaranteed that no exact match exists for read , so GenStore-EM sends to the host for the read mapping process. When , i.e., the two fingerprints are identical, GenStore-EM marks the read as an exactly matching read.
Due to the simple computation in Step 2, the execution time of GenStore-EM is bottlenecked by Step 1 (Data Fetching). As explained, Step 1 only streams the data structures in batches from the underlying NAND flash chips to the internal DRAM, leveraging the SSD’s full internal bandwidth. Therefore, the performance of GenStore-EM can be easily scaled up by increasing the SSD’s internal parallelism (e.g., by deploying more channels or using low-latency NAND flash memory [565, 566, 1212]).
4.2.3 GenStore-NM for Non-Matching Reads
Approach Overview
GenStore-NM filters most of the reads, i.e., reads that would not align to any subsequence in the reference genome. This is motivated by the fact that in read mapping, a large fraction of reads might not align to the reference genome due to 1) the high sequencing error rate (in long reads) and/or 2) high genetic variation between the compared genomes (in both short and long reads). To illustrate this, we analyze four read mapping use cases, one with read sets with high sequencing error rates, and three with high genetic variation in the compared genomes. Use cases with high genetic variation include 1) samples from rapidly-evolving species (such as SARS-CoV-2 [1213]) that have high genetic variation compared to the reference genome, 2) samples with no known reference genomes, and 3) mapping a read set against the human reference genome to filter out human contamination, i.e., reads that have been sequenced from human-origin contaminant DNA in a non-human sample.⁵ For each use case (except for the Contamination use case), we analyze two different combinations of the input read set and the reference. Table 4.1 summarizes the result of this analysis by showing input read sets, the properties of each read set (e.g., read length and dataset size), reference genomes, and the percentage of reads in each read set that align to subsequences in the reference genome. We observe that a large fraction of reads (31.7%–99.6%) within a read set does not align to any subsequence in the reference genome. Quickly filtering this large fraction of non-aligning reads in the SSD can reduce the large data movement from the storage and expensive ASM computation for reads that would not align.
Table 4.1: Fraction of aligning reads in various read mapping use cases with short and long reads.
| Use case | Input read set (Short/Long) | Size [GB] | Reference | Align [%] |
|---|---|---|---|---|
| Sequencing errors | ERR3988483 (L) [1216]HG002_ONT_20200204 (L) [1217] | 54371 | hg38 [1205] | 47.469.3 |
| Rapidly evolving samples | SRR5413248 (L) [1216]SRR12423642 (S) [1216] | 1.690.466 | NZ_NJEX02 [1218]NC_045512.2 [1219] | 60.023.1 |
| No reference | SRR6767727 (L) [1216]SRR9953689 (L) [1216] | 12.415.9 | NZ_NJEX02 [1218] | 0.3537.0 |
| Contamination | SRR9953689 (L) [1216] | 15.9 | hg38 [1205] | 1.0 |
To avoid expensive ASM computation for reads that would not be aligned, state-of-the-art read mappers commonly employ a step called chaining (described in Section 2.3.1), which calculates each read’s similarity score (called chaining score) to the reference genome and filters out reads with a low score. GenStore-NM uses this basic idea of chaining to build an in-storage filter.
Key Challenges. Calculating a chaining score in the SSD is challenging because finding the best chaining score requires performing an expensive dynamic programming (DP) algorithm on every potential matching location (i.e., seed) within a read (explained in Section 2.3.1). Normally this operation has time and space complexity, where is the number of seeds. Even though a chaining score can be approximated accurately in time and space by considering only seeds at a time [294], we observe that some long reads can have up to thousands of seeds due to their length. Therefore, designing a chaining accelerator to
⁵Contamination of non-human samples with human DNA is commonly observed [203, 1214] and corrected for [148, 203, 1215].
perform an expensive DP algorithm on these large reads () can incur significant performance or area overheads.
Key Ideas. To avoid such expensive chaining, GenStore-NM selectively performs a fast version of chaining only on reads with a small number of seeds and sends other reads to the host system for full read mapping (including complete chaining). This idea is based on our key observation that 1) a read with a large number of seeds most likely aligns to the reference genome and does not require in-storage filtering, and 2) selective chaining can filter many non-aligning long reads, without requiring costly hardware resources in the SSD. Figure 4.5 shows the alignment probability of a read in a long read dataset (SRR5413248 [1220] in Table 4.1) to subsequences in the reference genome (NZ_NJEX02 [1218]), as a function of the number of seeds per read (). The average read length in this dataset is 10K base pairs and the number of seeds goes up to several thousands for some reads. We observe that reads with a sufficiently large number of seeds are very likely to align to subsequences in the reference genome (e.g., at least 85% of reads with seeds align). Such reads can be directly sent to the CPU for full read mapping (bypassing the in-storage chaining-based filter).

Figure 4.5: Alignment probability as a function of the number of seeds per read in a long read mapping use case.
We extend this analysis to read datasets from various organisms commonly used in genomics studies: E. coli [1218], yeast [1221], thale cress [1222], fruit fly [1223], mouse [1224], and human [1205]. We observe that when a read has , or 256 seeds, it aligns with average probabilities of 88.87%, 91.32%, and 93.84%, respectively. Based on these observations, we design GenStore-NM to selectively perform chaining only on reads with fewer than seeds, while sending reads with at least seeds to the host system.⁶ This selective chaining significantly reduces the chaining execution time and additional hardware area cost, while filtering most reads that would not align to the reference genome.
⁶GenStore-NM's design can be tuned based on different values of .
Design of GenStore-NM
Figure 4.6 shows the overview of GenStore-NM that filters out most of the non-matching reads in three steps. In Step 1, GenStore-NM reads the input read set from the flash chips, generates minimizer k-mers for each read (as explained in Section 2.3.1), and looks up each minimizer in a K-mer Index (KmerIndex) to find the potential matching locations, i.e., seeds (① in Figure 4.6). In Step 2, GenStore-NM counts the number of seeds in each read to decide if the read needs to go through chaining (②). To further improve overall performance, Step 2 also filters out reads with too few seeds (i.e., < M), which would not align to the reference and thus would be filtered anyway by the baseline read mapper [294]. In Step 3, GenStore-NM filters reads based on their chaining scores using a fast and efficient chaining accelerator (③). If a read has at least one chain with a score above a specified threshold, it is sent to the CPU for mapping. Otherwise, the read is filtered. All three steps run in a pipelined manner.

Figure 4.6: Overview of GenStore-NM.
Data Structures. We carefully design the KmerIndex to reduce the SSD's internal DRAM capacity required for storing it. KmerIndex, similar to the index used by the baseline read mapping tool (i.e., Minimap2 [294]), is a hierarchical hash table. To reduce the memory capacity required for storing the KmerIndex, we make three modifications: 1) not store the reference genome since it is not needed by our approach, 2) not store seeds with many matching locations (e.g., more than 495 locations in the baseline read mapper [294])⁷ since read mappers usually ignore such seeds in the chaining process [294], and 3) increase the number of hash table buckets so that each bucket holds one minimizer. Increasing the number of buckets increases the false positive rate in the filter, which leads to finding extra seeds and performing extra chaining operations (without loss of accuracy). We make this trade-off to reduce the
⁷Each matching k-mer can map to one or more locations in the reference genome.
KmerIndex's size and the required memory space. These optimizations reduce the size of the index for the human reference genome [294] from 5.8 GB to 2.9 GB, which enables GenStore-NM to easily store the KmerIndex in the limited DRAM space inside the SSD.
Step 1: Seed Finding. This step finds the potential matching locations of a read (i.e., seeds) in the KmerIndex. GenStore-NM first reads the input read set from all flash chips (① in Figure 4.6). GenStore-NM exploits the full internal bandwidth of the SSD by reading the read set in parallel via a multi-plane read operation for each chip (same as GenStore-EM, Section 4.2.2). In a shifting buffer (called the K-mer Window) in the channel-level accelerator, GenStore-NM stores the w most recently read k-mers of each read. For each sliding window of w k-mers, GenStore-NM finds the minimizer of the window (described in Section 2.3.1) using a 64-bit Integer Mix hash function (hash64) [1225] in the SSD-level accelerator (②). GenStore-NM queries each minimizer in the KmerIndex until it reads N seeds (e.g., N = 64) or it reaches the end of the read (③). Each index query takes up to two memory accesses (to visit the two levels of the hash table). GenStore-NM stores the seeds in the Location Buffer in the channel-level accelerator (④), and moves to Step 2.
Step 2: Seed Count-Based Filtering. This step compares the number of seeds in the Location Buffer with a lower bound M and an upper bound N. If a read has fewer than M matching seeds, it is filtered since it will not meet the minimum chaining score requirement of the baseline read mapper [294]. If the read has more than N seeds, it means that the read will very likely align to the reference (e.g., reads with at least 64 seeds in Figure 4.5) and thus require the full read mapping process. GenStore-NM sends such reads to the host system for the full read mapping process. This way, the read mapping process of the unfiltered reads can run concurrently with GenStore's filtering operations. For any other read, GenStore-NM performs chaining in the SSD in Step 3.
Step 3: Chaining-Based Filtering. This step performs chaining (see Section 2.3.1), a step commonly used in state-of-the-art read mappers [294, 702, 1226] to filter out reads with low chaining scores and send reads with high chaining scores to the CPU to undergo the full read mapping process. The key difference in GenStore-NM's chaining process compared to existing read mappers is that GenStore-NM selectively performs chaining only on reads with lower seed counts than a threshold N. Such selective chaining is based on our two key observations; 1) a long read with many seeds most likely aligns to the reference genome and thus does not require in-storage filtering, and 2) selective chaining can filter many non-aligning long reads, without requiring costly hardware resources in the SSD (as shown in Section 4.2.3).
The default value for w in Minimap2 [294] is 10, but GenStore's design can be tuned for different values.
We use M=3, as in [294], but GenStore-NM's design trivially supports different values of M.
We design GenStore-NM's chaining unit based on the chaining algorithm used in Minimap2 [294], a state-of-the-art baseline read mapper. A chain is computed from a sequence of seeds of lengths , respectively. For a given seed , () denotes the ending position of the seed's matching location in the reference genome (the read). The chaining score acts as an approximation of an alignment score, increasing linearly with the number of matching base pairs between the read and the reference, and decreasing with the size of gaps between the seeds. The chaining score is defined as follows (based on [294]):
where is the best chaining score which can be computed with the seeds . Given a chain whose last seed is , (also called the match score) is the number of new base pairs added to the chain after adding . (also called the gap penalty) subtracts from the chain score based on the distance between and in the reference genome.¹¹
GenStore-NM's Chaining-Based Filter (in Figure 4.6) consists of 1) a Chaining Buffer to store , , , and values and 2) a Chaining Processing Element (PE) based on Equation (4.3). Figure 4.7 shows the design of the Chaining PE in the channel-level accelerator. We reduce the latency and size of this unit by approximating multiplication with shift operations. We ensure that our hardware optimizations always over-estimate the chaining score so that we do not filter out any potential read mappings. GenStore-NM does not affect the accuracy of the read mapper because the filter performs the same computations as the baseline chaining filter for reads with seeds < N inside SSD. The chaining PE needs to be executed times per read where is the number of seeds per read and is the DP-iterations of each seed. Due to the limited number of seeds that go through the chaining step, we limit the number of chaining units that are needed to match the full internal bandwidth of SSD.

Figure 4.7: Chaining processing element (PE) in GenStore-NM.
¹⁰Sorted based on their locations in the reference genome.
¹¹See Minimap2 [294] for more details regarding and .
Similar to GenStore-EM, the steps of GenStore-NM are pipelined. The performance of GenStore-NM can be easily scaled up by increasing the SSD's internal parallelism (e.g., by deploying more channels or using low-latency NAND flash memory) [565, 566, 1212].
4.2.4 GenStore Flash Translation Layer (FTL)
GenStore requires simple changes to the existing FTL code.
GenStore FTL Metadata. GenStore metadata includes the mapping information of the data structures necessary for read mapping acceleration, which enables access to the data structures without the L2P mapping table of the regular FTL. In accelerator mode, where GenStore operates as an accelerator, GenStore also keeps in internal DRAM other metadata structures of the regular FTL (e.g., the page status table and block read counts [551, 566]) which need to be updated during the filtering process. We carefully design GenStore to only sequentially access the underlying NAND flash chips while operating as an accelerator, so it requires only a small amount of metadata to access the stored data.
Data Placement. GenStore needs to properly place its data structures to enable the full utilization of the internal SSD bandwidth in accelerator mode. When each data structure is initially written to the SSD, GenStore sequentially and evenly distributes it across NAND flash chips. We design GenStore to store every data structure using multiple sets of NAND flash blocks such that each block set consists of NAND flash blocks with the same block offset across the planes in a die. For example, a die's block set k includes all NAND flash blocks whose offset is k in the die. Such data placement enables GenStore not only to always perform multi-plane read operations during the filtering process, but also to significantly reduce the size of GenStore metadata. For example, suppose that a GenStore-enabled SSD consists of 128 2-plane NAND flash dies, and the block size is 12 MB (i.e., the size of each block set would be 24 MB). In such a case, GenStore can specify the physical location of a 30-GB data structure by maintaining only the list of 1,250 (30 GB/24 MB) physical block addresses. This way, GenStore significantly reduces the size of the necessary mapping information from 300 MB (with conventional 4-KiB page mapping) to only 5 KB (1,250×4 bytes), and the saved internal DRAM space can be used for loading data structures in the accelerator mode.
SSD Management Tasks. In accelerator mode, GenStore stops working as a regular SSD. It only reads data structures to perform filtering, and does not write any new data. Therefore, GenStore does not require any write-related SSD-management tasks such as garbage collection [551, 563, 564, 568, 616] and wear-leveling [545, 551, 623].
The other tasks necessary for ensuring data reliability, such as refreshing data to avoid un-
4.3. EVALUATION METHODOLOGY
70
correctable errors due to data retention and read disturb [545, 551, 552, 556–559, 569, 570, 624], can be done before or after the filtering process, for two reasons. First, GenStore significantly limits the amount of data whose retention age would exceed the manufacturer-specified threshold for reliable operation (e.g., 1 year [1227]) during the filtering process, since GenStore's filtering process takes a short time.¹² GenStore simply refreshes such data [551, 552, 557, 559] before starting the filtering process. Second, GenStore-FTL can easily avoid read disturbance errors for data with high read counts [569, 570] since GenStore sequentially reads NAND flash blocks only once during filtering. After the filtering process, to prevent read disturb errors in future filtering processes or regular accesses, GenStore refreshes pages that store a data structure if the structure's read count exceeds a certain threshold.
4.3 Evaluation Methodology
Evaluated Systems. We show the benefits of GenStore when it is integrated with the state-of-the-art software and hardware read mappers. To this end, we evaluate the following systems:
-
Base: Minimap2 [294] is a state-of-the-art software read mapper baseline for both short and long reads. GenCache [419] and Darwin [333] are state-of-the-art hardware read mappers for short and long reads, respectively.
-
GS-Ext: Base integrated with an implementation of the GenStore filter without in-storage support (Ext stands for external to storage). GS-Ext concurrently filters reads while using Base to perform read mapping for unfiltered reads. The goal of evaluating GS-Ext is to decouple the effects of GenStores's two major benefits: 1) alleviating I/O bottlenecks via efficient in-storage processing and 2) reducing the workload of the read mapper by filtering reads with simple operations. GS-Ext obtains the second benefit but not the first. For software read mappers, we evaluate a pure software implementation of GenStore that concurrently runs with Base.¹³ For hardware read mappers, we evaluate a hardware implementation of GenStore outside the SSD.
-
GS: Base integrated with the hardware GenStore filtering accelerators, GenStore-EM and GenStore-NM, as described in Sections 4.2 and 4.3. GS concurrently filters reads inside the SSD while using Base to perform read mapping for unfiltered reads.
¹²E.g., less than 7 minutes for a 1TiB dataset even with a low-end SSD (SSD-L) [618].
¹³We do not evaluate a separate GS-Ext configuration for long read software mapper since Base (Minimap2 [294]) already incorporates the chaining filter used in GenStore-NM. GenStore-NM implements part of this chaining filter at low cost (enabled by the key observations in Section 4.3) to fit within the constraints of in-storage processing.
4.3. EVALUATION METHODOLOGY
71
The source code of GenStore and scripts and datasets can be freely downloaded from https://github.com/CMU-SAFARI/GenStore.
Area and Power. We implement GenStore's logic components in Verilog HDL. We synthesize our designs using the Synopsys Design Compiler [1228] with a 65nm process technology node to estimate latency, area and power consumption. We use the SSD power values of the Samsung 3D NAND flash-based SSD [618], and DRAM power values based on DDR4 model [1229,1230].
Performance Modeling. We evaluate hardware configurations using two state-of-the-art simulators to analyze the performance of GenStore. We model DRAM timing with the DDR4 interface [1230, 1231] in Ramulator [1232, 1233], a widely-used, cycle-accurate DRAM simulator. We model SSD performance using MQSim [1234], a widely-used simulator for modern SSDs. We model the end-to-end throughput of GenStore based on the throughput of each GenStore pipeline stage: accessing NAND flash chips, accessing internal DRAM, accelerator computation, and transferring unfiltered data to the host. We estimate the performance of GenCache and Darwin accelerators based on the data reported in the original works [333, 419].
Real System Results. We use real systems to evaluate all software configurations. For a given reference genome, separate reference indexes are generated for each sequencing technology using the software read mapper's default settings for each technology [294]. All other read mapping parameters are kept at their default values. We perform all experiments on an AMD® EPYC® 7742 CPU with 1TB DDR4 DRAM (available in user space). We measure power in these systems using AMD® µProf [1235]. We carefully evaluate GenStore's benefits over the baseline in a conservative manner by using optimized configurations for all baselines. Our baselines fetch data from the SSD by sequentially reading the data in batches [294], while providing sufficiently large DRAM capacity to contain all data that gets reused during read mapping. We use the number of threads that leads to each software configuration's best performance (i.e., execution time): 128 threads for Base and 16 threads for GS-Ext in our experimental setup.¹⁴
SSD Configurations. We analyze the benefits of GenStore on three SSD configurations: 1) a low-end SSD (SSD-L) [619] with a SATA3 interface [1195], 2) a mid-end SSD (SSD-M) [1196] using a PCIe Gen3 M.2 interface [1197], and 3) a high-end SSD (SSD-H) [1198] with a PCIe Gen4 interface [1199].
Datasets. For short read experiments, we use the hg38 human reference genome [1205]. In Section 4.1, we use real short reads (SRR2052419 [1217], 19.6 GB). In Section 4.4, to flexibly and
¹⁴Performance of GS-Ext saturates after 16 threads since it becomes bottlenecked by the external SSD bandwidth.
controllably analyze the effect of read sets with different features, we simulate read sets with various sizes (up to 440 GB) and different fractions of exactly-matching reads (75% and 85%) using the Mason 2 genomic read simulator [1236]. We generate reads with different exact-match rates by introducing sequence mutations (uniformly randomly drawn from the gold-standard mutation list for the human sample NA12878 [1217]) to the reference genome. For the long read experiments, we use the reference genome and read set from Table 4.1 in Section 4.2.3. To flexibly analyze the effect of data size, we generate larger read sets by concatenating the original read sets several times.
4.4 Evaluation
4.4.1 Area and Power Analysis
We propose GenStore as an in-storage processing system that supports both accurate short reads and error-prone long reads with different levels of genetic variation between compared genomes. Table 4.2 shows the area and power consumption of each logic unit used in GenStore. In the first column, the table shows the different logic units used in GenStore along with the width of each entry. The second column shows the number of instances of each unit in an 8-channel SSD. We find the number of instances based on the frequency of and the required throughput from each unit such that GenStore can process data concurrently read from all planes in all SSD channels. GenStore’s hardware units work at different clock frequencies, with the lowest frequency being 300 MHz (for each channel-level Chaining PE). While the hardware units can be designed to operate at higher frequency, their throughput is sufficient when operating at lower frequencies since the end-to-end execution time of GenStore is bottlenecked by NAND flash reads. The third and fourth columns show the area and power of one instance of each unit.
Table 4.2: Area and power breakdown of GenStore’s logic
| Logic unit | # of instances | Area [mm²] | Power [mW] |
|---|---|---|---|
| Comparator (64-bit) | 1 per SSD | 0.0007 | 0.14 |
| K-mer Window (10 × 19-bit) | 2 per channel | 0.0018 | 0.27 |
| Hash Accelerator (64-bit) | 2 per SSD | 0.008 | 1.8 |
| Location Buffer (64 × 64-bit) | 1 per channel | 0.00725 | 0.37375 |
| Chaining Buffer (50 × (16-bit + 64-bit)) | 1 per channel | 0.008 | 0.95 |
| Chaining PE | 1 per channel | 0.004 | 0.98 |
| Control | 1 per SSD | 0.0002 | 0.11 |
| Total for an 8-channel SSD | - | 0.20 | 26.6 |
The total hardware area needed for GenStore is very small (0.20 mm² at 65 nm and 0.02 mm² at 14 nm, only 0.006% of a 14nm Intel Processor [1237]).¹⁵ The area overhead of GenStore hardware (0.06 mm² at 32 nm) is less than 9.5% of the three 28nm ARM Cortex R4 processors [1239] in a SATA SSD controller [618].
The area and power of most logic units (except for the comparator, the hash64 accelerator, and the control unit) increase linearly with the channel count. Each instance of the comparator and hash64 accelerator supports multiple channels (up to 12 and 4 channels, respectively). Therefore, these units scale by or , respectively. The area and power of GenStore’s control unit remains the same across different channel counts.
4.4.2 GenStore-EM Analysis
We analyze the benefits of GenStore-EM for a 22-GB short read set where 80% of reads exactly match some subsequence in the reference genome (see Section 4.3 for input generation methodology), on a system with three different SSD configurations: SSD-L, SSD-M, and SSD-H.
Integration with a Software Read Mapper. Figure 4.8a shows the execution time of four read mapper configurations: 1) Base (Minimap2 [294]), 2) SIMD, an extension of Base with a SIMD implementation of a baseline exactly-matching read filter using 128-bit SIMD instructions, 3) GS-Ext, and 4) GS. We divide the execution time between Alignment (chaining and alignment's contribution to end-to-end execution time) and Other (file access, seeding, and exact match filtering's contribution to end-to-end execution time).

Figure 4.8: GenStore-EM performance under different SSDs, when integrated with a (a) software read mapper (b) hardware read mapper.
We make four observations from Figure 4.8a. First, for all SSD types, GS significantly outperforms Base and SIMD by and , respectively, by alleviating the cost of moving data from the SSD to the host CPU and removing the burden of finding exactly-matching reads from the rest of the system (DRAM and the processor). Second, GS-Ext pro-
Since lower technology nodes are not available publicly, we scale the area consumption down to lower process technology nodes using the methodology in [1238].
vides significant performance improvements over both Base and SIMD in SSD-M and SSD-H. However, GS-Ext provides limited benefits over SIMD in SSD-L since its performance is bottlenecked by the low external I/O bandwidth. Third, even though SIMD also filters out the same number of reads and reduces the alignment time similarly to GS and GS-Ext, its average performance benefit over Base (1.19×) is quite limited compared to those of GS (2.23×) and GS-Ext (1.83×). This is because 1) both GS and GS-Ext reduce the number of memory accesses per read and convert the random memory accesses to more efficient streaming accesses, and 2) GS addresses the I/O bottlenecks due to limited external SSD bandwidth. Based on our observations, we draw two conclusions. First, GenStore-EM leads to large performance improvements in short read genomic analysis by efficiently filtering large amounts of data in storage. Second, even without in-storage processing support, the key idea of GenStore-EM can significantly improve the performance of the state-of-the-art software read mapper especially when using high-bandwidth SSDs (e.g., SSD-M and SSD-H).
Integration with a Hardware Read Mapper. Figure 4.8b shows the execution time of three hardware read mapper configurations: 1) Base (GenCache [419]), 2) GS-Ext, and 3) GS. Integrating GenStore with existing accelerators requires no architectural changes to GenStore and the accelerators because GenStore operates directly on the original data that is stored in the SSD, before any accelerator-specific operation starts. The only factor that GenStore needs to consider is to generate its outputs (i.e., the information of unfiltered reads) in the format that the accelerator needs as its inputs. The host system is responsible for orchestrating the execution and data flows between GenStore and the accelerator.
We make two observations based on Figure 4.8b. First, GS significantly outperforms Base by , , and on systems with SSD-L, SSD-M, and SSD-H, respectively. Second, GS-Ext performs significantly slower than Base (2.28-1.91×) on all systems since GenStore-EM requires accessing the large SSIndex data structure (Section 4.2.2), while GS-Ext suffers from limited SSD external bandwidth. We conclude that the in-storage processing approach in GenStore effectively addresses the I/O bottleneck, which becomes even more significant with hardware accelerators that address the computation bottleneck.
Effect of Read Set Features on Performance. We study the benefits of GenStore-EM depending on the characteristics of input read sets. To this end, we evaluate GenStore-EM while changing two key characteristics: 1) the input read set size and 2) exactly-matching read rate. These two factors affect the data movement savings (DM_Saving) of GenStore as governed by
We do not show the execution breakdown of mapping in Figure 4.8b since we cannot obtain the execution time breakdown for the hardware read mapper from [419].
Equation (4.4):
where is the size of the reference genome and its index (e.g., 7 GB for humans [294]), is the size of the read set, and in GenStore-EM is the exactly-matching read rate of the read set.
Figure 4.9a shows the execution time of Base and GS for the baseline software read mapper (Minimap2 [294]) for input read sets with different sizes (1x, 10x, and 20x larger than the size of our default 22-GB short read set) and different exactly-matching read rates (75% and 85%) on a system with SSD-H. We make two observations. First, GS's performance benefit grows as input size increases (from to ) due to larger data movement savings. Since is constant, and the performance benefits of GenStore-EM increase with larger (see Equation (4.4)). Second, GS's performance benefit increases with higher exactly-matching read rates (from to for the largest read set) because with a larger exactly-matching read rate (i.e., in Equation (4.4)), data movement saving ( ) increases, and the time spent on mapping the unfiltered reads decreases. Mapping the unfiltered reads is the key contributor to the end-to-end execution time of GS since it has larger execution time compared to concurrently running GenStore-EM operations in the SSD. We conclude that the benefits of GenStore-EM, when integrated with the software read mapper, increases with larger read sets and with larger exactly-matching read rates.

Figure 4.9: GenStore-EM performance versus input size and exact match rate, when integrated with (a) software read mapper (b) hardware read mapper.
Figure 4.9b shows the execution time of Base and GS for a baseline hardware read mapper (GenCache [419]). We make two observations. First, GS's performance benefit increases with larger input sizes (from to ) due to its larger data movement reduction. Second, GS's performance benefit does not increase with higher exactly-matching read rates. This is because, with the hardware read mapper, the end-to-end performance of GS is dominated by the execution time of GenStore-EM's filter operations inside the SSD, which only depends on the input read set size and not on the exact-match rate. We conclude that the benefits of
GenStore-EM, when integrated with the hardware read mapper, increases with larger input read set sizes.
4.4.3 GenStore-NM Analysis
We analyze the benefits of GenStore-NM for a 12.4-GB read set (the first No reference use case in Table 4.1) with 99.65% of reads not aligning on a system with three different SSD configurations: SSD-L, SSD-M, and SSD-H.
Integration with a Software Read Mapper. Figure 4.10a shows the execution time of two read mapper configurations: 1) Base (Minimap2 [294]), which already incorporates the chaining filter, and 2) GS. We observe that GS outperforms Base by 22.4×, 29.0×, and 27.9× on systems with SSD-L, SSD-M, and SSD-H, respectively. The reason is that GS alleviates the cost of data movement from SSD to the processor and removes the burden of mapping a large fraction of reads from the rest of the system (DRAM and the processor).

Figure 4.10: GenStore-NM performance under different SSDs, when integrated with (a) software read mapper (b) hardware read mapper.
Integration with a Hardware Read Mapper. Figure 4.10b shows the execution time of three hardware read mapper configurations: 1) Base (Darwin [333]), 2) GS-Ext, and 3) GS. We make two observations based on Figure 4.10b. First, GS significantly outperforms Base by 19.2×, 6.86×, and 6.85× on systems with SSD-L, SSD-M, and SSD-H, respectively. The reason is that GS alleviates the cost of data movement from SSD to the accelerator and removes the burden of read mapping for the filtered reads from the rest of the system (DRAM and the accelerator). Second, GS-Ext does not provide significant performance benefits compared to Base in systems with SSD-L and SSD-M since the execution time of GS-Ext is dominated by the I/O overhead of
Unlike Figure 4.8a, we do not divide the execution times of Alignment and Other in Figure 4.10a since the execution time of GS is dominated by the filter operations of GenStore-NM. This is because, in this case, a large fraction (e.g., 99.65% in our evaluated dataset) of reads get filtered in the SSD and the execution time of mapping the unfiltered reads is very small.
In this case, GS provides larger benefits for systems with SSD-M and SSD-H since these SSDs have larger internal bandwidth compared to SSD-L.
bringing reads from SSD to the accelerator. GS-Ext performs faster than Base in systems with SSD-H since the I/O bottlenecks are partially alleviated with SSD-H. However, the benefits of GS-Ext are limited compared to GS since GS significantly alleviates the I/O overhead of bringing reads from SSD to the accelerator with all three SSD configurations.
Effect of Read Set Features. We study how the benefits of GenStore-NM vary depending on the characteristics of input read sets. To this end, we evaluate GenStore-NM while changing two key characteristics: 1) the input read set size and 2) alignment rates (the fraction of reads in the read set that align to the reference genome). We use input sets with different sizes (1×, 10×, and 20× larger than the size of our default 12.5GB read set) with different alignment rates (0.3% and 37%, corresponding to the first and second No reference use cases in Table 4.1), on a system with SSD-H. Figure 4.11 shows the execution time of Base and GS for the baseline software read mapper [294] (Figure 4.11a) and the baseline hardware read mapper [333] (Figure 4.11b).

Figure 4.11: GenStore-NM performance versus input size and read alignment rate, when integrated with (a) software read mapper (b) hardware read mapper.
We make two main observations from Figure 4.11. First, for both hardware and software read mappers, GS's performance benefits vary little as the input size changes. The reason is that SizeRef is very small (14.6 MB) for this experiment. Therefore, data movement saving (DM_Saving in Equation (4.4)) mainly correlates with alignment rate (i.e., ). Second, for both software and hardware read mappers, GS's performance benefit increases as the ratio of non-aligning reads increases (i.e., as alignment rate reduces), because with higher values of RatioFilter, both 1) DM_Saving increases and 2) the time spent on mapping unfiltered reads decreases. We conclude that GenStore-NM provides high performance benefits to both software and hardware read mappers with different input sizes and its benefits increase with lower alignment rates.
4.4.4 Energy Analysis
To demonstrate the energy benefits of different GenStore modes, we obtain the energy of the host processor, the host-side DRAM, the DRAM inside the SSD, the communication between the SSD and the host, active and idle energy of the SSD, and the energy of the logic units used in GenStore (Section 4.4.1). We calculate the energy of each component based on its idle and dynamic power consumption and its execution time. We observe that by filtering out large amounts of data, GenStore reduces the end-to-end energy consumption of read mapping in all of our evaluations compared to Base (Minimap2 [294]). We measure the energy consumption for experiments on all SSD configurations. By filtering exact matches in a short read set with 80% exactly-matching read rate (see Section 4.3), GenStore-EM reduces the energy consumption by on average (up to) across all storage configurations. By filtering non-matching reads in a long read set with a read alignment rate of 0.35% (the first No reference use case in Table 4.1), GenStore-NM reduces the energy consumption by on average (up to) across all storage configurations.
Figure 4.12 shows the energy breakdown of Base and GS. We show energy breakdown between the host CPU, host DRAM, host SSD accesses, ISP logic units, in-storage DRAM, and SSD accesses during ISP. We observe that, by filtering a large number of low-reuse reads within the SSD, GenStore alleviates the energy burden on the rest of the system, particularly the host CPU which needs to perform the energy-intensive read mapping process.

Figure 4.12: Energy breakdown of different systems for (a) short read mapping and (b) long read mapping.
Figure 4.13 shows the energy breakdown of Base and GS, excluding the host CPU, to isolate the energy distribution between main memory and storage accesses across configurations. This breakdown also serves as an idealized study of a scenario in which energy-efficient specialized hardware units replace general-purpose CPUs for computation. We make three observations. First, GenStore-EM (for short reads) significantly reduces DRAM energy consumption due to its read-size k-mer approach, which significantly reduces the number of memory accesses to the reference genome and its index structure. Second, GenStore-NM (for long reads) also significantly reduces overall DRAM energy consumption (host and internal DRAM combined) due to its lightweight chaining filter that filters reads with a small number of seeds in a lightweight manner. Third, by filtering reads directly inside the SSD, GenStore also alleviates I/O energy overheads.
4.5. DISCUSSION
79

Figure 4.13: Energy breakdown of different systems, excluding the host CPU, for (a) short read mapping and (b) long read mapping.
4.5 Discussion
As sequencing technologies develop in the future, we expect that GenStore will still play an important role in genomic sequence analysis. We witness three major trends in sequencing technologies. First, the length and the accuracy of reads are expected to increase [252, 417, 1210, 1240, 1241]. Second, short reads will continue to be widely used due to their very high accuracy and low cost [1209, 1242, 1243]. Third, DNA sequencing machines are increasingly adopting data processing capabilities to perform both sequencing and genomic analysis within the same machine [34, 251, 269, 271, 1244, 1245].
Even with increases in long read accuracy (trend 1), GenStore-NM would continue to filter large numbers of reads that do not align to a reference genome due to genetic differences between the compared genomes [148,221,222,1246–1248]. Given that accurate short reads are essential for many processes in genome analysis (trend 2), e.g., for polishing [790,1249,1250] and validating [1251] long read sequences, GenStore-EM can continue to accelerate short read mapping by filtering out exactly-matching reads. With the push to provide DNA sequencing and preliminary genetic analysis on more portable integrated devices with limited compute resources and available DRAM capacity [34,251,417,674] (trend 3), there will be a growing demand for data movement-minimizing systems like GenStore to quickly filter out a large fraction of reads at low cost and high efficiency [34,271,291,418,1155,1213].
With higher availability of portable genome sequencers, genomic analyses will be performed more routinely [5,26–32,54,148,198,291,417,715,1240] and will need to provide much faster results [417,418]. In-storage processing is crucial for meeting the huge demands for faster analyses that scale well to large numbers of genomic samples. Examples of these analyses include gene detection [1252], alignment of reads from rapidly mutating organisms such as SARS-CoV-2 [54,1213], and studies of as-of-yet undiscovered microbes [148,198,221,222]. In these analyses, GenStore-NM can effectively filter out >99.7% [222,1252], ~36.1% [1213], and ~47.3% [148,221,222] of the reads, respectively, thereby greatly improving the end-to-end
4.6. SUMMARY
80
throughput and energy efficiency of genome sequence analysis. We hope that our proposed techniques provide a foundation for future efforts to accelerate genome analysis.
4.6 Summary
We propose GenStore, a new in-storage processing system for genome sequence analysis. GenStore can be integrated with both hardware and software read mappers to improve the end-to-end performance of both short and long read mapping. We address the challenges of in-storage processing for genomic read filtering via new hardware/software co-designed techniques and develop new in-storage filtering accelerators for both short and long reads. Our evaluations show that GenStore provides large performance and energy improvements when integrated into the state-of-the-art software and hardware read mappers.
4.6.1 Impact and Influence
GenStore is published at the International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS) in 2022 [515]. It is fully open-sourced at [521]. An extended version of the ASPLOS 2022 paper is available on arXiv [522].
A significant amount of work (e.g., [365, 523–529]) has already been influenced by GenStore. For example, a prior work [524] proposes additional in-storage filters for genomics; various other works extend the principles to other subdomains in bioinformatics [365, 523, 527–529]; and some work (e.g., [526]) extends the key ideas to other domains such as AI/ML.
We hope that the key ideas and approaches introduced in GenStore inspire further research in storage-centric designs in other domains related to health and life sciences. Such storage-centric designs can improve performance, energy efficiency, and cost-effectiveness of data-intensive applications needed to advance healthcare and life sciences, thereby facilitating their wider adoption and enabling solutions that were out of reach before.
Chapter 5
MegIS: Cooperative In-Storage Processing for Metagenomic Analysis
5.1 Motivational Analysis
5.1.1 Data Movement Overheads
We conduct experimental analysis to assess the storage system's impact on the performance of metagenomic analysis.
Tools and Datasets. We analyze two state-of-the-art tools for presence/absence identification: 1) Kraken2 [435], which queries its large database with random access patterns (Random-Qry),¹ and 2) Metalign [265], which exhibits mostly sequential streaming accesses to its database (Stream-Qry). We use the best-performing thread count for each tool. We use a query sample with 100 million reads (CAMI-L, detailed in Section 5.3) from the CAMI dataset [798], commonly used for profiling metagenomic tools. We generate a database based on microbial genomes drawn from NCBI's databases [265, 1253] using default parameters for each tool. For Kraken2 [435], this results in a 293 GB database. For Metalign [265], this results in a 701 GB k-mer database and a 6.9 GB sketch tree. To show the impact of database size, we also analyze larger k-mer databases (0.6 TB and 1.4 TB for Kraken2 and Metalign, respectively) that include more species.
System Configurations. We use a high-end server with an AMD EPYC 7742 CPU [1200] and 1.5-TB DDR4 DRAM [1229]. We note that the DRAM size is larger than the size of all data
¹We experiment with both techniques of accessing the database devised in the Random-Qry baseline [433] and report the best timing. The first technique uses mmap to access the database, while the second technique loads the entire database from the SSD to DRAM as the first step when the analysis starts. In this experiment, the second approach performs slightly better since, when analyzing our read set, the application accesses most parts of the database.
5.1. MOTIVATIONAL ANALYSIS
82
accessed during the analysis by each tool. This way, we can analyze the fundamental I/O overhead of moving large amounts of low-reuse data from storage to the main memory without being limited by DRAM capacity. We evaluate I/O overheads using: 1) a cost-optimized SSD (SSD-C) [1254] with a SATA3 interface [1195], 2) a performance-optimized SSD (SSD-P) [1198] with a PCIe Gen4 interface [1199], and 3) a hypothetical configuration with zero performance overhead due to storage I/O (DRAM). SSD-P provides an order-of-magnitude higher sequential-read bandwidth than SSD-C (detailed configurations in Table 5.1). However, scaling up storage capacity only using performance-optimized SSDs is challenging due to their much higher prices (e.g., [1255–1257]) and fewer PCIe slots compared to SATA slots available on servers (e.g., [1200]).
Results and Analysis. Figure 5.1 shows the performance (throughput in terms of #queries/sec) of the tools normalized to DRAM. We make three key observations. First, I/O overhead has a large impact on performance for all cases. Compared to SSD-C (SSD-P), DRAM leads to and better performance in Random-Qry and Stream-Qry (averaged across both databases), respectively. While both baselines significantly suffer from large I/O overhead, we observe a relatively larger impact on Stream-Qry due to its lower data reuse compared to Random-Qry. This is because the lower the data reuse, the less effectively the initial I/O cost can be amortized. Second, even using the costly state-of-the-art SSD (SSD-P) does not alleviate this overhead, leaving large performance gaps between SSD-P and DRAM in both tools. Third, I/O overhead increases as the databases grow. For example, in Random-Qry, the performance gap between SSD-C and DRAM widens from to as the database expands from 0.3 TB to 0.6 TB. Based on these observations, we conclude that I/O accesses lead to large overheads in metagenomic analysis, an issue expected to worsen in the future.
This I/O overhead, stemming from the need to move large amounts of low-reuse data, is a fundamental problem that is hard to avoid. One might think it is possible to avoid this overhead by 1) using sampling techniques to shrink database sizes (e.g., [434–439]) or 2) keeping all data required by metagenomic analysis completely and always resident in main memory. Neither

Figure 5.1: Performance of (a) Random-Qry and (b) Stream-Qry under different storage configurations and database sizes.
5.1. MOTIVATIONAL ANALYSIS
83
of these solutions is suitable. The first approach inevitably reduces accuracy [250, 793, 798] to levels unacceptable for many use cases (e.g., [250, 432, 508, 793, 798, 1258–1260]). The second approach is energy inefficient, costly, unscalable, and unsustainable due to two reasons. First, the sizes of metagenomic databases (which are already large, i.e., in some recent examples, exceeding a hundred terabytes [502, 503]) have been increasing rapidly. For example, recent trends show the doubling of different important databases in only several months [267, 506, 508]. Second, regardless of the sizes of individual databases, different analyses need different databases, with information from different sets of genomes or with varying parameters. For example, a medical center may use various databases for its patients based on the patients' conditions [255] (e.g., for different viral infections [434, 1261], sepsis [210], etc.). Therefore, it is inefficient and unsustainable to maintain all data required by all possible analyses in DRAM at all times.
The I/O impact on end-to-end performance becomes even more prominent in emerging systems in which other bottlenecks are alleviated. For example, while metagenomics can benefit from near-data processing at the main memory level, i.e., processing-in-memory (PIM) [4, 121, 450, 452, 453, 994, 996, 998, 1263], these approaches still incur the overhead of moving the large, low reuse data from the storage system. In fact, by alleviating other bottlenecks, the impact of I/O on end-to-end performance increases. For example, for the 0.3-TB and 0.6-TB Kraken2 databases, using a state-of-the-art PIM accelerator [4] of Kraken2, DRAM is on average faster than SSD-C (SSD-P). We conclude that while accelerating other bottlenecks in metagenomic analysis (e.g., main memory bottlenecks) can provide significant benefits, doing so does not alleviate the overheads of moving large, low-reuse data from the storage system.
5.1.2 Our Goal
ISP can be a fundamental solution for reducing data movement. However, designing an ISP system for metagenomics is challenging because none of the existing approaches can be directly implemented as an ISP system effectively due to an SSD's constrained hardware resources. Techniques such as Random-Qry hinder leveraging ISP's large potential by preventing the full utilization of the SSD's internal bandwidth due to costly conflicts in internal SSD resources [562, 568, 941] caused by random accesses. Techniques such as Stream-Qry predominantly incur more suitable streaming accesses, but at the cost of more computation and main memory capacity requirements, posing challenges for ISP. Therefore, directly adopting ex-
Ultimately, these are the same reasons that the metagenomics community has been investigating storage efficiency (e.g., the aforementioned sampling techniques [434–439]) as opposed to merely relying on scaling the system's main memory [232, 236, 432, 824, 1262].
isting metagenomic analysis approaches in storage incurs performance, energy, and lifetime overheads. Our goal in this work is to improve the performance and efficiency of metagenomic analysis by reducing the large data movement overhead from the storage system in a cost-effective manner.
5.2 MegIS
We propose MegIS, the first ISP system designed for the end-to-end metagenomic analysis pipeline to reduce its data movement overheads from the storage system. MegIS is primarily designed as a system for accelerating metagenomic analysis. MegIS extends the existing SSD controller and FTL without impacting the baseline SSD functionality. Therefore, when metagenomic acceleration is not in progress, the SSD can be accessible for all other applications, similar to a general-purpose SSD.
We address the challenges of ISP for metagenomic analysis via hardware/software co-design to enable what we call cooperative ISP. In other words, we do not solely focus on processing inside the storage system but, instead, we exploit the strengths of processing both inside and outside the storage system. MegIS enables an efficient pipeline between the host system and the storage system to maximally leverage and orchestrate the capabilities of both systems.
It is possible for MegIS's ISP steps to run on our lightweight specialized ISP accelerators or, alternatively, on the existing embedded cores in the SSD controller³ or other general-purpose ISP systems (e.g., [962, 974, 975, 977]). This is because, leveraging our optimizations, MegIS's ISP steps require only simple computation and small buffers. Efficiently performing metagenomics on any of these underlying hardware units requires MegIS's specialized task partitioning, data/computation flow coordination, storage technology-aware algorithmic optimizations, and data mapping. The ability to leverage existing hardware units (embedded SSD cores or general-purpose ISP systems) helps with MegIS's ease of adoption. Ultimately, choosing between different MegIS configurations (our specialized lightweight accelerators or general-purpose hardware) is a design decision that has various tradeoffs, with specialized accelerators achieving the highest performance and power efficiency (Section 5.4.1).
5.2.1 Overview
Figure 5.2 shows an overview of MegIS's steps. We design MegIS as an efficient pipeline in
³These cores are available for MegIS's ISP since we envision that during metagenomic acceleration, MegIS is not used as a general-purpose SSD and does not run the baseline FTL. Instead, it runs MegIS FTL, which only performs lightweight and infrequent tasks during ISP (see Section 5.2.5).

Figure 5.2: Overview of MegIS.
the SSD and the host system. We develop MegIS FTL (Section 5.2.5), which is responsible for communication with the host system and data flow across the SSD hardware components (e.g., NAND flash chips, internal DRAM, and hardware accelerators) when running metagenomic analysis. Upon receiving a notification from the host to initiate metagenomic analysis (① in Figure 5.2), MegIS readies itself by loading the necessary MegIS FTL metadata (②). After this preparation, MegIS starts its three-step execution. In Step 1 (Section 5.2.2), the host processes the input read queries (③) and transfers them in batches to the SSD (④). In Step 2 (Section 5.2.3), the ISP units (ACC in Figure 5.2) find the species present in the sample (⑤). Steps 1 and 2 run in a pipelined manner. In Step 3 (Section 5.2.4), MegIS prepares (⑥) and transfers (⑦) the data needed for any further analysis. By doing so, MegIS facilitates integration with different abundance estimation approaches. MegIS leverages the SSD's full internal bandwidth since it avoids channel conflicts (due to its specialized data/control flow) and frequent management tasks (by not requiring writes during its ISP steps).
5.2.2 Step 1: Preparing the Input Queries
In this step, MegIS prepares the input read queries in a metagenomic sample for metagenomic analysis. MegIS works with lexicographically-sorted data structures to avoid expensive random accesses to the SSD (similar to Stream-Qry, described in Section 2.4). Like many other metagenomic tools (e.g., [265, 428–431, 433–435, 437–439, 450, 791, 792, 794]), we assume the sorted k-mer databases are pre-built before the analysis. However, sorting k-mers extracted from the input query read set is inefficient to perform offline due to the need to store a large data structure (sorted k-mer set) with each sample, potentially larger than the sample itself, causing significant storage capacity waste. Therefore, to prepare the input queries, MegIS 1) extracts k-mers from the sample (Section 5.2.2), 2) sorts the k-mers (Section 5.2.2), and if needed, 3) prunes some k-mers according to user-defined criteria (Section 5.2.2).
We execute this step in the host system for three reasons. First, this step benefits from the relatively larger DRAM and more powerful computation resources in the host. Second, due to the large host-side DRAM, performing this step in the host leads to significantly fewer writes to the flash chips, positively impacting lifetime. For typical metagenomic read sets, storing k-mers extracted from reads within a sample takes tens of gigabytes (e.g., on average 60 GB with standard CAMI read sets [798]). While generating and sorting k-mers inside the SSD is possible, it would necessitate frequent writes to flash chips or much larger DRAM. Third, by leveraging the host system for this step, we enable pipelining and overlapping Step 1 with Step 2 (which searches the large, low-reuse database).
To efficiently execute Step 1 on the host system, we need to ensure two points. First, partitioning the application between the host system and the SSD should not incur significant overheads due to data transfer time. Second, while it is reasonable in most cases to expect the host DRAM to be large enough to contain all extracted k-mers from a sample, MegIS should accommodate scenarios where this is not the case and minimize the performance, lifetime, and endurance overheads of writes to flash chips due to page swaps (i.e., moving data back-and-forth between the host DRAM and the SSD when the host DRAM is smaller than the application's working set size).
The sequences in MegIS's databases are encoded with two bits per character (i.e., A, C, G, T in DNA alphabet) during their offline generation. For the read sets, MegIS is able to work with different formats. We perform the first analysis step (Step 1) in the host system so that any format conversion can be flexibly incorporated there (e.g., from ASCII or binary to 2-bit encoding). The overhead of format conversion is negligible since it involves a straightforward transformation of the four nucleotide bases to the 2-bit encoded format. For the remainder of MegIS's pipeline, we use the 2-bit encoding.
K-mer Extraction
To reduce data transfer overhead between different parts of the application that execute in the host system and in the storage system, we propose a new input processing scheme by improving upon the input processing scheme in KMC [1264]. We partition the k-mers into buckets, each corresponding to a lexicographical range. This enables overlapping the k-mer sorting and transfer of a bucket to the SSD with the ISP operations of Step 2 (Section 5.2.3) on previously transferred buckets. This is because the database k-mers are also sorted and can already be accessed within the corresponding range. Figure 5.3 shows an overview of MegIS's k-mer extraction. The host reads the input reads from the storage system (① in Figure 5.3), extracts their k-mers (②), and stores them in the buckets (③).⁴ In situations where a sample's
⁴To prevent bucket size imbalance, we initially create preliminary buckets for a small k-mer subset. In case of imbalance, we merge some buckets to satisfy a user-defined bucket count (default 512).

Figure 5.3: Overview of the k-mer extraction process in MegIS.
extracted k-mers do not fit in the host DRAM, MegIS pins some buckets to the host DRAM (e.g., Buckets 1 to in Figure 5.3) and uses the SSD to store the others. This way, k-mers belonging to buckets in the host DRAM do not move back and forth between the host DRAM and the SSD (4). To reduce the overhead of accessing buckets in the SSD, MegIS takes two measures. First, MegIS allocates buffers in the host DRAM specifically for buckets in the SSD. Once these buffers are full, it efficiently transfers their contents to the SSD, maximizing the use of the sequential-write bandwidth. Second, we map each bucket's k-mers across SSD channels evenly for parallelism. Since MegIS does not require writes to the flash chips after this step (i.e., K-mer Extraction in Step 1), it can flush all of the FTL metadata for write-related management to free up internal DRAM for the next steps (details in Section 5.2.5).
Sorting
After generating all k-mer buckets, MegIS proceeds to sort the k-mers within the individual buckets. As soon as a specific bucket is sorted, MegIS transfers this bucket to the DRAM inside the SSD in batches (to undergo Step 2, as described in Section 5.2.3). Meanwhile, during the transfer of bucket , MegIS advances to sort bucket . MegIS can orthogonally use a sorting accelerator (e.g., [1265–1267]) to perform sorting.
Excluding K-mers
MegIS, like various tools [265, 294, 792, 1264, 1268, 1269], can exclude k-mers based on user-defined frequencies to improve accuracy. Users can exclude 1) overly common (i.e., indiscriminative) k-mers and 2) very infrequent k-mers (e.g., those that appear only once), which may represent sequencing errors or low-abundance organisms that are hard to distinguish from random occurrences. Exclusion follows sorting, where k-mers are already counted. While the size of the extracted query k-mers (Section 5.2.2) can be large (on average 60 GB in our exper-iments), the size of the k-mer set selected to go to Step 2 is much smaller (on average 6.5 GB) and is significantly smaller than the database that may reach several terabytes [232,501–505].
5.2.3 Step 2: Finding Candidate Species
In Step 2, MegIS finds the species present in the sample by 1) intersecting the query k-mers and the database k-mers, and 2) finding the taxIDs of the intersecting k-mers. We perform this stage inside the SSD since it requires streaming the large database with low reuse and involves only lightweight computation. This enables MegIS to leverage the SSD's large internal bandwidth and alleviate the overall burden of moving/analyzing large, low-reuse data from the rest of the system.
Considering the SSD’s hardware limitations, MegIS should leverage the full internal bandwidth without requiring expensive hardware resources inside the SSD (e.g., large internal DRAM size/bandwidth and costly logic units). Performing this step effectively inside the SSD requires efficient coordination between the SSD and the host, mapping, hardware design, and storage technology-aware algorithmic optimizations.
Intersection Finding
In this step, MegIS finds the intersecting k-mers, i.e., k-mers present in both the query k-mer buckets arriving from the host system and the large k-mer database stored in the flash chips.
Relying solely on the SSD’s internal DRAM to 1) buffer the query k-mers arriving from the host system and the database k-mers arriving from the SSD channels at full bandwidth and 2) stream through both to find their intersection can pressure the valuable internal DRAM bandwidth. For example, reading the database from the SSD channels at full bandwidth in a high-end SSD can already exceed the LPDDR4 DRAM bandwidth used in current SSDs [974,1196,1198] and even the 16-GB/s DDR4 bandwidth [974,1229]. To address this challenge, we adopt an approach similar to [974] and operate on data fetched from flash chips without buffering them in the internal DRAM. Despite its benefits, this approach requires large buffers (64 KB for input and 64 KB for output) per channel.
To facilitate low-cost computation on flash data streams, we leverage two key features of MegIS to find the minimum required buffer size. First, the computation in this step is lightweight and does not require a large buffer for data awaiting computation. Second, data is uniformly spread across channels, with each compute unit handling data from one channel. Based on these, we directly read data from the flash chips and include two k-mer registers per channel. One register holds a k-mer as the computation input, while the other register stores the subsequent k-mer as it is read from the flash chips. This way, by only using two registers, MegIS directly computes on the flash data stream at low cost.
Figure 5.4 shows the overview of MegIS's intersection finding process. First, MegIS reads the query k-mers to the internal DRAM in batches (① in Figure 5.4). Second, it concurrently reads both the sorted query k-mers (from the internal DRAM) and the sorted database k-mers (from the flash chips), performing a comparison to find their intersection (②) using per-channel Intersect units located in the SSD controller. Third, MegIS writes the intersecting k-mers to the internal DRAM for further analysis (③).

Figure 5.4: Overview of the intersection finding process in MegIS.
Fetching Query K-mers. To efficiently use external bandwidth, MegIS moves buckets from the host system to the internal DRAM in batches. We manage two batches in the internal DRAM to overlap transfer and intersection finding. For an SSD with 8 channels, 4 dies/channel, 2 planes/die, and 16-KiB pages, MegIS requires space for two 1-MiB batches (i.e., B#i-1 and B#i in Figure 5.4) in the internal DRAM.
Intersection Finding. MegIS reads the query k-mers from the internal DRAM and the database k-mers from the flash chips. Intersection Finding runs in a pipelined manner with Fetching Query K-mers. We store the database evenly across different channels to leverage the full internal bandwidth when sequentially reading data using multi-plane operations. MegIS finds the intersecting k-mers as follows: If a database k-mer equals a query k-mer, MegIS records the k-mer as an intersecting k-mer. If a query k-mer is larger (smaller), MegIS reads the next database (query) k-mer. MegIS's Control Unit, located on the SSD controller, receives the comparison results and issues the control signals accordingly.⁵
Storing the Intersecting K-mers. MegIS stores the intersecting k-mers in the SSD's internal
⁵Figures 5.3, 5.4, and 5.6 exclude Control Unit and its connections for readability.
DRAM. The internal DRAM needs to support 1) fetching the queries, 2) reading them out, 3) storing the intersection, and 4) reading FTL metadata. Since the query k-mer set, the intersection, and the FTL metadata (FTL details in Section 5.2.5) are significantly smaller than the database, they can be accessed at a much smaller bandwidth than the bandwidth required for reading the database. For example, for our datasets in Section 5.3, when fully leveraging SSD-P's internal flash bandwidth by reading the database from all flash channels, MegIS requires only 2.4 GB/s of DRAM bandwidth to access all datasets stored in the internal DRAM.
Retrieving TaxIDs
MegIS finds the taxIDs of the species corresponding to the intersecting k-mers by looking up the intersecting k-mers in a pre-built sketch database. Each sketch is a small representative subset of k-mers associated with a given taxID. A sketch database stores the k-mer sketches and their associated taxIDs for a given set of species. Similar to [265], we use CMash [1270] to generate sketches. MegIS can also use other sketch generation methods. MegIS flexibly supports variable-sized k-mers in its sketch database. As shown by prior works [434, 1270], while longer k-mers are more unique and offer greater discrimination, they may result in missing matches between the intersecting k-mers and sketches. In such cases, users may also search for smaller k-mers by looking up the prefixes of the intersecting k-mers in the sketch database. This enables finding additional matches and increasing the true positive rate.
Finding taxIDs for variable-sized k-mers is challenging since it requires many pointer-chasing operations on a large data structure that may not fit in the SSD's internal DRAM. To support variable-sized k-mers, some approaches (e.g., [231, 265, 434, 437, 1270]) provide data structures to encode the k-mer information in a space-efficient manner. For example, CMash [1270] encodes k-mers of variable sizes in a ternary search tree. Figure 5.5 shows sketch databases with variable-sized k-mers (k = 5, 4, and 3) alongside their taxIDs in a separate tables, as used by some prior approaches [428, 1271], and b in a ternary search tree. This tree structure is devised to 1) save space and 2) retrieve the taxIDs for all k-mers with that are prefixes of a query -mer. For example, as shown in Figure 5.5, when traversing the tree to look up the 5-mer AATCC, we can look up the 4-mer AATC during the same traversal. Despite its benefits, this approach requires up to pointer-chasing operations for each lookup. Performing these operations inside the SSD is challenging since the tree can be larger
The intersecting k-mers do not have a strict size requirement and can use the available internal DRAM's space opportunistically. Usually, its small size allows it to fully fit in the internal DRAM. However, in a case where it does not, MegIS starts the taxID retrieval (Section 5.2.3) for the already-found intersecting k-mers; then resumes this step, overwriting the old intersecting k-mers.
a Baseline K-mer Sketch Tables
| 5-mer | ID |
|---|---|
| AAAAA | 1 |
| AAAAC | 6 |
| AATCC | 2 |
| ... | ... |
| 4-mer | ID |
|---|---|
| AAAA | 1, 6 |
| AATC | 2, 3 |
| ... | ... |
| 3-mer | ID |
|---|---|
| AAA | 1, 6, 8 |
| AAT | 2, 3, 5 |
| ... | ... |
b Ternary Search Tree

C K-mer Sketch Streaming Tables
Figure 5.5: Overview of sketch data structures.
than the SSD's internal DRAM, and pointer chasing on flash arrays is expensive due to their significantly larger latency compared to DRAM.
While MegIS can perform taxID retrieval in the host system, we identify a new optimization opportunity leveraging unique features of ISP (i.e., large internal bandwidth and storage capacity), which avoids pointer-chasing at the cost of larger data structures. Figure 5.5 shows an overview of our approach, K-mer Sketch Streaming (KSS). For k-mers with , MegIS stores the k-mer sketches and their taxIDs similar to . MegIS keeps this table in a lexicographically-sorted order. For each smaller k-mer (with ), MegIS only stores the taxIDs that are not attributed to their corresponding larger, more unique, k-mer. For these smaller k-mers, MegIS does not store the k-mer itself and instead, uses the prefixes of the -mers to retrieve the smaller k-mers. MegIS allows for taxID retrieval by sequentially streaming through the intersecting k-mers (which are already sorted) and the KSS tables. While the KSS data structure is larger than the corresponding ternary search tree , it is much more suitable for ISP due to its streaming access feature. KSS can also be efficient for processing outside the storage system with SSDs with high external bandwidth (Section 5.4.1). KSS leads to smaller data structures compared to the 107-GB data structure in , and larger compared to (dataset details in Section 5.3).
Figure 5.6 shows an overview of MegIS's staxID retrieval process. As an example, we demonstrate retrieving 5- and 4-mers. First, MegIS reads the intersecting k-mers (i.e., 5-mers) from the internal DRAM and concurrently reads the 5-mer sketches and their IDs from an SSD channel to find their matches (using the same Intersect unit in Section 5.2.3) (①). Second, to find 4-mer matches, MegIS compares the prefixes of the intersecting 5-mers with the prefixes of the 5-mer sketches (②). MegIS incorporates a lightweight Index Generator. It compares the 4-mer

Figure 5.6: Overview of the TaxID retrieval process in MegIS.
prefixes of each pair of consecutive 5-mers. When the prefixes differ (indicating the start of a new 4-mer), it identifies the new prefix as the new 4-mer and reads the next 4-mer taxID from a SSD channel. Third, MegIS sends the retrieved taxIDs to the host (③) as the IDs of the candidate species present in the sample.
5.2.4 Step 3: Abundance Estimation
For applications that require abundance estimation, MegIS integrates further analysis on the candidate species identified as present in the sample at the end of Step 2. MegIS can flexibly integrate with different approaches to abundance estimation used in various tools, such as (i) lightweight statistics (e.g., [428, 796, 797]) or (ii) more accurate and costly read mapping (e.g., [265, 434, 793]), where the input read set is mapped to the reference genomes of candidate species present in the sample. Based on the relative number of reads that map to each species' reference genome, we can determine the occurrence frequencies of different species. MegIS can integrate with different existing statistical approaches or read mapping, performed in the host or an accelerator, specialized for short reads (e.g., [334, 363, 419]) or long reads (e.g., [333, 363, 419]). We note that Steps 1 and 2 of MegIS are based on k-mers extracted from the reads and do not depend on a specific read length.
While the lightweight statistical approaches can work directly on the output of Step 2, MegIS requires additional data preparation to facilitate read mapping. The read mapper requires the query reads and a unified index of the reference genomes of the candidate species present in the sample [294]. In comparison to using individual indexes for each species, the unified index eliminates the need to search through each index separately, thereby reducing the overheads of the read mapping process. Building indexes for individual species is a one-time task. Yet, creating a unified index for the initially unidentified species present in the sample cannot be done offline. MegIS facilitates index generation for read mapping by generating a unified index in the SSD. Figure 5.7 shows an example of the process of unified index generation in MegIS. Each index entry shows a k-mer and its location in that species' reference genome. MegIS reads each index stored in the flash chips sequentially and merges their entries into a unified index. When MegIS finds a common k-mer (e.g., CCA in Figure 5.7), it stores the corresponding location of the k-mer in both reference genomes, adjusting the locations with appropriate offsets based on the reference genome sizes. After generating the unified index, MegIS transfers the index to the host system or an accelerator to perform read mapping for abundance estimation.
5.2.5 MegIS FTL
MegIS FTL needs simple changes to the baseline FTL to handle communication between the host and the SSD.
FTL Metadata. At the beginning of MegIS's operation as a metagenomic acceleration framework, MegIS FTL maintains all metadata of the regular FTL in the internal DRAM. For the only step that requires writes to the NAND flash chips (Section 5.2.2, K-mer Extraction in the host), MegIS FTL uses the write-related metadata (e.g., L2P, bad-block information). After the K-mer Extraction step, MegIS does not require writes to the NAND flash chips, so it flushes the regular L2P metadata and loads MegIS FTL's L2P metadata while still keeping the other metadata of a regular FTL.
MegIS is designed to only access the underlying flash chips sequentially, which inherently reduces the size of the required L2P mapping metadata. In regular FTL, L2P mappings dominate the SSD's internal DRAM capacity due to the page-level granularity of mappings [515, 567, 1254]. However, by accessing data sequentially, MegIS FTL circumvents the need for such detailed page-level mappings. Instead, MegIS FTL utilizes a more coarse-grained block-level
| K-mer | Loc. |
|---|---|
| ATT | 14 |
| CCA | 9 |
| GCT | 5 |
| ... | ... |
Reference Index
Organism A
| K-mer | Loc. |
|---|---|
| AAG | 2 |
| CCA | 21 |
| TGC | 4 |
| ... | ... |
Reference Index
Organism B
Merge
Unified
Reference Index
| K-mer | Loc. |
|---|---|
| AAG | 1002 |
| ATT | 14 |
| CCA | 9, 1021 |
| GCT | 5 |
| TGC | 1004 |
| ... | ... |
Figure 5.7: Merging the reference indexes to facilitate read mapping during abundance estimation.
mapping, which substantially reduces the size of L2P metadata. Therefore, flushing regular L2P mapping metadata into flash chips and using MegIS FTL's metadata enables us to exploit most of the internal DRAM bandwidth and capacity during ISP.
Data Placement. Figure 5.8 shows how MegIS FTL manages the target data (i.e., databases⁷) stored in NAND flash with reduced L2P metadata. When storing a database in the SSD ①, MegIS FTL evenly and sequentially distributes the data across all channels ② while ensuring that every active block [1272] (i.e., blocks available for write operations in the SSD) in different channels has the same page offset. Since MegIS always accesses the database sequentially, MegIS FTL's L2P mapping metadata ③ consists of (i) the mapping between start logical page address (LPA) and physical page address (PPA), (ii) the database size, and (iii) the sequence of physical block addresses storing the database. As shown in Figure 5.8, MegIS FTL can sequentially read the stored database from the starting LPA while performing reads in a round-robin manner across channels. To do so, MegIS FTL just increments the PPA within a physical block and resets the PPA when reading the next block.

Figure 5.8: Data layout and mapping data structure in MegIS.
Compared to the regular L2P, whose space overhead is 0.1% of stored data (4 bytes per 4 KiB), MegIS's L2P is very small. For example, MegIS only requires ~1.3 MB to store a 4-TB database, assuming a physical block size of 12 MB: 4 bytes for each of the 349,525 used blocks (and a few bytes for the start L2P mapping and database size). The only metadata other than L2P that must be kept during ISP is the per-block access count for read-disturbance management [569], so the total MegIS-FTL metadata size is up to 2.6 MB.
⁷K-mer databases (Section 5.2.3) and sketch databases (Section 5.2.3) are the only data structures accessed from NAND flash memory during MegIS's ISP operations.
SSD Management Tasks. MegIS's ISP accelerators are located in the SSD controller and access data after ECC. ECC does not restrict MegIS's ISP performance. Modern SSDs are designed with ECC capabilities that match the full internal bandwidth of the SSD to support both I/O requests and internal data migrations due to management tasks like garbage collection [545, 551, 617].
MegIS performs other tasks for ensuring reliability (e.g., refresh to prevent uncorrectable errors [545, 551, 552, 556–559, 569, 570, 624]) before or after the ISP because 1) the duration of each MegIS process is significantly smaller than the manufacturer-specified threshold for reliable retention age (e.g., one year [1227]), and 2) MegIS avoids read disturbance errors [569] during ISP due to its sequential low-reuse accesses.
5.2.6 Storage Interface Commands
MegIS requires three new NVMe commands. First, MegIS_Init initiates the metagenomic analysis and communicates the size and starting address of the space in the host DRAM that is available for MegIS's operations. Upon receiving this command, MegIS readies itself to work in the metagenomic acceleration mode (Section 5.2.1). During metagenomic analysis steps, MegIS FTL and MegIS's FSM controller handle the data/control flow. Second, MegIS_Step communicates the start and end of each step executed in the host to the SSD, enabling MegIS to manage control and data flow accordingly. MegIS_Step specifies the step performed in the host system, such as k-mer extraction (Section 5.2.2) or sorting (Section 5.2.2), with an input argument. Each time this command with the same argument is sent, it alternates between marking the start and the end of a step. After completing the metagenomic analysis, MegIS switches back to operating as a baseline SSD. Third, MegIS_Write is a specialized write operation that updates MegIS FTL's small mapping metadata whenever metagenomic data is written to the SSD. MegIS_Write is similar to the regular NVMe write command, except that it updates mapping metadata in both the regular FTL and MegIS FTL.
5.2.7 Multi-Sample Analysis
For some use cases (e.g., globally tracing antimicrobial resistance [148], associating gut microbiomes to health status [197, 1273]), a metagenomic study can have multiple read sets (i.e., samples) that need to access the same database. If the host's DRAM is larger than the k-mer sizes extracted from a sample, we use the available DRAM opportunistically to buffer k-mers extracted from several samples. This way, MegIS streams through one database only once. Figure 5.9 shows the timeline of analyzing a single (S) or multiple (M) samples in the baseline (Base), in our proposed optimized approach in software (Opt), and in MegIS (MS). To acceler-
5.3. EVALUATION METHODOLOGY
96

Figure 5.9: Timeline of analyzing single or multiple samples in the baseline and MegIS.
ate input query processing (Section 5.2.2) when analyzing several input query samples, MegIS can be flexibly integrated with a sorting accelerator (e.g., [1265–1267]) and further improve end-to-end performance.
5.3 Evaluation Methodology
Performance. We design a simulator that models all of MegIS's components, including host operations, accessing flash chips, internal DRAM, in-storage accelerator, and host-SSD interfaces. We feed the latency and throughput of each component to this simulator. For the components in the hardware-based steps (e.g., ISP units in Steps 2 and 3): We implement MegIS's logic components in Verilog. We synthesize them using the Synopsys Design Compiler [1228] with a 65 nm library [1274] and perform place-and-route using Cadence Innovus [1275]. We use two state-of-the-art simulators, Ramulator [1232,1233] to model SSD's internal DRAM, and MQSim [1234,1276] to model SSD's internal operations. For the components in the software-based step (e.g., host operations in Step 1), we measure performance on a real system, an AMD® EPYC® 7742 CPU [1200] with 128 physical cores and 1-TB DRAM (in all experiments unless stated otherwise). For the software baselines, we measure performance on this real system, with best-performing thread counts. The source code of MegIS, scripts, and datasets can be freely downloaded from https://github.com/CMU-SAFARI/MegIS.
SSDs. We use SSD-C [1254] and SSD-P [1198] as described in Section 5.1.1 in our real system experiments. In our MQSim simulations for the ISP steps, we faithfully model the SSDs with the configurations summarized in Table 5.1.
Area and Power. For logic components, we use the results from our Design Compiler synthesis. For SSD power, we use the values of a Samsung 3D NAND flash-based SSD [618]. For
5.3. EVALUATION METHODOLOGY
97
Table 5.1: SSD configurations.
| Specification | SSD-C | SSD-P |
|---|---|---|
| General | 3D TLC NAND flash-based SSD4 TB capacity, 4 GB internal LPDDR4 DRAM [1277] | |
| Bandwidth(BW) | 600 MB/s interface BW(SATA3);560 MB/s sequential-read BW1.2-GB/s channel I/O rate | 8 GB/s interface BW(4-lane PCIe Gen4);7 GB/s sequential-read BW1.2-GB/s channel I/O rate |
| NANDConfig | 8 channels, 8 dies/channel,4 planes/die, 2,048 blocks/plane,196 WLs/block, 16 KiB/page(4/8/16 channels in Figure 5.15) | 16 channels, 8 dies/channel,2 planes/die, 2,048 blocks/plane,196 WLs/block, 16 KiB/page(8/16/32 channels in Figure 5.15) |
| Latencies | Read (tR): 52.5 µs, Program (tPROG): 700 µs | |
| EmbeddedCores | 3 ARM Cortex-R4 cores [1239] | 4 ARM Cortex-R4 cores [1239] |
DRAM power, we base the values on a DDR4 model [1229, 1230]. For the CPU cores, we use AMD® µProf [1235].
Baseline Metagenomic Tools. We use a state-of-the-art performance-optimized (P-Opt) tool, Kraken2 + Bracken [435], and a state-of-the-art accuracy-optimized (A-Opt) tool, Metalign [265]. Particularly, for the presence/absence task, we use Kraken2 without Bracken, and Metalign without mapping (i.e., only KMC [1264] + CMash [1270]). For abundance estimation, we use Kraken2 + Bracken, and full Metalign. A-Opt achieves significantly higher accuracy compared to P-Opt [265, 798]. In particular, A-Opt leads to 4.6–5.2× higher F1 scores and 3–24% lower L1 norm error across all tested inputs. One major reason is that A-Opt uses larger and richer databases compared to performance-optimized P-Opt. MegIS’s end-to-end accuracy matches the accuracy of A-Opt because MegIS’s databases encode the same set of k-mers and sketches as A-Opt.
For both Metalign and MegIS, we use GenCache [419] for mapping. We use the mapping throughput as reported by the original paper [419]. MegIS can be flexibly integrated with other mappers. We also evaluate a state-of-the-art PIM k-mer matching accelerator [4] for accelerating Kraken2’s pipeline. We use the k-mer matching performance as reported by the original paper [4].
Datasets. We use three query read sets from the commonly-used CAMI benchmark [1278], with low, medium, and high genetic diversity (i.e., CAMI-L, CAMI-M, and CAMI-H, respectively). Each read set has 100 million reads. We generate a database based on microbial genomes drawn from NCBI’s databases [265, 1253] including 155,442 genomes for 52,961 microbial species. For database generation, we use default parameters for each tool. For Kraken2 [435], this results in a 293 GB database. For Metalign [265], this results in a 701 GB k-mer database and a 6.9 GB sketch tree. MegIS uses the same 701 GB k-mer database and a 14 GB sketch database for MegIS's KSS sketch database (Section 5.2.3).
5.4 Evaluation
5.4.1 Presence/Absence Identification Analysis
We use 1-TB host DRAM in this analysis (smaller than all datasets we evaluate). We examine seven metagenomic analysis configurations: 1) P-Opt, 2) A-Opt, 3) A-Opt+KSS, where A-Opt leverages the software implementation of MegIS's KSS approach (Section 5.2.3) instead of Metalign's CMash [265] for retrieving taxIDs, 4) Ext-MS: a MegIS implementation without ISP, where the same accelerators used in MegIS are outside the SSD, 5) MS-NOL: a MegIS implementation without overlapping the host and SSD operations as enabled by MegIS's bucketing (Section 5.2.2), 6) MS-CC: a MegIS configuration where the SSD cores perform MegIS's ISP tasks, and 7) MS: a MegIS configuration where the hardware accelerators on the SSD controller perform the ISP tasks.

Figure 5.10: Speedup for different SSDs and input sets.
Figure 5.10 shows the speedup of the seven configurations over P-Opt, on three read sets and with SSD-C and SSD-P. We make six key observations. First, MegIS's full implementation (MS) achieves significant speedup compared to both performance-optimized (P-Opt) and accuracy-optimized (A-Opt) baselines. With SSD-C (SSD-P), MS is 5.3–6.4× (2.7–6.5×) faster compared to P-Opt, and 12.4–18.2× (6.9–20.4×) faster compared to A-Opt. Second, A-Opt+KSS, which leverages MegIS's taxID retrieval approach (KSS) instead of A-Opt's baseline taxID retrieval approach, improves A-Opt's performance by 1.4× (4.2×) on average on SSD-C (SSD-P). MegIS's full implementation outperforms A-Opt+KSS by 10.5× (2.9×). This shows that while MegIS's KSS approach, even outside the SSD, provides large benefits, MegIS's full implemen-tation provides significant additional benefits by alleviating I/O overhead. Third, with SSD-C (SSD-P), MS leads to 23.5% (34.9%) greater average speedup compared to MegIS's implementation without overlapping the steps (MS-NOL). This is due to MegIS's bucketing scheme that enables overlapping the steps. Fourth, MS leads to 10.2× (2.2×) average speedup on SSD-C (SSD-P) compared to MegIS's implementation outside the SSD (Ext-MS) due to the benefits of MegIS's specialized ISP. Fifth, while MS-CC provides large speedup, MS leads to 9% (43%) greater average speedup compared to MS-CC on SSD-C (SSD-P). While both MegIS configurations provide large speedup, this shows that the hardware accelerators are useful and their benefits improve as the internal bandwidth grows. Sixth, MegIS's speedup improves as the genetic diversity of the input read sets increases (from CAMI-L to CAMI-H). This is due to the presence of more species in more diverse read sets, which results in a greater number of sketch tree lookups in the baseline taxID retrieval approach. In contrast, MegIS's KSS efficiently retrieves all taxIDs in a single pass through the sketch tables.
To further demonstrate the benefits of MegIS's optimizations, Figure 5.11 shows the time breakdowns with CAMI-L as a representative input. First, KSS improves performance by reducing the execution time of taxID retrieval (as seen by A-Opt+KSS over A-Opt). Second, MegIS without overlapping improves performance over A-Opt+KSS by leveraging ISP to accelerate intersection finding and taxID retrieval (as seen by MS-NOL over A-Opt+KSS). Third, adding overlapping in MegIS's full implementation improves performance by overlapping the execution of sorting in the host system with intersection finding in the SSD (as seen by MS over MS-NOL).

Figure 5.11: Time breakdown with different SSDs for CAMI-L.
Effect of Database Size. Figure 5.12 shows the effect of database size, using CAMI-M as a representative input. The largest database size in each tool (marked by 3×) equals the size mentioned in Section 5.3. We observe that MegIS's speedups increase as the database size increases (up to 5.6×/3.7× speedup compared to P-Opt on SSD-C/SSD-P as database size grows to 3×).

Figure 5.12: Speedup with different database sizes.
Effect of the Number of SSDs. MegIS benefits from more SSDs in two ways. First, mapping different databases to different SSDs allows for concurrent analyses, each benefiting from MegIS, as already shown (see Figure 5.10). Since MegIS's databases and queries are sorted, the database can be disjointly split across SSDs. Figure 5.13 demonstrates this case by showing the speedup of different configurations over P-Opt. We show that MegIS maintains its large speedup with many SSDs (i.e., up to eight). As the external bandwidth increases for the baselines (with the number of SSDs), internal bandwidth also increases for MegIS. Particularly, speedup over P-Opt increases until some point (two SSDs) because MegIS takes better advantage of the scaling due to its more efficient streaming accesses. Although there is a slight decrease in speedup when moving from two to eight SSDs, the speedup is still high (6.9×/5.2× over eight SSD-Cs/SSD-Ps). This decrease is because in MegIS, due to the large internal bandwidth with 8 SSDs, the overall throughput becomes dependent on the host's sorting. Therefore, in systems with many SSDs, MegIS can be integrated with an accelerator for sorting (e.g., [1265–1267]) for further speedup. We conclude that MegIS effectively leverages the in-

Figure 5.13: Speedup with different number of SSDs.
creased internal bandwidth with more SSDs. Due to this efficient use of multiple SSDs (owing to MegIS's sorted database that can be disjointly partitioned), MegIS can efficiently scale up to very large databases that are distributed across different SSDs.
Effect of Main Memory Capacity. Figure 5.14 demonstrates the effect of host DRAM capacity by showing the speedup of all configurations over P-Opt with CAMI-M.⁸ To gain a fair understanding of I/O overheads when DRAM is smaller than the database, we reduce I/O overheads as much as possible in software. We adopt an optimization [432] to load and process P-Opt's database into chunks that fit in DRAM.⁹ In this case, random accesses to the database in each chunk do not repeatedly access the SSD. However, two overheads still remain: 1) there is still the I/O cost of bringing all chunks from the SSD to the host DRAM, and 2) for every database chunk, all of the input sequences must be queried. We make three observations. First, MegIS's speedup increases compared to P-Opt with smaller DRAM (e.g., up to 38.5× speedup with 32GB of host DRAM). This is because P-Opt's performance is hindered by the host DRAM capacity, while MegIS does not rely on large host DRAM. Second, A-Opt and A-Opt+KSS are not affected by the small DRAM (except for the 32-GB configuration) due to their streaming database accesses. But regardless of DRAM size, they suffer from I/O overhead. Third, with the 32-GB DRAM, which is smaller than the extracted query k-mers in Step 1 (Section 5.2.2), MS's speedup increases. This is because MegIS's bucketing (Section 5.2.2) avoids unnecessary page swaps between the host DRAM and the SSD in this case. We conclude that MegIS enables fast and accurate analysis, without relying on large DRAM or large SSD-external bandwidth.

Figure 5.14: Speedup with different main memory capacities.
Effect of Internal Bandwidth. Figure 5.15 shows the effect of internal bandwidth (i.e., by varying the number of SSD channels) on MegIS with CAMI-M as a representative input. We observe that MegIS's speedup increases as the internal bandwidth increases. On SSD-C (SSD-P), MegIS leads to 12.3–41.8x (8.6–21.6x) speedup over A-Opt. The increased speedup is due to the improved performance of MegIS's ISP steps as the internal bandwidth increases.
⁸In all cases, except for the 32GB configuration, all k-mer buckets extracted from the read set (Section 5.2.2) fit in the host DRAM.
⁹Note A-Opt does not require this due to its streaming database accesses.

Figure 5.15: Speedup with varying SSD internal bandwidth.
Impact on System Cost Efficiency. MegIS increases system cost-efficiency because (i) it analyzes large amounts of data inside storage and removes a large part of the analysis burden from other parts of the system, and (ii) it does not rely on either high-bandwidth host-SSD interfaces or large DRAM. Figure 5.16 compares MegIS on a cost-optimized system with SSD-C and 64-GB host DRAM (MS_C) to baselines 1) on the same system (P-Opt_C and A-Opt_C) and 2) on a performance-optimized system with SSD-P and 1-TB host DRAM (P-Opt_P and A-Opt_P).¹⁰ We make two key observations. First, MegIS on the cost-optimized system outperforms the baselines even when they run on the performance-optimized system. MS_C provides 2.4× and 7.2× average speedup compared to P-Opt_P and A-Opt_P, respectively. Note that MS_C provides the same accuracy as A-Opt_P and significantly higher accuracy than P-Opt_P. Second, baselines on the cost-optimized system experience significantly worse performance compared to when they run on the performance-optimized system. P-Opt_C leads to 6.8× (7.7×) average

Figure 5.16: Speedup of MegIS on a cost-optimized system over baselines on cost-performance-optimized systems.
¹⁰For the performance-optimized system, we calculate the cost of 1TB DRAM to be roughly 7080 USD (8× 128GB modules [1279]) and the cost of SSD-P to be roughly 875 USD. For the performance-optimized system, we calculate the cost of 64GB DRAM to be roughly 312 USD (8× 8GB modules [1280], assuming the same number of memory channels as the performance-optimized system) and the cost of SSD-C to be roughly 346 USD. Note that the cost of the total storage system depends not only on the price of each SSD but also on the available interconnection slots in the systems, as systems typically have fewer PCIe slots (needed for SSD-P) than SATA slots (needed for SSD-C).
(maximum) slowdown over P-Opt_P, and A-Opt_C leads to 2.8× (4.2×) average (maximum) slowdown over A-Opt_P. We conclude that MegIS improves system cost-efficiency, while providing high performance and accuracy. This is critical to both increasing the system cost-efficiency and enabling portable analysis, which is increasingly important due to the advances of compact portable sequencers [186, 290, 1281] for on-site metagenomics [246, 253, 272, 291].
Comparison to a PIM Accelerator. Figure 5.17 compares MegIS to a PIM-accelerated baseline. We evaluate Kraken2's end-to-end performance (i.e., including the I/O accesses to load data to the PIM accelerator, k-mer matching, sample classification, and other computation [435]), performing k-mer matching on a state-of-the-art PIM system, Sieve [4].¹¹ MegIS achieves 4.8-5.1× (1.5-2.7×) speedup on SSD-C (SSD-P) over the PIM-accelerated baseline while providing significantly higher accuracy (4.8× higher F1 scores and 13% lower L1 norm error).¹²

Figure 5.17: Speedup over a PIM-accelerated baseline [4].
5.4.2 Abundance Estimation Analysis
We evaluate abundance estimation with four configurations: 1) P-Opt, 2) A-Opt, 3) MS-NIdx: a MegIS implementation that does not leverage MegIS's third step for generating a unified reference index (Section 5.2.4), and instead uses Minimap2 [294] for index generation, and 4) MS: MegIS's full implementation. Figure 5.18 shows speedups over P-Opt. We make two key observations. First, MegIS's full implementation leads to significant speedup compared to both performance- and accuracy-optimized baselines. MS provides ( ) speedup on

Figure 5.18: Speedup for abundance estimation.
We do not use PIM for Metalign's k-mer matching as k-mer matching in Metalign is bottlenecked only by I/O bandwidth, not main memory, due to its streaming accesses.
A larger database for Kraken2 to encode richer information can increase accuracy for the PIM-accelerated baseline, but with even larger I/O overhead.
SSD-C (SSD-P) compared to P-Opt, and 12.0–15.3× (6.5–20.8×) speedup compared to P-Opt. Second, MegIS’s full implementation achieves 65% higher average speedup compared to MS-Nldx due to MegIS’s efficient index generation.
5.4.3 Multi-Sample Use Case
Figure 5.19 shows speedup for the multi-sample use case in which multiple samples need to access the same database (Section 5.2.7). We consider 256-GB host DRAM in which we can buffer k-mers from 1–16 samples. We show the performance of MegIS’s multi-sample pipelined optimization (as described in Section 5.2.7) in software (MS-Pipe) and in the full MegIS design (MS). In all configurations that require sorting (all except P-Opt), we use a state-of-the-art sorting accelerator [1266]. First, MS achieves large speedups of up to over P-Opt/A-Opt. Second, MS-Pipe leads to up to (52.0×) speedup over A-Opt on SSD-C (SSD-P), and the speedup grows with the number of samples. We conclude that MegIS’s pipeline optimization for the multi-sample use case in both software and hardware leads to large speedups over the baseline tools, and the hardware configuration leads to larger speedups compared to the software configuration by additionally leveraging ISP.

Figure 5.19: Speedup for multi-sample analysis.
5.4.4 Area and Power
Table 5.2 shows the area and power consumption of MegIS’s hardware accelerator units at 300 MHz. While these units could be designed to operate at a higher frequency, their throughput is already sufficient since MegIS is bottlenecked by NAND flash read throughput. MegIS’s hardware accelerator area and power requirements are small: only 0.04 mm² and 7.658 mW at 65 nm. The accelerator can be place-and-routed in a small space with 0.25mm × 0.25mm dimensions (0.0625 mm²). The area overhead of the accelerator is 0.011 mm² at 32 nm,¹⁴ which
We use the sorting throughput reported by the original paper [1266] and model the data movement time between the sorting accelerator and other stages of MegIS's pipeline.
We scale area to lower technology nodes using the methodology in [1238].
Table 5.2: Area and power consumption of MegIS's logic.
| Logic unit | # of instances | Area [mm²] | Power [mW] |
|---|---|---|---|
| Intersect (120-bit) | 1 per channel | 0.001361 | 0.284 |
| k-mer Registers (2× 120-bit) | 1 per channel | 0.002821 | 0.645 |
| Index Generator (64-bit) | 1 per channel | 0.000272 | 0.025 |
| Control Unit | 1 per SSD | 0.000188 | 0.026 |
| Total for an 8-channel SSD | - | 0.04 | 7.658 |
is 1.7% of the three 28-nm ARM Cortex R4 cores [1239] in a SATA SSD controller [618]. While both the accelerator and the cores in the SSD controller can execute MegIS's ISP tasks, the accelerator is 26.85× more power-efficient than the cores.
5.4.5 Energy
We demonstrate the energy consumption of different metagenomic analysis tools by obtaining the energy of the host processor, the host DRAM, the accelerators, the SSD's internal DRAM, host/SSD communications, and the SSD accesses. For each tool, we calculate the energy consumption of each part of the system based on its active/idle power and execution time. We observe that MegIS provides significant energy benefits over other software and hardware baselines by alleviating I/O overhead and reducing the burden of metagenomic analysis in the system (the host processor and DRAM). Across our evaluated SSDs and datasets, MegIS leads to 5.4× (9.8×), 15.2× (25.7×), and 1.9× (3.5×) average (maximum) energy reduction compared to P-Opt, A-Opt, and the PIM-accelerated P-Opt when finding species present in the sample. By eliminating the need to move the large databases outside the SSD, MegIS leads to I/O data movement reduction of 71.7× over A-Opt and 30.1× over P-Opt and the PIM-accelerated P-Opt.
Figure 5.20 (a) shows the energy breakdown of different systems for a representative input (CAMI-M). We show energy breakdown between the host CPU, host DRAM, host SSD accesses, ISP logic units, in-storage DRAM, and SSD accesses during ISP. We make two observations. First, by analyzing large amounts of data with lightweight logic units inside the storage system, MegIS leads to significantly lower energy consumption. Second, despite relying on a high-end host server node for computation, A-Opt+KSS achieves large energy savings due to the shorter execution time of our proposed KSS approach and more efficient querying of the k-mer sketch database.
Figure 5.20 (b) shows the energy breakdown of different systems for a representative input (CAMI-M), excluding the host CPU, to isolate the energy distribution between main memory
5.5. SUMMARY
106

Figure 5.20: Energy breakdown of different systems (a) with and (b) without host CPU energy.
and storage accesses across configurations. This breakdown also serves as an idealized study of a scenario in which energy-efficient specialized hardware units replace general-purpose CPUs for computation. We make two observations. First, by analyzing data within the storage system, MegIS reduces the energy spent on accessing the storage system (please note that, as discussed in Section 5.3, MegIS, A-Opt, and A-Opt+KSS use the same k-mer database size, which is much larger than the k-mer database used in P-Opt). Second, by more efficient access patterns to the k-mer sketch database in our proposed KSS approach, A-Opt+KSS spends significantly less energy on host DRAM compared to A-Opt.
5.5 Summary
We introduce MegIS, the first in-storage processing system designed to significantly reduce the data movement overhead of end-to-end metagenomic analysis. To enable efficient in-storage processing for metagenomics, we propose new 1) task partitioning, 2) data/computation flow coordination, 3) storage-aware algorithms, 4) data mapping, and 5) lightweight in-storage accelerators. We demonstrate that MegIS greatly improves performance, energy consumption, and system cost efficiency at low area and power costs.
5.5.1 Impact and Influence
MegIS is published at the International Symposium on Computer Architecture (ISCA) in 2024 [527]. It is fully open-sourced at [530]. An extended version of the ISCA 2024 paper is available on arXiv [531].
As shown in Section 5.4.1, MegIS improves system cost-efficiency, while providing high performance and accuracy. This is critical to enabling (i) wider adoption of metagenomic analysis and (ii) analysis on low-cost, portable devices, which is increasingly important due to the advances of compact portable sequencers [186, 290, 1281] for on-site metagenomics [246, 253, 272, 291].
MegIS has already influenced several subsequent works (e.g., [525, 526, 528, 529, 532]) in other areas of bioinformatics and other domains such as AI/ML.
5.5. SUMMARY
107
We hope that the key ideas and approaches introduced in MegIS inspire further research in storage-centric designs in other data-intensive application domains in healthcare and life sciences, to facilitate their wider adoption and their execution on low-cost, portable devices.
Chapter 6
GRAINS: Storage-Aware Algorithm-Architecture Co-Design for Graph-Based Genomic and Metagenomic Analysis
6.1 Motivational Analysis
We conduct experimental analyses to assess the impact of I/O overheads on graph-based genome analysis performance.
6.1.1 Data Movement Overheads
Tools and Datasets. We use two state-of-the-art tools for large genome graph analysis: (i) Fulgor [236], a node-centric tool, and (ii) the MetaGraph framework [232–235], an edge-centric tool. For each, we use the best-performing thread count and color encoding scheme. We evaluate k-mer set lookup, a fundamental task on genome graphs (Section 2.5). Graphs are built from a pilot subsample of the global MetaSUB Consortium [148] dataset. The resulting graph (with colors) is 659 GB for Fulgor and 822 GB for MetaGraph. We evaluate queries with varying read counts, ranging from 100K reads to 10M reads (35 MB to 3.5 GB). Section 6.9 provides further methodology details.
Note that smaller queries are also critical, as some applications (e.g., searching for antimicrobial resistance [148,232,811,818] or for a single gene of interest [126]) require searching a single or a few genes within a large graph.
System Configurations. Our experiments run on a high-end server with an AMD EPYC 7742 CPU [1200] and 1.5 TB of DDR4 DRAM [1229]. DRAM capacity exceeds the total size of all data accessed during the analysis. This ensures that we capture the intrinsic I/O overhead of transferring large, low-reuse data from the storage system to main memory, without being constrained by memory capacity. We analyze I/O overheads using two state-of-the-art SSDs: (i) SSD-M, with a PCIe Gen4 interface [1198] and (ii) SSD-H, with a PCIe Gen5 interface [620].
Observations. Figure 6.1 shows throughput (#queries/sec) of the tools, normalized to that of a hypothetical configuration with zero performance overhead due to storage I/O (DRAM). We observe that in all cases, I/O leads to large overheads, even with the state-of-the-art SSDs. Compared to SSD-M (SSD-H), DRAM leads to and better average performance in Fulgor and MetaGraph, respectively.

Figure 6.1: Normalized throughput of (i) Fulgor and (ii) MetaGraph under different storage configurations and query sizes.
Figure 6.2 shows the throughput of the tools normalized to DRAM, across different database sizes. The larger graph (G_MetaSUB) is the one discussed earlier. The smaller graph (G_SRArep) is generated from a representative subset of the Sequencing Read Archive's [266] public portion. The resulting graph (with colors) is 161 GB for Fulgor and 231 GB for MetaGraph. We observe that, in all cases, I/O overhead is substantial and increases with database size. For example, the speedup of DRAM over SSD-H increases from to (as the graph database size grows from 161 GB to 659 GB) in Fulgor and from to (as the graph database size grows from 231 GB to 822 GB) in MetaGraph.

Figure 6.2: Normalized throughput of (i) Fulgor and (ii) MetaGraph under different storage configurations and graph sizes.
Based on these observations, we conclude that storage I/O leads to large overheads in graph-based genome analysis, an overhead that is expected to exacerbate in the future. This I/O overhead is due to moving large amounts of low-reuse data from the storage system all the way to main memory, caches, and computational units. Due to its low reuse, caching this data in DRAM during analysis (even if DRAM is larger than the data size, as evaluated in our analyses) does not significantly amortize this overhead. While several works (e.g., [250,253,416,432,508,793,798,1258–1260]) accelerate analysis with genome graphs, to our knowledge, they do not address storage I/O overheads. Although mitigating other bottlenecks (e.g., main memory or computation) leads to large benefits, doing so does not alleviate I/O overheads, whose impact on end-to-end performance becomes even larger as other bottlenecks are alleviated.
This I/O overhead, due to moving large amounts of low-reuse data, is hard to avoid. One might think it is possible to avoid it by (i) producing smaller databases through sampling (e.g., [434–439]) or (ii) maintaining all required graph data completely and always resident in main memory. However, neither of these is suitable. The first approach necessarily reduces accuracy [250], rendering it inapplicable for many use cases (e.g., [250, 253, 416, 432, 508, 793, 798, 1258–1260]). The second approach is energy-inefficient, unsustainable, costly, and unscalable for two reasons. First, the sizes of graph-based databases (which are already large, i.e., tens to hundreds of TBs in some recent examples [232, 1282]) have been growing rapidly [2, 266, 267, 849]. Second, independent of the sizes of individual graphs, different analyses need different graphs, constructed from different sets of genomes and/or with varying parameters. For example, clinical studies may require graphs with patients' genomes kept separately for privacy [1283], while metagenomic studies and wastewater monitoring require highly diverse genome sets [228, 437, 1259, 1284]. Therefore, keeping all data for all possible analyses in DRAM at all times is prohibitively inefficient and ultimately unsustainable.
Several works (e.g., [365, 515, 523, 527]) have already demonstrated significant I/O overheads in non-graph-based genome analysis. While genome graphs enable a more compact representation of population-scale databases (thereby making it feasible to analyze databases that would be prohibitively large under traditional, linear representations), they still suffer from large I/O overheads. This is because the massive and continually growing scale of these databases still leads to very large graphs with low data reuse, and the graph topology introduces irregular, dependent access patterns, further reducing locality.
6.1.2 Alleviating Data Movement Overheads
Storage-Centric Computing (SCC)
Processing data in the storage device can be a fundamental approach for reducing the I/O overheads for three reasons. First, SCC eliminates unnecessary data movement of low-reuse data across the system. Second, SCC reduces the computational burden imposed by low-reuse data on the rest of the system (e.g., main memory and computational units), such that these components can be used for other purposes or be turned off to save energy, or can be made simpler or less costly [527,1026]. Third, as highlighted by many prior works (e.g., [515,592,951–957]), SCC can leverage the high internal bandwidth of SSDs. In modern SSDs, the internal bandwidth often surpasses the external bandwidth. For example, a state-of-the-art SSD controller [622] delivers 14 GB/s of external bandwidth and up to 57.6 GB/s of internal bandwidth (achieved via 16 channels, each with a peak of 3.6 GB/s). Over-provisioning internal bandwidth in modern SSDs is important to protect user-perceived external I/O performance, mitigating the effects of (i) channel contention [562, 617, 941, 1285] and (ii) the SSD's internal data migration for management tasks [551, 563, 568, 616] and refresh [552, 559]. The effective internal bandwidth increases even further when processing directly in the NAND flash dies [587, 589, 595]. This is because in-flash processing exploits the aggregate bandwidth across all dies, a bandwidth that grows with the number of dies and significantly exceeds both (i) the bandwidth available to processing units on the SSD controller and (ii) the external SSD bandwidth.
Challenges and Goal
Designing a SCC system for graph-based genome analysis is challenging because none of the existing approaches can be directly implemented inside storage effectively due to modern SSDs' constrained hardware resources. Both node- and edge-centric representations of genome graphs require many random accesses during analysis. These random and irregular accesses cause costly contention in internal SSD components (e.g., channels and NAND flash chips [562, 568, 941]), which hinder leveraging the SSD's internal bandwidth. Therefore, directly adopting existing approaches inside storage leads to performance and energy overheads.
Some SCC systems in other domains regularize accesses by performing sorting in either the SSD or the host. However, these approaches are not effective for graph-based genome analysis. Sorting the large number of accesses is impractical within the SSD due to resource constraints. Sorting on the host also fails to fully address access irregularity, as graph-based genome analysis involves dependent accesses. Coordinating sorting between the host and the SSD for each round of dependent accesses incurs significant data movement overhead.
6.2. GRAINS
112
Our goal in this work is to improve the performance and efficiency of graph-based genome analysis by alleviating its data movement overheads from storage cost-effectively.
6.2 GRAINS
We propose GRAINS, a versatile storage-centric system for graph-based genome analysis. GRAINS supports major operations in analysis with genome graphs (e.g., k-mer set lookup and read mapping), and for alignment-based workflows, it flexibly integrates with existing alignment accelerators. GRAINS is primarily designed as a system to accelerate analysis with genome graphs. GRAINS augments the existing SSD controller, flash dies, and FTL, and when not in the analysis acceleration mode, the SSD remains available for other applications, like a conventional general-purpose SSD.
We address the challenges of designing a SCC system for graph-based genome analysis via storage-aware algorithm architecture co-design based on our detailed examination of typical analysis pipelines that operate on genome graphs. To this end, we (i) make these pipelines more storage-friendly and (ii) further improve their performance, energy-efficiency, and cost-effectiveness via ISP and IFP.
GRAINS's algorithm-architecture co-design comprises three key aspects. First, we design efficient batching and reordering techniques and pipelined execution flow specialized to the properties of genome graphs to reduce the number of random accesses to the graph. Second, we devise lightweight IFP units to process the needed parts of each page's graph data in the flash die. This IFP design avoids transferring low-reuse or unused parts of flash pages outside the die, thereby preventing bandwidth waste. Third, to fully exploit die-level parallelism during IFP, we design an effective yet lightweight SCC scheduling technique, enabled by repurposing existing SSD structures. GRAINS's data placement (Section 6.6) drastically reduces the required in-DRAM mapping metadata, allowing us to use the freed-up internal DRAM space to maintain small per-die scheduling tables. We devise small ISP units on the SSD controller to interface with these tables and schedule IFP operations at low cost. To efficiently realize these aspects, while guaranteeing correctness and integrity, we apply simple changes to the FTL and adopt a lightweight ECC [589].
Leveraging our optimizations, GRAINS's SCC steps require only simple operations and small buffer spaces, enabling execution on either (i) our lightweight, specialized IFP and ISP hardware units or (ii) general-purpose IFP (e.g., [587,588,595,597]) and ISP (e.g., [561,962–974,1286,1287]) units. Efficient genome graph analysis on both stems from GRAINS's specialized batching, scheduling, and data/computation flow coordination. Execution on special-purpose lightweight hardware leads to higher power efficiency (Section 6.10.2), while execution on
6.3. DATA STRUCTURES
113
existing general-purpose cores on the SSD controller or general-purpose IFP and ISP units facilitates near-term adoption. Ultimately, choosing between these GRAINS configurations is a design decision.
Figure 6.3 shows an overview of GRAINS, with its lightweight IFP processing elements (PEs) on NAND flash dies and the lightweight ISP PE and scheduler on the SSD controller. GRAINS FTL (Section 6.6) orchestrates host communications and data flow across the SSD components. After receiving a request through GRAINS's interface commands (Section 6.7) for accelerating graph-based genome analysis (① in Figure 6.3), GRAINS prepares (②) for SCC execution by flushing the conventional FTL metadata and loading the GRAINS FTL metadata (Section 6.3). When execution starts, in the first step (Section 6.4), GRAINS prepares input queries in the host via efficient batching and pipelined execution, and transfers the query batches to the SSD (③). In the second step (Section 6.5), GRAINS accesses graph data structures via its IFP (④) and ISP (⑤) units and sends the query results to the host (⑥). These two steps are pipelined, with efficient coordination between resources to avoid writes during SCC. Through its efficient execution flow and by avoiding frequent management tasks (by not needing writes during SCC), GRAINS effectively leverages the SSD's large internal bandwidth.

Figure 6.3: Overview of GRAINS.
6.3 Data Structures
GRAINS uses a node-centric DBG representation based on an associative dictionary to compactly represent graph sequences and their associated colors. Similar to prior large-scale genome graph analysis tools (e.g., [236, 839, 841, 1288]), we use SSHash [833] as our dictio-
6.3. DATA STRUCTURES
114
nary since, by exploiting the statistical features of k-mers, it achieves a substantially better space-time trade-off over prior sequence dictionaries.²
Graph Sequences. We store DBG's unitigs (i.e., maximal non-branching paths) as contiguous strings in a predetermined order, so that a k-mer occurring in any unitig can be quickly located using a minimal perfect hash function [1289] built for the set of k-mers.³ Figure 6.4 shows an overview of the DBG structures. The unitigs are stored in Strings, and are indexed via Offsets and Sizes. Given a query read , k-mers from the read are extracted and looked up. Consider k-mer . First, its minimizer (i.e., the first -mer with the smallest hash value) is extracted (① in Figure 6.4). Second, with the minimizer's minimal perfect hash value (), Sizes is indexed (②). Third, with the Sizes values at locations , Offsets is indexed (③). Sizes[] from Sizes[] is then subtracted to find how many Offsets elements to read at Sizes[]. Fourth, with the Offsets values, Strings is indexed (④), and a window of length [833] in Strings is checked to find the minimizer and check if the rest of the k-mer matches.

Figure 6.4: Overview of the DBG structures and k-mer query.
We can easily convert the existing DBGs in the Graphical Fragment Assembly (GFA) format to the SSHash-based format used in GRAINS. To this end, if only the canonical k-mers are used during the construction of the GFA file, we can use the same procedure as done for collections of sequences to generate an SSHash representation: we can extract the k-mers encoded in the GFA, extract minimizers, calculate their hash values using SSHash, and encode the offsets and strings accordingly. If instead the GFA file includes both orientations of some k-mers, an additional canonicalization and deduplication step is needed: we extract the k-mers,
²Since our techniques rely on general DBG properties, they are also applicable to other k-mer dictionaries that may be used as DBG backbones [232, 236, 309, 809, 810, 824, 839, 841, 1288].
³Note that in DBGs, edges between unitigs are represented implicitly via -mer overlaps (Section 2.5).
6.4. INPUT QUERY PROCESSING
115
canonicalize them, remove duplicates, and reassemble unitigs before proceeding with the same SSHash construction.
Graph Colors. For storing graph colors, we adopt an approach similar to [236]. As shown in Figure 6.5, we sort the unitigs in Strings based on their colors (i.e., the ID pointing to the metadata for that graph unitig), and use a simple Color Bitmap to mark the start of each new color. This encoding efficiently stores repeated colors at low storage overhead.

Figure 6.5: Graph color encoding used in GRAINS.
6.4 Input Query Processing
In this step, GRAINS prepares reads for efficient graph queries in the next step (Section 6.5). We perform two new optimizations inspired by the characteristics of genome graphs and queries.
Cross-Read K-Mer Batching. Instead of querying each read in a read set individually, we analyze k-mers across different reads together. This way, we can batch k-mers to reduce the number of random accesses to the graph. To enable this, GRAINS populates a lightweight data structure associating each k-mer with the reads it originates from. When graph queries return the colors of matched k-mers, GRAINS assigns colors to each read. We perform this step in the host since extracting k-mers from reads incurs frequent writes, which would reduce the SSD's lifetime if performed inside the SSD.
Genome-Graph-Aware Query Reordering. We leverage a common property of minimal-perfect-hash-based k-mer dictionaries in DBGs: The metadata required for identifying the small per-minimizer lookup ranges (i.e., the Sizes array, as shown in Figure 6.4) is much smaller than the graph's Offsets and Strings. Although the full graph is far too large and incurs large I/O overhead to access it in the host (as shown in Section 6.1), Sizes occupies only a small fraction of the total space (e.g., <4% in our large-scale graphs). This enables a powerful opportunity: We perform k-mer lookups on Sizes in the host and use the resulting Offsets indices to sort and batch k-mers before sending them to the SSD, thereby reducing the number of accesses and improving the access patterns to Offsets. To execute this step efficiently, as detailed below, we ensure that the time spent sorting the data and transmitting it to the SSD does not introduce significant overheads.
Figure 6.6 shows an overview of GRAINS's query processing. GRAINS starts by extracting k-mers from each read (① in Figure 6.6) and looking them up in Sizes (②). To reduce the overhead of sorting and transferring k-mers to the SSD, we take two measures. First, we propose a new k-mer processing scheme by improving upon k-mer processing in [527, 1264]. We partition the k-mers into batches corresponding to equal, disjoint ranges of Sizes values (③). Since these values serve as indices into Offsets, this partitioning enables an efficient pipeline: the sorting of one batch overlaps with the data transfer and Offsets lookups of the previous batch. Second, during sorting, we further compact k-mers by exploiting the fact that consecutive k-mers sorted by Sizes share the same minimizer (④). Thus, we store the minimizer once and keep only the differences, thereby significantly reducing the transferred data size (e.g., by 2.3× on average across our evaluated datasets).

Figure 6.6: Overview of GRAINS's query processing.
6.5 Graph Query
In this step, GRAINS looks up the query k-mers in the graph and, for the k-mers that match a unitig, retrieves the associated colors. GRAINS executes this step inside the SSD to benefit from its large internal bandwidth. In particular, GRAINS performs IFP to avoid the need to transfer unnecessary parts of pages out of flash dies and to leverage multiple dies in parallel. To efficiently execute this step, GRAINS needs to leverage this large internal bandwidth, without requiring expensive hardware resources in the SSD (e.g., costly logic units, or large internal DRAM capacity or bandwidth). We demonstrate how GRAINS achieves these when accessing genome graph Offsets (Section 6.5), Strings (Section 6.5), and Colors (Section 6.5). A lightweight FSM control unit on the SSD controller coordinates execution flow between these stages.
Accessing Graph Offsets
Figure 6.7 provides an overview of GRAINS's Offsets lookups. GRAINS receives Offsets indices and compacted k-mers from the host in chunks (①). The internal DRAM holds two small chunks: one incoming from the host and one used for querying Offsets. For an SSD with 16 channels, 8 dies/channel, 4 planes/die, and 4-KiB pages, GRAINS needs two 2-MiB chunks. GRAINS reads the values from DRAM, maps them to physical addresses using its simple mapping (Section 6.3), and uses them to access Offsets (②). Since the Sizes values are sorted by the host (Section 6.4) and Offsets are uniformly placed across dies (as detailed in Section 6.6), the lookups lead to sequential accesses that fully exploit the internal bandwidth. After loading a page into a die's page buffer, the lightweight ECC_LITE scheme [589] corrects errors (③), after which the IFP unit selects and extracts only the targeted Offsets entry and sends it to the controller (④), avoiding the transfer of full pages across the channel bus. The resulting values are cached in internal DRAM for subsequent Strings queries. Although full pages are read inside each die, only a small part of each page is written to internal DRAM, preventing the internal DRAM's bandwidth from becoming a bottleneck.

Figure 6.7: Overview of GRAINS's Offsets lookups.
Accessing Graph Strings
Accesses to Strings must also fully exploit the SSD's large internal bandwidth; however, unlike Offsets, the indices into Strings (i.e., the retrieved Offsets entries) arrive unsorted, preventing simple sequential streaming.
Lightweight Scheduling. We introduce a lightweight scheduler that (i) avoids redundant page accesses, and (ii) maximizes die-level parallelism, without sorting accelerators in the SSD, which are inefficient, given the large number of elements and the limited bandwidth of internal DRAM [974].
As shown in Figure 6.8, we design a small table, called GRAINS Scheduler Table (GST) for each die in the internal DRAM, with one row per Strings page. Each row stores the bit address within the page (as marked by Offsets entries), the k-mer minimizer and its suffixes/prefixes (Figure 6.6), a flag indicating whether the row is full (and if so, pointing to an extension table), and a small one-hot encoded bitmap marking the target plane in the die. This bitmap enables GRAINS to issue multi-plane SSD operations, allowing multiple planes of the same die to serve different accesses concurrently. When accessing Strings, GRAINS schedules requests by simply reading one row per GST sequentially and issuing requests across all dies and planes in a round-robin manner. This naturally coalesces accesses to the same page, avoids redundant page accesses, and achieves high parallelism with minimal metadata and no complex logic.
GRAINS can store GSTs in the internal DRAM because (i) its efficient address mapping (Section 6.6) frees most of the DRAM, and (ii) our compact k-mer representation (Section 6.4) keeps GST entries small. Internal DRAM is sufficient even for large read sets and graphs (e.g., our large evaluated read set with ~10 million query reads on a large-scale genome graph requires only 2.9 GB, well within the 4-GB internal DRAM in a typical 4-TB SSD). Furthermore, to ensure efficient functionality even when usage exceeds the internal DRAM's capacity, GRAINS keeps some Sizes batches (Section 6.4) in host DRAM until the SSD finishes processing the current batch.
Figure 6.8 shows an overview of Strings lookups. First, GRAINS's scheduler reads Strings addresses and corresponding k-mers from each GST (①) and sends the k-mers to the corresponding dies (②). The scheduler performs simple increments to index the next row of GSTs. Second, GRAINS reads the corresponding Strings page, and after ECC_LITE (③), the IFP unit performs a comparison (④) between the Strings at the indexed window and the incoming k-mer from the controller. Finally, it sends the comparison result and the unitig IDs (for matching k-mers) back to the SSD controller.

Figure 6.8: Overview of GRAINS's Strings lookups.
Accessing Graph Colors
GRAINS retrieves the colors of the matched unitigs. Due to GRAINS's efficient scheduling (Section 6.5), unitig IDs are already retrieved in the internal DRAM in page order. Thus, given
Our evaluated graphs (Section 6.9) are near the upper bounds of individual graph sizes. Graph-based databases that encode even larger volumes of data typically consist of several subgraphs that need to be queried. This is because graph construction time scales super-linearly, making construction of a single giant graph prohibitively long [834,1289].
6.6. FTL INTEGRATION AND RELIABILITY SUPPORT
119
the underlying color encoding (Section 6.3), their colors can be obtained via efficient sequential scans of the Color Bitmap (Section 6.3). Figure 6.9 illustrates this. GRAINS streams the next unitig ID into a small register (①) while concurrently scanning the Color Bitmap from NAND flash dies (②). Given that the bitmap is consumed immediately, GRAINS's ISP units directly operate on NAND flash streams (as in prior work [974]), without buffering them in the internal DRAM. This avoids bottlenecking the internal DRAM's bandwidth, which is especially important because this is the only stage that must read entire pages rather than small, selective portions. GRAINS uses only two small, 32-bit registers per channel: one for the current and one for the incoming data. As the bitmap is processed, each time a "1" is encountered, GRAINS increments Color Index (③). Once the bitmap position matches the unitig ID, GRAINS uses the Color Index to index the Colors (⑤). To access Colors, GRAINS uses the same approach as Offsets (Section 6.5), where, after light ECC (⑥), the IFP units select and transmit only the relevant portion of each page (⑦). This enables efficient, low-cost color accesses while fully leveraging the SSD's internal bandwidth.

Figure 6.9: Overview of GRAINS's Colors lookups.
6.6 FTL Integration and Reliability Support
GRAINS FTL requires only minor changes to the baseline FTL. It designates each block as either genomic or non-genomic, and identifies genomic accesses through GRAINS commands (Section 6.7). For all non-genomic data, vendor-specific FTL features remain untouched, and the SSD behaves conventionally. At the start of its SCC operations, since GRAINS does not perform writes during them, it flushes the standard L2P metadata to the flash and loads the much smaller GRAINS L2P metadata (as detailed below) into internal DRAM, while also keeping the other metadata of a conventional FTL.
Physical Allocation. Since GRAINS regularizes accesses, GRAINS's data placement is simple and enables (i) efficiently leveraging the SSD's internal bandwidth and (ii) minimizing mapping metadata. We uniformly distribute the blocks of the underlying graph data structures and the query reads across different channels, dies, and planes in a round-robin way. For effi-
6.6. FTL INTEGRATION AND RELIABILITY SUPPORT
120
cient multi-plane operations, active blocks across different planes are aligned to the same page offset.
Profiling-Guided Data Placement. GRAINS adopts a uniform round-robin data placement across channels, dies, and planes. This data placement works synergistically with GRAINS's batching (Section 6.4) and lightweight scheduling (Section 6.5). Specifically, by uniformly distributing data across channels, dies, and planes, round-robin placement ensures that the sorted and batched Offsets queries produced by GRAINS's query processing translate directly into well-balanced, parallel accesses across all internal SSD resources. This uniform distribution is also what enables GRAINS's lightweight scheduler to (i) effectively merge accesses to repeated pages and (ii) efficiently leverage the SSD's internal bandwidth across all dies, without requiring workload-specific profiling.
That said, for workloads with persistently skewed query distributions (e.g., when specific genomic regions are queried disproportionately often), profile-guided placement could offer additional load balancing benefits across SSD components. Such an optimization would be seamless to integrate with GRAINS, as it would only affect the initial data layout without requiring changes to GRAINS's core batching, scheduling, or ISP/IFP logic. We consider this a promising future work.
FTL Metadata Size. GRAINS reduces the required FTL metadata size due to two reasons. First, instead of page-level L2P mappings (which, with 4 KiB pages, lead to ~4 GB of metadata for a 4-TB SSD), GRAINS stores L2P metadata at block granularity. This is possible because GRAINS performs no writes during SCC, and thus, no fine-grained remapping is needed. For a 1-TB graph with 12-MB blocks, this requires only 0.35 MB. Second, GRAINS's uniform data placement makes physical locations computable from base addresses and stride, minimizing per-block metadata needed for the SSD's reliable operations (e.g., read-disturbance counters). With per-block metadata, overall metadata size is 0.7 MB, freeing most of the internal DRAM for GRAINS's SCC and scheduling tables.
Error Correction. For data accessed by GRAINS's ISP units on the SSD controller (e.g., Color Bitmap), accesses occur after the regular ECC. For structures accessed by GRAINS's on-die hardware units, we adopt a lightweight on-die ECC technique, , along with its associated Bias Error Encoding [589].
Other Management Tasks. Since in SCC mode, GRAINS does not incur writes, it does not require write-related management such as GC and wear-leveling. GRAINS performs other tasks for ensuring reliability before or after SCC since (i) the duration of each GRAINS process is significantly shorter than the manufacturer-specified threshold for reliable retention age
6.7. INTERFACE COMMANDS
121
(e.g., a year [1227]), and (ii) GRAINS avoids read-disturbance errors [544, 545, 550–552, 554] during SCC since, due to its efficient execution, each block is read at most once. After SCC steps, to prevent read disturbance errors in the future, GRAINS refreshes blocks whose read count exceeds a specific threshold.
6.7 Interface Commands
GRAINS needs three new NVMe commands.
GRNS_Start initiates graph genome analysis acceleration. When it receives this command, GRAINS prepares itself for execution in SCC mode (Section 6.2). During this phase, GRAINS handles execution/data flow based on GRAINS FTL and FSM controller.
GRNS_Steps marks the start and end of each pipeline step and triggers GRAINS's lightweight FSM on the SSD controller, which drives the internal execution during SCC. The host uses this command to signal that a query batch is ready, then transfers the batch to the SSD's internal DRAM via the standard NVMe data path. Unlike conventional writes, these batches remain in the internal DRAM for processing and are not programmed to flash. The SSD then processes the batch through its internal pipeline with GRAINS's FSM on the SSD controller coordinating execution and data flow, and returns results to the host. This enables pipelining multiple batches: as the SSD processes the current batch, the host prepares the next one. No additional commands are needed because the FSM fully determines the internal execution flow once a batch arrives. At the end of the last step, GRAINS returns to operation as a conventional SSD.
GRNS_Write is a specialized command for writing genome graphs to the SSD, which updates both the regular FTL's L2P metadata and GRAINS's small L2P metadata.
6.8 Deployment and Integration
GRAINS offers flexible deployment paths to minimize integration costs across both the hardware and software stacks.
Flexible ISP/IFP Deployment. Due to our optimizations, GRAINS's ISP/IFP steps require only simple operations with small buffers (Section 6.10.2). Thus, they can execute on either our specialized, lightweight logic units or on general-purpose ISP/IFP (e.g., [587, 588, 962–974, 1286, 1287]). Specialized logic maximizes power efficiency (Section 6.10.2), while general-purpose ISP/IFP facilitates near-term adoption. Ultimately, choosing between these GRAINS configurations is a design decision.
6.9. METHODOLOGY
122
Minimal and Non-Disruptive FTL Modifications. The required modifications to the FTL are small and non-disruptive, including simple changes to the baseline FTL, as described in Section 6.6. The FTL needs to support GRAINS's L2P mapping and garbage collection, which are lighter than the baseline (due to GRAINS's data placement) and are already modeled in our evaluations by MQSim [1234, 1276] (Section 6.9). Most importantly, when GRAINS is not operating in its SCC acceleration mode, the SSD operates identically to a standard, general-purpose SSD, which means standard storage deployments are intact.
Seamless System-Level Integration. GRAINS requires only three new NVMe commands for host-device communication (Section 6.7). This lightweight protocol extension requires no physical interconnect modifications and, similar to prior works with added NVMe commands (e.g., [515, 527, 589]), leverages standard vendor-specific NVMe extensions. Similarly, file system and driver modifications are strictly confined to identifying genome graph files and mapping these three commands. This ensures that software integration remains straightforward, low-cost, and non-disruptive to the existing storage stack.
6.9 Methodology
Performance. We design a simulator that models all of GRAINS's components, including host operations, internal DRAM, accessing flash dies, in-storage hardware units (on flash dies and on the SSD controller), and SSD-host interfaces. We then feed the latency and throughput of each component to this simulator. Using this methodology, as also leveraged in prior SCC works (e.g., [515, 527, 529, 595, 951, 961]), enables us to flexibly incorporate state-of-the-art system configurations in our evaluations. For hardware-based components (e.g., when querying the graph): We implement GRAINS's ISP/IFP logic units in Verilog and synthesize them with a 22nm library [1290] using the Synopsys Design Compiler [1228]. We use two state-of-the-art simulators, MQSim [1234, 1276] to model SSD's internal operations, and Ramulator [1232, 1233] (new version introduced in [1291, 1292]) to model internal DRAM. For software-based components (e.g., when preparing queries), we measure their performance on a real system with 1.5-TB DRAM (in all experiments unless mentioned otherwise) and AMD EPYC 7742 CPU [1200] with 128 physical cores. We use SSD-M [1198] and SSD-H [620] as described in Section 6.1 and Table 6.1 in our real system experiments. In our MQSim simulations for the ISP/IFP steps, we faithfully model these SSDs with configurations summarized in Table 6.1. For the software baselines, we measure performance using the best-performing thread counts on the same real system used for GRAINS's software-based components.
To ensure correct composition between host-side and SSD-side timing (including pipelin-
6.9. METHODOLOGY
123
Table 6.1: Evaluated SSD configurations.
| Specification | SSD-G4 | SSD-G5 |
|---|---|---|
| General | TLC NAND flash-based SSD4 TB capacity, 4 GB internal DRAM [1277] | |
| Bandwidth(BW) | PCIe Gen4 interface [1199];7 GB/s sequential-read BW;1.2-GB/s channel I/O rate | PCIe Gen5 interface [1293];14.8 GB/s sequential-read BW;2.4-GB/s channel I/O rate |
| NAND Config | 16 channels, 8 dies/channel, 4 planes/die | |
ing), we explicitly model the interaction between stages. GRAINS's pipeline stages exchange data through well-defined chunk transfers across the host-SSD interface (as described in Section 6.4), which we can faithfully model using the bandwidth and latency of the corresponding interfaces. We enforce stage dependencies via a producer-consumer abstraction; a stage can start only after the required data chunks are produced and transferred, while overlap between stages is naturally limited by the modeled communication bandwidth and device throughput. Doing so enables accurate timing composition of GRAINS's lightweight pipeline stages while faithfully accounting for the communication and synchronization costs between host and SSD.
Area and Power. For GRAINS's logic units, we use our Design Compiler synthesis results. SSD power is based on values of a Samsung 3D NAND flash-based SSD [618]. DRAM power is based on values from a DDR4 model [1229, 1230]. For the CPU cores, we measure power with AMD µProf [1235].
Evaluated Systems. We evaluate three key tasks: (i) k-mer set lookup, (ii) alignment-free read mapping, and (iii) alignment-based read mapping. We evaluate the following tools for analysis with large-scale genome graphs:⁵ (i) Fulgor [236] (FG), as a state-of-the-art node-centric software tool (which uses SSHash [833]), (ii) the MetaGraph framework [232–235] (MG) as a state-of-the-art edge-centric software tool; (iii) an idealized hardware-accelerated baseline (IdealAccMem) where all genome graph query operations execute without main memory overheads (i.e., zero latency, infinite bandwidth, infinite capacity). This configuration can represent an ideal PIM baseline as well. IdealAccMem still incurs the I/O overhead of bringing the large, low-reuse data from the storage system to main memory. Comparing against this baseline demonstrates the impact of storage I/O as a fundamental problem that persists even when main memory overhead is alleviated; (iv) GRAINS with all its optimizations, but with its lightweight hardware as an accelerator outside the SSD (GRN-Ext), to show the benefits of GRAINS's optimizations without ISP/IFP, but with more storage-friendly execution/data flow.
⁵As discussed in Section 2.5, DBGs scale substantially better than other genome graph structures as the genetic diversity in the database increases. Other tools (e.g., VG [837] and minigraph [320]) that use variation graphs as their graph structure do not scale as well and, hence, are not typically used in scenarios with large-scale, genetically diverse databases [232, 828].
The lightweight hardware is connected to the host system via a PCIe interface with 16 GB/s bandwidth, and leverages the host DRAM to store its scheduling metadata (Section 6.5). Similar to GRAINS's full implementation, GRN-Ext performs input query processing on the host (Section 6.4), but instead of relying on its ISP/IFP logic units to query the graph (Section 6.5), it uses the same lightweight accelerator logic units outside the SSD; (v) GRAINS's full implementation, including ISP and IFP (GRN). All these tools achieve the same accuracy since their underlying graphs are lossless encodings of the database's k-mer sets [232–236]. For the alignment-based mapping, we integrate all tools with SeGraM, a state-of-the-art sequence-to-graph alignment accelerator [388].
Datasets. We build graphs as described in Section 6.1. The graph (with colors) is 659 GB for FG, GRN, and IdealAccMem, and 822 GB for MG. We evaluate query read sets with 10M (QL), 1M (QM), and 100K (QS) reads. Note that smaller queries are also critical, as detailed in Section 6.1.
6.10 Evaluation
6.10.1 Performance
K-mer Set Lookup. Figure 6.10 shows the speedups of different systems over FG for k-mer set lookups. We make three key observations. First, GRAINS provides significant speedups. In systems with SSD-M (SSD-H), GRN provides ( ) and ( ) average speedups over FG and MG, respectively. Second, by making the execution/data flow more storage-friendly, GRAINS's implementation outside the SSD also provides large benefits. GRN-Ext provides to and average speedup over FG and MG, respectively, across all inputs and SSDs. Third, GRAINS's full implementation provides significantly larger benefits over GRAINS's implementation outside SSD. GRN provides average speedup over GRN-Ext. While GRN-Ext exploits locality across queries by merging requests to the same regions of each graph structure and improving access patterns, the locality it captures cannot amortize the cost of transferring the large volume of low-reuse data across the storage-to-host interface. Thus, GRAINS's full

Figure 6.10: Speedups with different input query sets and SSDs.
implementation provides additional, significant benefits by alleviating the large I/O overheads through its SCC design.
Impact on Cost Efficiency. GRAINS improves system cost-efficiency since it analyzes large amounts of data in the SSD and does not rely on either large host DRAM or high host-SSD interface bandwidth. We show this by evaluating two systems: a cost-optimized system () with 64-GB host DRAM and SSD-M, and a costlier, performance-optimized system ($$) with 1.5-TB host DRAM and SSD-H. Figure 6.11 compares GRAINS on the cost-optimized system with the baselines on both systems (with a representative query set, QM). To fairly evaluate the baselines when host DRAM is smaller than the graph, we reduce I/O overheads as much as possible in software for this scenario. To this end, we partition the graph such that each subgraph fits in the host DRAM, so random accesses to the graph do not repeatedly access the SSD. We partition the graph using database entry metadata to guide partitioning choices, placing entries that likely share many k-mers into the same partition. Despite the benefits of this optimization, two sources of overhead remain: (i) the I/O overhead of transferring subgraphs, and (ii) the need to query against each subgraph. We make two observations. First, GRAINS on the cost-optimized system significantly outperforms the baselines even on the performance-optimized system. GRN() provides 4.7× and 5.2× average speedup over FG(), respectively. Second, the performance of baselines on the cost-optimized system suffers significantly. When compared on the same cost-optimized system, GRN($) provides 13.2× and 26.9× average speedup over FG and MG, respectively. We conclude that GRAINS improves both system cost-efficiency and system performance, which is critical for facilitating (i) the wide adoption of graph-based genome analysis, and (ii) analysis on low-cost, portable devices, a scenario rising in importance with the development of portable sequencing devices [1294–1297] for on-site genome analysis [246, 253, 272, 291].

Figure 6.11: Speedup of GRAINS on a low-cost system, i.e., GRN($), over baselines on low-cost and performance-optimized systems.
Execution Time Breakdown. Figure 6.12 demonstrates the execution time breakdown of FG, MG, and GRN with different SSDs for a representative input query set (QM). In FG and MG, the graph and queries need to be first loaded from the storage system to main memory and processing units to be queried. In GRN, first, the Sizes data structure of the graph is loaded
undefined