Answers.Body: <p>Even if a request (or specifically an Element save operation) doesn't make much use of a file-based cache, it <em>will</em> likely compile and read templates from the <code>storage</code> directory. Logs will also be written here, which depending on the level set in <code>app.php</code> could be a major contributing factor.</p>
  <p>This location should almost always be a local filesystem (and considered disposable or at least node-agnostic), as it's intended to be available for instant access. Putting it on the other end of a network roundtrip could make an operation that is expected to take a few microseconds (i.e. “random read” disk speed—or even nanoseconds when using modern Unix’s <code>ramfs</code> optimizations) to multiple milliseconds. That compounds really quickly, if you have a few thousand reads.</p>
  <p>I'm not sure why the load here would spike, though, unless this long-lasting save request is tying up threads in your web process and queueing incoming connections? My hunch would be that load would stay low, as most of the time it's just hanging around waiting for the volume to respond…</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-10-08T15:25:31.550Z
Answers.Text: I've moved the storage directory to the same droplet (app server) that Craft is running on but I'm still experiencing slow saves on some entries. So the issue isn't _entirely_ related to using a Volume for storage. Possibly it's just an inefficiency in Craft when dealing with complex entry types...
Answers.UserDisplayName: weotch
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-10-08T15:50:54.060Z
Answers.Text: If it's still taking multiple minutes (really, more than a few seconds) to save anything in the control panel, it's definitely worth enabling the Yii Debug toolbar in your User's settings/preferences pane. This will contain *loads* of information for you to hone in on what tasks are eating up the most time, as part of each request. Once it's enabled, try saving the Entry again and navigate to the request (should be labeled `actions/entries/save-entry`, or something similar).
Answers.UserDisplayName: August Miller
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-10-05T18:10:53.760Z
Answers.LastActivityDate: 2021-10-05T18:10:53.760Z
Answers.UserDisplayName: August Miller
Body: <p>We use the Craft CMS headlessly.  We have a deployment with 5 sites and an entry type with a very complicated Matrix field.  We are using a Digital Ocean Volume (like AWS EBS) for the Craft storage directory.</p>
  <p>Saving entries can <em>sometimes</em> take many minutes.  I've looked at Digital Ocean performance charts (Insights) and we're not hitting the ceiling on the app nor database servers.</p>
  <p><a href="https://i.sstatic.net/UGbrO.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/UGbrO.png" alt="enter image description here" /></a>
  <a href="https://i.sstatic.net/qm1Vr.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/qm1Vr.png" alt="enter image description here" /></a></p>
  <p>Is the Volume a likely suspect for investigating save performance.  Is there are a lot of disk usage as part of an entry Save?  I would have thought this would only be an expensive task for the database.</p>
  
Tags: <performance><saveentry><digitalocean>
Title: Will having the Craft storage directory (CRAFT_STORAGE_PATH) on a Digital Ocean Volume (like AWS EBS) dramatically affect CMS save performance?
ThreadText: # Will having the Craft storage directory (CRAFT_STORAGE_PATH) on a Digital Ocean Volume (like AWS EBS) dramatically affect CMS save performance?
  
  (Asked by: username_0 on 2021-10-05)
  
  We use the Craft CMS headlessly. We have a deployment with 5 sites and an entry type with a very complicated Matrix field. We are using a Digital Ocean Volume (like AWS EBS) for the Craft storage directory.
  
  Saving entries can *sometimes* take many minutes. I've looked at Digital Ocean performance charts (Insights) and we're not hitting the ceiling on the app nor database servers.
  
  [![enter image description here](https://i.sstatic.net/UGbrO.png)](https://i.sstatic.net/UGbrO.png)
  [![enter image description here](https://i.sstatic.net/qm1Vr.png)](https://i.sstatic.net/qm1Vr.png)
  
  Is the Volume a likely suspect for investigating save performance. Is there are a lot of disk usage as part of an entry Save? I would have thought this would only be an expensive task for the database.
  
  **Tags:** performance, saveentry, digitalocean
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2021-10-05. Score: 3 | Accepted answer
  
  Even if a request (or specifically an Element save operation) doesn't make much use of a file-based cache, it *will* likely compile and read templates from the `storage` directory. Logs will also be written here, which depending on the level set in `app.php` could be a major contributing factor.
  
  This location should almost always be a local filesystem (and considered disposable or at least node-agnostic), as it's intended to be available for instant access. Putting it on the other end of a network roundtrip could make an operation that is expected to take a few microseconds (i.e. “random read” disk speed—or even nanoseconds when using modern Unix’s `ramfs` optimizations) to multiple milliseconds. That compounds really quickly, if you have a few thousand reads.
  
  I'm not sure why the load here would spike, though, unless this long-lasting save request is tying up threads in your web process and queueing incoming connections? My hunch would be that load would stay low, as most of the time it's just hanging around waiting for the volume to respond…
  
  > **Comments:**
  > **username_0**: I've moved the storage directory to the same droplet (app server) that Craft is running on but I'm still experiencing slow saves on some entries. So the issue isn't _entirely_ related to using a Volume for storage. Possibly it's just an inefficiency in Craft when dealing with complex entry types...  
  > **username_1**: If it's still taking multiple minutes (really, more than a few seconds) to save anything in the control panel, it's definitely worth enabling the Yii Debug toolbar in your User's settings/preferences pane. This will contain *loads* of information for you to hone in on what tasks are eating up the most time, as part of each request. Once it's enabled, try saving the Entry again and navigate to the request (should be labeled `actions/entries/save-entry`, or something similar).  
  
  ---
  
  