# Performance impact of setting 'namespace' in Elastic agent policy config

**URL:** <https://discuss.elastic.co/t/performance-impact-of-setting-namespace-in-elastic-agent-policy-config/341294>\
**Category:** Elastic Agent\
**Tags:** fleet\
**Created:** [August 21, 2023, 7:11pm UTC](https://discuss.elastic.co/t/performance-impact-of-setting-namespace-in-elastic-agent-policy-config/341294 "2023-08-21T19:11:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Craig\_Rodrigues](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/craig_rodrigues/32/121875_2.png) [@Craig\_Rodrigues](https://discuss.elastic.co/u/Craig_Rodrigues)\
**Post date:** [August 21, 2023, 7:11pm UTC](https://discuss.elastic.co/t/performance-impact-of-setting-namespace-in-elastic-agent-policy-config/341294/1 "2023-08-21T19:11:40Z")

</div>

I have about 2000 Elastic agents (version 8.9.0) connected to a system with 3 Fleet servers (version 8.9.0).

We have about 20 different agent policies, because the various Elastic agents are sending  
slightly different logs, and for certain cases we need to specify specific pipelines to process the logs.

In the Fleet UI for configuring an Elastic Agent policy,  
the namespace is initially set to `default` .

On this page: [Data streams | Fleet and Elastic Agent Guide [8.9] | Elastic](https://www.elastic.co/guide/en/fleet/current/data-streams.html#data-streams-naming-scheme)

It mentions that the default naming scheme is:

```auto
<type>-<dataset>-<namespace>

```

If I have 20 different agent policies over 2000 elastic agents, do you recommend that from a performance perspective,  
I configure 20 different namespaces, 1 unique namespace for each agent policy?

In the past, we left everything as namespace `default`, and this did not seem to be ideal from a performance perspective.

---

<div class="post-metadata">

**Author:** ![Craig\_Rodrigues](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/craig_rodrigues/32/121875_2.png) [@Craig\_Rodrigues](https://discuss.elastic.co/u/Craig_Rodrigues)\
**Post date:** [August 21, 2023, 11:34pm UTC](https://discuss.elastic.co/t/performance-impact-of-setting-namespace-in-elastic-agent-policy-config/341294/2 "2023-08-21T23:34:03Z")

</div>

See related question here: [How to specify ILM policies in Elastic agent policy config?](https://discuss.elastic.co/t/how-to-specify-ilm-policies-in-elastic-agent-policy-config/341296)

---

<div class="post-metadata">

**Author:** ![Craig\_Rodrigues](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/craig_rodrigues/32/121875_2.png) [@Craig\_Rodrigues](https://discuss.elastic.co/u/Craig_Rodrigues)\
**Post date:** [August 28, 2023, 5:14pm UTC](https://discuss.elastic.co/t/performance-impact-of-setting-namespace-in-elastic-agent-policy-config/341294/3 "2023-08-28T17:14:22Z")

</div>

I did some research and consulted with Elastic and learned the following, which I believe  
addresses my questions:

Specifying different namespaces in the agent policy  
offers performance and organizational benefits.

1. Data writes will be distributed across multiple namespaces  
instead of having all agents write to a single default  
namespace 'default'.  
This can reduce contention and potential bottlenecks of  
using a single namespace, which can lead to improved performance.

2. Using separate namespaces allows for more fine-grained  
acess control and organization. This allows tailoring  
the permissions for specific policy requirements, which  
can enhance security and data governance.  
The trade-off of more namespaces is that each namespace  
introduces some overhead, such as resource consumption for  
management and administration.

Another approach to improving performance with thousands  
of elastic agents is adjusting the number of shards within the index

1. Increasing the shards in the index can improve performance by distributing the data  
more evenly across the index. Shard management introduces its  
own set of complexities such as increased resource usage and more  
complex indexing strategies.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [September 25, 2023, 5:15pm UTC](https://discuss.elastic.co/t/performance-impact-of-setting-namespace-in-elastic-agent-policy-config/341294/4 "2023-09-25T17:15:06Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
