aio_write 只支持 thread,所以应该不会看到 io_submit 之类的函数。GDB 断点跟一下
ngx_http_upstream_thread_event_handler 这个函数?
在 2018年3月22日 下午3:45,ch Zee <zche...@gmail.com> 写道:
> 最新进展:
>
> 利用strace跟踪大文件传输测试:(节选了部分输出日志)
> epoll_wait(7, [{EPOLLIN, {u32=8153920, u64=8153920}}], 512, 59848) = 1
> readv(10, [{"is\nMy name is"..., 4096}, {"\nMy name is\n"..., 4096}], 2) =
> 8192
> futex(0x2452a74, FUTEX_WAKE_OP_PRIVATE, 1, 1, 0x2452a70, {FUTEX_OP_SET, 0,
> FUTEX_OP_CMP_GT, 1}) = 1
> futex(0x2452a30, FUTEX_WAKE_PRIVATE, 1) = 1
>
> writev(3, [{" name is\nMy name is z"..., 4096}, {"e is\nMy name is"...,
> 4096}, {"\nMy name is"..., 4096}, {"\nMy name is\nMy"..., 4096}, {"eng\nMy
> name is\nMy nam"..., 4096}, {"My name is\nMy name is"..., 3762}], 6) = 24242
>
>
> 请求的文件为txt格式,内容为“My name is”
>
> 在日志文件中,并没有看到io_submit等函数调用。因此,是不是可以判定没有用到aio_write,大家有没有什么办法来进行aio_write测试?
> 急求
>
>
> 在 2018年3月22日星期四 UTC+8上午9:56:28,ch Zee写道:
>>
>> 搭了一个简单的POC模型:
>>
>> 后端upstream:
>> worker_processes 8;
>>
>>
>> events {
>> accept_mutex off;
>> }
>>
>> http {
>>
>> access_log off;
>>
>> server {
>> listen 8001;
>>
>> location /images {
>> root /home/zhangcheng/Documents/;
>> }
>> }
>> }
>>
>> 前端Nginx :
>> worker_processes 8;
>>
>>
>> events {
>> accept_mutex off;
>> }
>>
>> http {
>>
>> access_log off;
>>
>> upstream backend {
>> # server ;
>> server 10.240.200.56:8001;
>> }
>>
>> server {
>> listen 8000;
>>
>> location ~ /(.*) {
>> sendfile on;
>> sendfile_max_chunk 256k;
>> aio threads;
>> directio 256k;
>> proxy_pass http://backend/images/$1;
>> }
>> }
>> }
>>
>> 持续请求后端服务器大文件时,本地工作目录下应该有缓存,可是目前还没有看到,请问我的配置有问题吗?
>>
>> 在 2018年3月20日星期二 UTC+8下午4:15:11,ch Zee写道:
>>>
>>> 在Upstream访问后端服务器的时候,如果开启aio_write,在向后端请求大文件时,aio_write是否有效?
>
> --
>