---
title: "Aerospike daemon"
description: "Guide to managing the Aerospike daemon (asd): start, stop, restart, coldstart, and root/non-root configurations."
---

# Aerospike daemon

> For the complete documentation index see: [llms.txt](https://aerospike.com/docs/llms.txt)
> 
> All documentation pages available in markdown.

This page describes how to manage the Aerospike daemon (`asd`).

Depending on your Linux distribution and version you will either run Aerospike on a systemd service manager (`systemctl`) or a System V one based on init.d.

::: note
See [platform support and compatibility](https://aerospike.com/docs/database/reference/platform-support) information on supported Linux releases.
:::

## Controlling the Aerospike daemon

The Aerospike daemon (asd) can be controlled with the following commands

-   `start` - The default startup mode for asd is a [warm restart](https://aerospike.com/docs/database/manage/database/fast-start).
-   `status` - Shows statistics, storage, or latencies depending on which command you pair it with.
-   `stop` - Flushes any buffered data to namespace data storage and stops `asd`.
-   `restart` - Equivalent to running `stop` followed by `start`.
-   [`cold restart`](https://aerospike.com/docs/database/manage/database/cold-start) - Removes and rebuilds namespace indexes. Not available through `systemctl`. Done with a separate `asd-coldstart` script.

Terminal window

```bash
# Using systemd service manager

systemctl start aerospike

systemctl status aerospike

systemctl stop aerospike

systemctl restart aerospike

asd-coldstart

# Using System V init.d service manager

service aerospike start

service aerospike status

service aerospike stop

service aerospike restart

service aerospike coldstart

# or

/etc/init.d/aerospike start

/etc/init.d/aerospike status

/etc/init.d/aerospike stop

/etc/init.d/aerospike restart

/etc/init.d/aerospike coldstart
```

### Service port status

To check the status of the service port, use the [`status`](https://aerospike.com/docs/database/reference/info#status) info command, which will return `OK` when ready:

Terminal window

```bash
asinfo -v status
```

## Running as root or non-root

The Aerospike daemon can be run either as root or as a non-root user.

Like all system-wide daemons on Linux, running Aerospike as root ensures that the daemon can access or set the system resources it needs: kernel parameters, ports, file systems, attached devices, and more. `asd` must be able to modify the following kernel parameters:

```plaintext
kernel.shmall = 4294967296 # 4G pages = 16TB

kernel.shmmax = 1073741824 # 1GB

net.core.rmem_max = 15728640 # (15M)

net.core.wmem_max = 8388608 # (8M)
```

::: note
If you are on Aerospike Database version 7.0.0 or later, and have an in-memory namespace, verify that your operating system can allocate enough shared memory for [data storage](https://aerospike.com/docs/database/manage/namespace/storage/config). This would be 1/8th the `data-size` if you’re using in-memory without storage-backed persistence, or the size of either `filesize` or the `device` size if you’re using persistence.

Terminal window

```bash
sysctl -a | grep shmmax

kernel.shmmax = 2147483648

# If data-size is 64GiB, 2GiB shmmax is too small for the 8GiB stripes

sysctl -w kernel.shmmax=8589934592
```
:::
::: note
Depending on your local system settings and user privilege levels, some or all of the commands in the following instructions may need to be run with `sudo`.
:::

In addition, `asd` sets the maximum number of open files for the Aerospike process to 100,000 with the `ulimit` command. To verify that the number is set correctly, run the following command while `asd` is running:

Terminal window

```bash
cat /proc/`pgrep asd`/limits
```

-   The System V-style `/etc/init.d/aerospike` script for the Aerospike daemon must always run as root. If you are concerned about the security of giving root access to users, use `sudo` with the `service` utility to manage the daemon:
    
    Terminal window
    
    ```bash
    sudo service aerospike COMMAND
    ```
    
-   A more complex alternative is to configure Aerospike itself to run as non-root. Refer to [Configure Aerospike to run as non-root user](https://aerospike.com/docs/database/manage/database/non-root).