All Products
Search
Document Center

Function Compute:How can I process large files generated by my program or use a large amount of disk space?

Last Updated:Aug 20, 2025

If you need to process large files in memory, consider the following options:

  • Ensure that your instance has enough memory. Flexible instances can each have up to 3 GB of memory. For functions that require a larger memory size, use performance instances.

  • Process data in streaming mode to reduce memory consumption. For example, assume that a function normally consumes 1 GB of memory and has a duration of 3 minutes. If you use stream processing, the function only consumes 256 MB of memory and the duration is reduced to 10 seconds.

If you need to temporarily store files on a disk, consider the following options:

  • By default, each function has 512 MB of temporary storage in the /tmp directory.

  • You can mount an File Storage NAS (NAS) file system for Function Compute. For more information, see Configure NAS. Files are then stored on the NAS file system, and the mounted NAS file system offers the same user experience as a local disk.