# Memory config with search-enabled

**URL:** <https://community.stardog.com/t/memory-config-with-search-enabled/669>\
**Category:** Support\
**Created:** [November 2, 2017, 11:27pm UTC](https://community.stardog.com/t/memory-config-with-search-enabled/669 "2017-11-02T23:27:48Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![pierluigi](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/pierluigi/32/472_2.png) [@pierluigi](https://community.stardog.com/u/pierluigi)\
**Post date:** [November 2, 2017, 11:27pm UTC](https://community.stardog.com/t/memory-config-with-search-enabled/669/1 "2017-11-02T23:27:48Z")

</div>

We have loaded an abridged version of YAGO in a db with text search enabled. Version=5.0.5, enterprise. Are there recommended changes to the JVM and direct memory params when search is enabled? The db contains slightly less than 200M triples. It’s on a 8/52 VM.

---

<div class="post-metadata">

**Author:** ![zachary.whitley](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/zachary.whitley/32/94_2.png) [@zachary.whitley](https://community.stardog.com/u/zachary.whitley)\
**Post date:** [November 3, 2017, 12:32pm UTC](https://community.stardog.com/t/memory-config-with-search-enabled/669/2 "2017-11-03T12:32:25Z")

</div>

General Stardog memory configurations can be found in the docs at [Home | Stardog Documentation Latest](https://www.stardog.com/docs/#_memory_usage)

The only suggestion I'd make regarding search would be try to avoid allocating all the memory as Lucene uses memory mapped files that will be cached by the OS if there is memory available. There are a lot of things competing for memory resources so you should either turn down your swappiness setting or turn swap off. (I'm assuming you're using Linux here)

I'm not sure what you mean by an 8/52 VM.

---

<div class="post-metadata">

**Author:** ![pierluigi](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/pierluigi/32/472_2.png) [@pierluigi](https://community.stardog.com/u/pierluigi)\
**Post date:** [November 3, 2017, 5:54pm UTC](https://community.stardog.com/t/memory-config-with-search-enabled/669/3 "2017-11-03T17:54:36Z")

</div>

Thanks, this is helpful. Apologies: I meant the host is a 8 cores/52 GB RAM virtual machine (google cloud service; and yes, ubuntu/linux).

One more thing: I have the stardog executables and STARDOG\_HOME (data and tmp directory) on 2 separate disks (i.e. 2 partitions, mounted from different local drives). Anything against that, either for Stardog or Lucene performance?

---

<div class="post-metadata">

**Author:** ![zachary.whitley](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/zachary.whitley/32/94_2.png) [@zachary.whitley](https://community.stardog.com/u/zachary.whitley)\
**Post date:** [November 3, 2017, 6:41pm UTC](https://community.stardog.com/t/memory-config-with-search-enabled/669/4 "2017-11-03T18:41:04Z")

</div>

I can't see anything wrong with separate partitions for STARDOG\_HOME and tmp and possibly some performance advantages to having them separate although I'm not sure how much you should expect there. The biggest thing to avoid is to make sure you don't run out of space on tmp.

There might be a new configuration with 5.0.5 that might help with Lucene. Keep an eye on [Lucene mmap usage config](https://community.stardog.com/t/lucene-mmap-usage-config/671/1) for the response.

---

<div class="post-metadata">

**Author:** ![pedro](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/pedro/32/108_2.png) [@pedro](https://community.stardog.com/u/pedro)\
**Post date:** [November 3, 2017, 7:32pm UTC](https://community.stardog.com/t/memory-config-with-search-enabled/669/5 "2017-11-03T19:32:31Z")

</div>

+1 on Zach’s recommendation: leave enough memory for the operating system to manage, it will help with memory mapped files used by the search index

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex030/uploads/stardog/original/2X/e/ed66b48a616f505106a4acde3c9cee7e6da9bc67.svg) [@system](https://community.stardog.com/u/system)\
**Post date:** [November 17, 2017, 7:32pm UTC](https://community.stardog.com/t/memory-config-with-search-enabled/669/6 "2017-11-17T19:32:45Z")

</div>

Closed on November 17, 2017, 7:32pm UTC

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