# Node Disk Space

## Node Disk Space Definition

Node disk space is the total available storage capacity on a computer node within a network or a distributed computing system. Typically measured in gigabytes (GB) or terabytes (TB), the node disk space holds data, files, and the operating system.

Maintaining healthy capacity is essential for the proper functioning of the node across computing environments.

## What is Node Disk Space

Node available disk space is the amount of available storage capacity on the disk or storage device of a computer node within a network or computing system. It is important for several reasons:

- **Data storage.** Disk space serves as primary storage for the node and allows it to function.
- **Operating system and software.** The operating system and software applications installed on a node require sufficient node disk space to be updated and run effectively.
- **Temporary storage.** Nodes often use disk space for temporary storage of data during crucial tasks like caching, buffering, and handling intermediate results.
- **Swap space.** In systems with virtual memory, node disk space may be used as swap space to temporarily store data that exceeds the system’s physical RAM.
- **Logging.** Sufficient node disk space is necessary for storing system logs, application logs, and other diagnostic information from logging activities, troubleshooting, and system performance monitoring.
- **Scalability and performance.** Adequate node disk space allows for system scalability, accommodating growth of both data and applications over time. Insufficient disk space can cause performance issues and system failures.
- **Backup and recovery.** Node disk space is essential for conducting regular backups of critical data, and storing copies to facilitate recovery in the event of data loss or system failures.

## Which Apps Demand More Node Free Disk Space?

Several applications and verticals often demand more free disk space on nodes due to the nature of their operations and the volume of data they handle. Here are some examples:

- **Data analytics and big data processing.** Analytics platforms and tools like Apache Hadoop or Spark process large datasets and require significant disk space for storage and temporary data. Industries such as finance, healthcare, and e-commerce often use these tools.
- **Media and entertainment.** Video editing software, 3D rendering tools, and multimedia processing applications generate and manipulate large files, demanding ample node disk space.
- **Blockchain and cryptocurrency.** Bitcoin, Ethereum, and other financial platforms based on blockchain demand significant free disk space.
- **Scientific research.** Simulation software, scientific modeling tools, and research applications generate and store large datasets for analysis.
- **Database management systems.** Database servers in sectors with heavy demand for storing data files, logs, and indexes in large databases such as finance, logistics, and telecommunications require substantial disk space.
- **Virtualization and cloud computing.** Virtualization platforms and cloud computing environments use disk space for storing virtual machine images, snapshots, and related files.
- **Machine learning and AI.** Training machine learning models demands large datasets and significant disk space.
- **Software development.** Integrated development environments, version control systems, and build tools that are important to software development companies and IT departments with extensive codebases all demand node disk space to generate and store code, libraries, and build artifacts.

## What is Node Disk Pressure?

Node disk pressure is the level of stress or strain on available node disk resources within a network or computing system. It measures how close a node is to reaching its maximum capacity or experiencing limited storage resources.

Node disk pressure is influenced by the amount of free node disk space, the rate of data growth, and the efficiency of disk space utilization. Specifically:

Node disk pressure is inversely related to the amount of free node disk space. As free disk space decreases, disk pressure is likely to increase, straining storage resources.

Data growth rate—or how fast data is generated and stored on the node—directly impacts disk pressure. Rapid data growth without a corresponding increase in node disk space can increase pressure on available resources.

High disk pressure can hurt performance, slowing read and write operations, increasing latency, and causing system instability. Monitoring node disk pressure is essential for maintaining system health, apportioning additional disk space, determining how to optimize to accommodate data growth, and capacity planning.

## How to Reduce Node Disk Pressure

There are several best practices for optimizing disk space utilization, managing data growth, and ensuring efficient storage operations that all support the goal of reducing node disk pressure:

- **Continuous node disk space monitoring.** This helps track usage trends, identify potential issues early, and plan for capacity expansion.
- **Implement disk quotas.** Disk quotas for users or applications limit the amount of space they can consume.
- **Increase storage.** Add nodes, increase the size of existing nodes, increase the disk size only, or offload to external storage such as network attached storage (NAS).
- **Data compression and deduplication.** These techniques help reduce redundant or repetitive stored data effectively.
- **Archiving and purging.** Establish data retention policies and regularly archive or purge outdated, unused, or unneeded data.
- **Optimize database operations.** Optimize queries and perform regular maintenance tasks such as index optimization and routine database cleanup.
- **Implement tiered storage.** Use high-performance storage for frequently accessed and critical data, and lower-cost, slower storage for less critical data.
- **Monitor and tune file systems regularly.** Adjust file system parameters based on the workload characteristics.
- **Configure and implement proper logging strategies.** Set log rotation policies and archive logs to prevent them from consuming excessive disk space.
- **Regularly update and patch software.** This includes the operating system and applications, and may include disk space optimizations.

## How to See Node Disk Usage in Kubernetes

In Kubernetes, check node disk space to ensure that each controller and operator has sufficient dedicated disk space to maintain normal system operation. There are many ways to check and monitor Kubernetes node disk space.

Node disk and Kubelet metrics can help identify performance and health issues in the cluster and individual nodes, respectively. Monitoring node disk space ensures efficient resource management, fewer outages and less downtime, optimized storage configurations, and improved overall cluster performance.

Consider the example of JavaScript (JS), a commonly-used containerized application that runs on Kubernetes.

### How much disk space does node JS use?

The node JS disk space of each installation depends on the version of Node.js, the installed packages, the platform on which it is running, and other factors:

- **Node.js installation.** The core Node.js installation requires a relatively small amount of disk space—typically around 50 MB to 200 MB.
- **npm and node modules.** Disk space used by npm and installed node modules can significantly contribute to overall space consumption.
- **Global npm packages.** Installed global npm packages contribute to overall disk space usage.
- **Logs and cache.** Logs and caches generated during installation can consume additional node disk space, but they are small relative to the size of dependencies.
- **Version managers.** These may create additional directories for managing multiple Node.js versions.
- **Operating system.** The operating system can also influence how much disk space Node.js uses.

## Does ScyllaDB Offer Solutions for Optimizing Node Disk Space?

Yes. ScyllaDB, a [NoSQL database](/content/learn/nosql/index.html) that is API-compatible with [Apache Cassandra](/content/learn/apache-cassandra/introduction-to-apache-cassandra/index.html) and DynamoDB, offers strategies and tools for managing node disk space.
