POST大原始数据时,PHP是否正在将磁盘写入磁盘? [英] Is PHP writing to the disk when you POST big raw data?

查看:71
本文介绍了POST大原始数据时,PHP是否正在将磁盘写入磁盘?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我注意到当我发布原始数据(〜100KB)时,php-fpm正在向磁盘写一些东西.该应用程序为空白:

I have noticed that php-fpm is writing something to the disk when I post raw data (~100KB). The application is blank:

<?php exit; ?>

PHP如何处理帖子数据?是保存在内存中还是写入磁盘?

How PHP handles post data? Is it kept in memory or it writes to the disk?

推荐答案

答案是肯定的. PHP将数据写入POST请求的upload_tmp_dir中.

Turns out the answer is YES. PHP writes data into upload_tmp_dir for POST requests.

要避免PHP将数据写入磁盘,可以使用ram驱动器(在FreeBSD上为tmpfs).

To avoid PHP writing to the disk you can use ram drive (tmpfs on FreeBSD).

这篇关于POST大原始数据时,PHP是否正在将磁盘写入磁盘?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆