-
Describe the bug | 问题描述vercel 默认分配1G内存 ,但感觉waline 占有1G内存应该绰绰有余,应该可以分配更少的内存 小内存分配可以减少vercel 的 Functions-Execution 时间。 https://vercel.com/dashboard/usage#Serverless%20Functions-Execution 官方文档 如下 https://vercel.com/docs/projects/project-configuration#functions-property-with-serverless-functions
怎么样修改来减少waline 在vercel 的占有内存? https://github.com/walinejs/waline/blob/main/example/index.js Website URL | 问题网站waline.17lai.site Where your waline deploy? | 服务部署在哪里?Vercel (Default) Where your comment data store? | 数据存储在哪里?LeanCloud(https://leancloud.app) Describe the bug | Problem descriptionVercel allocates 1G of memory by default, but I feel that 1G of memory for waline should be more than enough, and it should be possible to allocate less memory Small memory allocation can reduce Vercel's Functions-Execution time. https://vercel.com/dashboard/usage#Serverless%20Functions-Execution The official documentation is as follows https://vercel.com/docs/projects/project-configuration#functions-property-with-serverless-functions
How to modify to reduce the memory occupied by waline in vercel? https://github.com/walinejs/waline/blob/main/example/index.js Website URL | Problem Websitewaline.17lai.site Where your waline deploy? | Where is the service deployed?Vercel (Default) Where your comment data store? | Where is your comment data store?LeanCloud(https://leancloud.app) |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
默认分配 1G 内存并不代表 Waline 使用了 1G 内存。你可以按照 Vercel 配置的形式限制执行文件的内存,不过内存占用和执行时间并没有严格的关系 The default allocation of 1G memory does not mean that Waline uses 1G memory. You can limit the memory of the executable file in the form of Vercel configuration, but there is no strict relationship between memory usage and execution time |
Beta Was this translation helpful? Give feedback.
-
https://vercel.com/guides/what-are-gb-hrs-for-serverless-function-execution Serverless Function Execution Example Total Seconds: 3M * (1s) = 3,000,000 Seconds Total GB-Seconds: 512/1024 GB * 3,000,000 Seconds = 1,500,000 GB-Seconds Total GB-Hrs: 1,500,000 GB-Seconds / 3600 = 416.67 GB-Hrs The total Serverless Function Execution is 416.67 GB-Hrs. |
Beta Was this translation helpful? Give feedback.
默认分配 1G 内存并不代表 Waline 使用了 1G 内存。你可以按照 Vercel 配置的形式限制执行文件的内存,不过内存占用和执行时间并没有严格的关系
The default allocation of 1G memory does not mean that Waline uses 1G memory. You can limit the memory of the executable file in the form of Vercel configuration, but there is no strict relationship between memory usage and execution time