You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficserver.apache.org by GitBox <gi...@apache.org> on 2022/09/28 10:33:03 UTC

[GitHub] [trafficserver] frostnotfall opened a new issue, #9111: Confused about memory allocation

frostnotfall opened a new issue, #9111:
URL: https://github.com/apache/trafficserver/issues/9111

   I want to know about memory allocation.
   I think there are 2 parts of memory allocation, both are disk storage relevant.
   1. RAM Cache . 
   2.  Cache directory is used as a memory resident structure
   
   # RAM Cache
   There are 2 statements, but contradictory.
   1. 10MB to 1GB. https://docs.trafficserver.apache.org/en/latest/admin-guide/performance/index.en.html?highlight=ssd#memory-allocation
   2. 1MB to 1GB.  https://docs.trafficserver.apache.org/en/latest/admin-guide/storage/index.en.html#changing-the-size-of-the-ram-cache
   
   Q: what is real?
   
   # Cache directory is used as a memory resident structure
   Q: How do i calculate it?
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@trafficserver.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [trafficserver] cmcfarlen closed issue #9111: Confused about memory allocation

Posted by GitBox <gi...@apache.org>.
cmcfarlen closed issue #9111: Confused about memory allocation
URL: https://github.com/apache/trafficserver/issues/9111


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [trafficserver] frostnotfall commented on issue #9111: Confused about memory allocation

Posted by GitBox <gi...@apache.org>.
frostnotfall commented on issue #9111:
URL: https://github.com/apache/trafficserver/issues/9111#issuecomment-1261724456

   > Reading the code I see that, unless the size is specified, the ram cache for each cache volume is set to 10x the directory length of the volume (in bytes). Running an experiment, this worked out to about 1.2% of the total configured cache size. Based on this, the 10MB per 1GB is closer to correct. Since this is based on the cache size and not available RAM, I recommend you specify the ram cache size in your config rather than rely on this heuristic. I think this was just meant to be a gentle default.
   > 
   > I'm sorry but I do not understand the second part of your question.
   
   # Cache directory is used as a memory resident structure
   In my opinion, Disk cache directory has indexed in memory. As HDD space grows, so does memory usage.
   So, for example,  how many memory the indexes are used  when for 1TB hard disk.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [trafficserver] cmcfarlen commented on issue #9111: Confused about memory allocation

Posted by GitBox <gi...@apache.org>.
cmcfarlen commented on issue #9111:
URL: https://github.com/apache/trafficserver/issues/9111#issuecomment-1273464687

   If you run traffic_server with the `-Tcache_init` argument, it will print some allocation info about space used for directory vs volume size:
   
   ```
   (init)> (cache_init) Vol /opt/ats/var/trafficserver/cache.db 16384:2883584: allocating 29474816 directory bytes for a 23622320128 byte volume (0.124775%)
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [trafficserver] frostnotfall commented on issue #9111: Confused about memory allocation

Posted by GitBox <gi...@apache.org>.
frostnotfall commented on issue #9111:
URL: https://github.com/apache/trafficserver/issues/9111#issuecomment-1276991367

   Post my test.
   My settings:
   12 HDD * 3TB = 36TB, close RamCache, the mem usage is 50.16GB.
   
   (In addition, my machine has 12 HDD, every is 8TB,but I can‘t use all of them, because I just have 64GB memory)
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [trafficserver] cmcfarlen commented on issue #9111: Confused about memory allocation

Posted by GitBox <gi...@apache.org>.
cmcfarlen commented on issue #9111:
URL: https://github.com/apache/trafficserver/issues/9111#issuecomment-1261444816

   Reading the code I see that, unless the size is specified, the ram cache for each cache volume is set to 10x the directory length of the volume (in bytes).  Running an experiment, this worked out to about 1.2% of the total configured cache size.  Based on this, the 10MB per 1GB is closer to correct.  Since this is based on the cache size and not available RAM, I recommend you specify the ram cache size in your config rather than rely on this heuristic.  I think this was just meant to be a gentle default.
   
   I'm sorry but I do not understand the second part of your question.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org