首页 > 其他分享 >网站性能优化

网站性能优化

时间:2023-12-15 10:13:07浏览次数:40  
标签:... ichunt 网站 性能 st mode net 优化 size

[huntadmin@iZwz9diw9y2w5pkse0cx3jZ ~]$ sudo lsof -n |grep 'redis' | wc -l
10314
[huntadmin@iZwz9diw9y2w5pkse0cx3jZ ~]$ sudo lsof -n |grep 'php-fpm' | wc -l
60074

 

#top  然后输入1

$ sudo strace -p 21113

追踪进程执行的文件

lstat("/data/wwwroot/waf.ichunt.net/vendor/composer/../predis/predis/src/Command", {st_mode=S_IFDIR|0755, st_size=12288, ...}) = 0
lstat("/data/wwwroot/waf.ichunt.net/vendor/composer/../predis/predis/src", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/data/wwwroot/waf.ichunt.net/vendor/composer/../predis/predis", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/data/wwwroot/waf.ichunt.net/vendor/composer/../predis", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/data/wwwroot/waf.ichunt.net/vendor/composer", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/data/wwwroot/waf.ichunt.net/vendor", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/data/wwwroot/waf.ichunt.net", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/data/wwwroot", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/data", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open("/data/wwwroot/waf.ichunt.net/vendor/predis/predis/src/Command/SetMembers.php", O_RDONLY) = 17
fstat(17, {st_mode=S_IFREG|0644, st_size=516, ...}) = 0
fstat(17, {st_mode=S_IFREG|0644, st_size=516, ...}) = 0
fstat(17, {st_mode=S_IFREG|0644, st_size=516, ...}) = 0
mmap(NULL, 516, PROT_READ, MAP_SHARED, 17, 0) = 0x7fc0e2ad8000
fcntl(17, F_GETFL)                      = 0x8000 (flags O_RDONLY|O_LARGEFILE)
fstat(17, {st_mode=S_IFREG|0644, st_size=516, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fc0e2ad7000
lseek(17, 0, SEEK_CUR)                  = 0
lseek(17, 0, SEEK_SET)                  = 0
read(17, "<?php\n\n/*\n * This file is part o"..., 4096) = 516
lseek(17, 516, SEEK_SET)                = 516
munmap(0x7fc0e2ad8000, 516)             = 0
lseek(17, -516, SEEK_CUR)               = 0
close(17)                               = 0
munmap(0x7fc0e2ad7000, 4096)            = 0
lstat("/data/wwwroot/waf.ichunt.net/vendor/composer/../predis/predis/src/Command/Command.php", {st_mode=S_IFREG|0644, st_size=2595, ...}) = 0
lstat("/data/wwwroot/waf.ichunt.net/vendor/composer/../predis/predis/src/Command", {st_mode=S_IFDIR|0755, st_size=12288, ...}) = 0
lstat("/data/wwwroot/waf.ichunt.net/vendor/composer/../predis/predis/src", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/data/wwwroot/waf.ichunt.net/vendor/composer/../predis/predis", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/data/wwwroot/waf.ichunt.net/vendor/composer/../predis", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/data/wwwroot/waf.ichunt.net/vendor/composer", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/data/wwwroot/waf.ichunt.net/vendor", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/data/wwwroot/waf.ichunt.net", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/data/wwwroot", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/data", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open("/data/wwwroot/waf.ichunt.net/vendor/predis/predis/src/Command/Command.php", O_RDONLY) = 17
fstat(17, {st_mode=S_IFREG|0644, st_size=2595, ...}) = 0
fstat(17, {st_mode=S_IFREG|0644, st_size=2595, ...}) = 0
fstat(17, {st_mode=S_IFREG|0644, st_size=2595, ...}) = 0
mmap(NULL, 2595, PROT_READ, MAP_SHARED, 17, 0) = 0x7fc0e2ad8000
fcntl(17, F_GETFL)                      = 0x8000 (flags O_RDONLY|O_LARGEFILE)
fstat(17, {st_mode=S_IFREG|0644, st_size=2595, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fc0e2ad7000
lseek(17, 0, SEEK_CUR)                  = 0
lseek(17, 0, SEEK_SET)                  = 0
read(17, "<?php\n\n/*\n * This file is part o"..., 4096) = 2595
lseek(17, 2595, SEEK_SET)               = 2595
munmap(0x7fc0e2ad8000, 2595)            = 0
lseek(17, -2595, SEEK_CUR)              = 0
close(17)                               = 0
munmap(0x7fc0e2ad7000, 4096)            = 0
gettimeofday({1702605733, 724233}, NULL) = 0
socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 17
fcntl(17, F_GETFL)                      = 0x2 (flags O_RDWR)
fcntl(17, F_SETFL, O_RDWR|O_NONBLOCK)   = 0
connect(17, {sa_family=AF_INET, sin_port=htons(6379), sin_addr=inet_addr("172.18.137.40")}, 16) = -1 EINPROGRESS (Operation now in progress)
poll([{fd=17, events=POLLIN|POLLOUT|POLLERR|POLLHUP}], 1, 5000) = 1 ([{fd=17, revents=POLLOUT}])
getsockopt(17, SOL_SOCKET, SO_ERROR, [0], [4]) = 0
fcntl(17, F_SETFL, O_RDWR)              = 0
sendto(17, "*2\r\n$4\r\nAUTH\r\n$11\r\nicDb29mLy2s\r\n", 32, MSG_DONTWAIT, NULL, 0) = 32
poll([{fd=17, events=POLLIN|POLLERR|POLLHUP}], 1, 60000) = 1 ([{fd=17, revents=POLLIN}])
recvfrom(17, "+OK\r\n", 8192, MSG_DONTWAIT, NULL, NULL) = 5
lstat("/data/wwwroot/waf.ichunt.net/vendor/composer/../predis/predis/src/Response/Status.php", {st_mode=S_IFREG|0644, st_size=1743, ...}) = 0
lstat("/data/wwwroot/waf.ichunt.net/vendor/composer/../predis/predis/src/Response", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/data/wwwroot/waf.ichunt.net/vendor/composer/../predis/predis/src", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/data/wwwroot/waf.ichunt.net/vendor/composer/../predis/predis", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/data/wwwroot/waf.ichunt.net/vendor/composer/../predis", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/data/wwwroot/waf.ichunt.net/vendor/composer", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/data/wwwroot/waf.ichunt.net/vendor", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/data/wwwroot/waf.ichunt.net", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/data/wwwroot", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/data", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open("/data/wwwroot/waf.ichunt.net/vendor/predis/predis/src/Response/Status.php", O_RDONLY) = 18
fstat(18, {st_mode=S_IFREG|0644, st_size=1743, ...}) = 0
fstat(18, {st_mode=S_IFREG|0644, st_size=1743, ...}) = 0
fstat(18, {st_mode=S_IFREG|0644, st_size=1743, ...}) = 0
mmap(NULL, 1743, PROT_READ, MAP_SHARED, 18, 0) = 0x7fc0e2ad8000
fcntl(18, F_GETFL)                      = 0x8000 (flags O_RDONLY|O_LARGEFILE)
fstat(18, {st_mode=S_IFREG|0644, st_size=1743, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fc0e2ad7000
lseek(18, 0, SEEK_CUR)                  = 0
lseek(18, 0, SEEK_SET)                  = 0
read(18, "<?php\n\n/*\n * This file is part o"..., 4096) = 1743
lseek(18, 1743, SEEK_SET)               = 1743
munmap(0x7fc0e2ad8000, 1743)            = 0
lseek(18, -1743, SEEK_CUR)              = 0
close(18)                               = 0
munmap(0x7fc0e2ad7000, 4096)            = 0
lstat("/data/wwwroot/waf.ichunt.net/vendor/composer/../predis/predis/src/Response/ResponseInterface.php", {st_mode=S_IFREG|0644, st_size=417, ...}) = 0
lstat("/data/wwwroot/waf.ichunt.net/vendor/composer/../predis/predis/src/Response", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/data/wwwroot/waf.ichunt.net/vendor/composer/../predis/predis/src", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/data/wwwroot/waf.ichunt.net/vendor/composer/../predis/predis", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/data/wwwroot/waf.ichunt.net/vendor/composer/../predis", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/data/wwwroot/waf.ichunt.net/vendor/composer", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/data/wwwroot/waf.ichunt.net/vendor", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/data/wwwroot/waf.ichunt.net", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/data/wwwroot", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/data", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open("/data/wwwroot/waf.ichunt.net/vendor/predis/predis/src/Response/ResponseInterface.php", O_RDONLY) = 18
fstat(18, {st_mode=S_IFREG|0644, st_size=417, ...}) = 0
fstat(18, {st_mode=S_IFREG|0644, st_size=417, ...}) = 0
fstat(18, {st_mode=S_IFREG|0644, st_size=417, ...}) = 0
mmap(NULL, 417, PROT_READ, MAP_SHARED, 18, 0) = 0x7fc0e2ad8000
fcntl(18, F_GETFL)                      = 0x8000 (flags O_RDONLY|O_LARGEFILE)
fstat(18, {st_mode=S_IFREG|0644, st_size=417, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fc0e2ad7000
lseek(18, 0, SEEK_CUR)                  = 0
lseek(18, 0, SEEK_SET)                  = 0
read(18, "<?php\n\n/*\n * This file is part o"..., 4096) = 417
lseek(18, 417, SEEK_SET)                = 417
munmap(0x7fc0e2ad8000, 417)             = 0
lseek(18, -417, SEEK_CUR)               = 0
close(18)                               = 0
munmap(0x7fc0e2ad7000, 4096)            = 0
sendto(17, "*2\r\n$6\r\nSELECT\r\n$1\r\n0\r\n", 23, MSG_DONTWAIT, NULL, 0) = 23
poll([{fd=17, events=POLLIN|POLLERR|POLLHUP}], 1, 60000) = 1 ([{fd=17, revents=POLLIN}])
recvfrom(17, "+OK\r\n", 8192, MSG_DONTWAIT, NULL, NULL) = 5
sendto(17, "*2\r\n$8\r\nSMEMBERS\r\n$17\r\nspider_wh"..., 42, MSG_DONTWAIT, NULL, 0) = 42
poll([{fd=17, events=POLLIN|POLLERR|POLLHUP}], 1, 60000) = 1 ([{fd=17, revents=POLLIN}])
recvfrom(17, "*153\r\n$11\r\n120.79.24.7\r\n$14\r\n113"..., 8192, MSG_DONTWAIT, NULL, NULL) = 3114
lstat("/data/wwwroot/waf.ichunt.net/vendor/composer/../predis/predis/src/Command/StringSet.php", {st_mode=S_IFREG|0644, st_size=505, ...}) = 0
lstat("/data/wwwroot/waf.ichunt.net/vendor/composer/../predis/predis/src/Command", {st_mode=S_IFDIR|0755, st_size=12288, ...}) = 0
lstat("/data/wwwroot/waf.ichunt.net/vendor/composer/../predis/predis/src", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/data/wwwroot/waf.ichunt.net/vendor/composer/../predis/predis", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/data/wwwroot/waf.ichunt.net/vendor/composer/../predis", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/data/wwwroot/waf.ichunt.net/vendor/composer", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/data/wwwroot/waf.ichunt.net/vendor", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/data/wwwroot/waf.ichunt.net", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/data/wwwroot", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/data", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open("/data/wwwroot/waf.ichunt.net/vendor/predis/predis/src/Command/StringSet.php", O_RDONLY) = 18
fstat(18, {st_mode=S_IFREG|0644, st_size=505, ...}) = 0
fstat(18, {st_mode=S_IFREG|0644, st_size=505, ...}) = 0
fstat(18, {st_mode=S_IFREG|0644, st_size=505, ...}) = 0
mmap(NULL, 505, PROT_READ, MAP_SHARED, 18, 0) = 0x7fc0e2ad8000
fcntl(18, F_GETFL)                      = 0x8000 (flags O_RDONLY|O_LARGEFILE)
fstat(18, {st_mode=S_IFREG|0644, st_size=505, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fc0e2ad7000
lseek(18, 0, SEEK_CUR)                  = 0
lseek(18, 0, SEEK_SET)                  = 0
read(18, "<?php\n\n/*\n * This file is part o"..., 4096) = 505
lseek(18, 505, SEEK_SET)                = 505
munmap(0x7fc0e2ad8000, 505)             = 0
lseek(18, -505, SEEK_CUR)               = 0
close(18)                               = 0
munmap(0x7fc0e2ad7000, 4096)            = 0
brk(0x3415000)                          = 0x3415000
sendto(17, "*3\r\n$3\r\nSET\r\n$34\r\nspider_warning"..., 8192, MSG_DONTWAIT, NULL, 0) = 8192
sendto(17, "4zNDk3LjEwMCBTYWZhcmkvNTM3LjM2Ii"..., 8192, MSG_DONTWAIT, NULL, 0) = 8192
sendto(17, "hLSFRNTCwgbGlrZSBHZWNrbykgQ2hyb2"..., 8192, MSG_DONTWAIT, NULL, 0) = 8192
sendto(17, "dpbjY0OyB4NjQpIEFwcGxlV2ViS2l0Lz"..., 8192, MSG_DONTWAIT, NULL, 0) = 8192
sendto(17, "oiTW96aWxsYS81LjAgKFdpbmRvd3MgTl"..., 8192, MSG_DONTWAIT, NULL, 0) = 6288
sendto(17, "5UIDYuMTsgV2luNjQ7IHg2NCkgQXBwbG"..., 8192, MSG_DONTWAIT, NULL, 0) = 8192
sendto(17, "AwIiwiVWEiOiJNb3ppbGxhLzUuMCAoV2"..., 8192, MSG_DONTWAIT, NULL, 0) = 8192
sendto(17, "A2OjUxOjE3IiwiSXAiOiI1OC4yNDYuMT"..., 8192, MSG_DONTWAIT, NULL, 0) = 8192
sendto(17, "IyMzk2fSx7Ik5vd1RpbWUiOiIxNS9EZW"..., 8192, MSG_DONTWAIT, NULL, 0) = 8192
sendto(17, "h0bWwiLCJVbml4IjoxNzAyNjMwMjg0LC"..., 8192, MSG_DONTWAIT, NULL, 0) = 8192
sendto(17, "NhZmFyaS81MzcuMzYiLCJVcmwiOiIvbm"..., 424, MSG_DONTWAIT, NULL, 0) = 424
poll([{fd=17, events=POLLIN|POLLERR|POLLHUP}], 1, 60000) = 1 ([{fd=17, revents=POLLIN}])
recvfrom(17, "+OK\r\n", 8192, MSG_DONTWAIT, NULL, NULL) = 5
lstat("/data/wwwroot/waf.ichunt.net/vendor/composer/../predis/predis/src/Command/KeyExpire.php", {st_mode=S_IFREG|0644, st_size=511, ...}) = 0
lstat("/data/wwwroot/waf.ichunt.net/vendor/composer/../predis/predis/src/Command", {st_mode=S_IFDIR|0755, st_size=12288, ...}) = 0
lstat("/data/wwwroot/waf.ichunt.net/vendor/composer/../predis/predis/src", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/data/wwwroot/waf.ichunt.net/vendor/composer/../predis/predis", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/data/wwwroot/waf.ichunt.net/vendor/composer/../predis", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/data/wwwroot/waf.ichunt.net/vendor/composer", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/data/wwwroot/waf.ichunt.net/vendor", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/data/wwwroot/waf.ichunt.net", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/data/wwwroot", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/data", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open("/data/wwwroot/waf.ichunt.net/vendor/predis/predis/src/Command/KeyExpire.php", O_RDONLY) = 18
fstat(18, {st_mode=S_IFREG|0644, st_size=511, ...}) = 0
fstat(18, {st_mode=S_IFREG|0644, st_size=511, ...}) = 0
fstat(18, {st_mode=S_IFREG|0644, st_size=511, ...}) = 0
mmap(NULL, 511, PROT_READ, MAP_SHARED, 18, 0) = 0x7fc0e2ad8000
fcntl(18, F_GETFL)                      = 0x8000 (flags O_RDONLY|O_LARGEFILE)
fstat(18, {st_mode=S_IFREG|0644, st_size=511, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fc0e2ad7000
lseek(18, 0, SEEK_CUR)                  = 0
lseek(18, 0, SEEK_SET)                  = 0
read(18, "<?php\n\n/*\n * This file is part o"..., 4096) = 511
lseek(18, 511, SEEK_SET)                = 511
munmap(0x7fc0e2ad8000, 511)             = 0
lseek(18, -511, SEEK_CUR)               = 0
close(18)                               = 0
munmap(0x7fc0e2ad7000, 4096)            = 0
sendto(17, "*3\r\n$6\r\nEXPIRE\r\n$34\r\nspider_warn"..., 67, MSG_DONTWAIT, NULL, 0) = 67
poll([{fd=17, events=POLLIN|POLLERR|POLLHUP}], 1, 60000) = 1 ([{fd=17, revents=POLLIN}])
recvfrom(17, ":1\r\n", 8192, MSG_DONTWAIT, NULL, NULL) = 4
sendto(17, "*3\r\n$3\r\nSET\r\n$34\r\nspider_warning"..., 101, MSG_DONTWAIT, NULL, 0) = 101
poll([{fd=17, events=POLLIN|POLLERR|POLLHUP}], 1, 60000) = 1 ([{fd=17, revents=POLLIN}])
recvfrom(17, "+OK\r\n", 8192, MSG_DONTWAIT, NULL, NULL) = 5
sendto(17, "*3\r\n$6\r\nEXPIRE\r\n$34\r\nspider_warn"..., 67, MSG_DONTWAIT, NULL, 0) = 67
poll([{fd=17, events=POLLIN|POLLERR|POLLHUP}], 1, 60000) = 1 ([{fd=17, revents=POLLIN}])
recvfrom(17, ":1\r\n", 8192, MSG_DONTWAIT, NULL, NULL) = 4
lstat("/data/wwwroot/waf.ichunt.net/vendor/composer/../laravel/framework/src/Illuminate/Http/Response.php", {st_mode=S_IFREG|0644, st_size=2697, ...}) = 0
lstat("/data/wwwroot/waf.ichunt.net/vendor/composer/../laravel/framework/src/Illuminate/Http", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/data/wwwroot/waf.ichunt.net/vendor/composer/../laravel/framework/src/Illuminate", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/data/wwwroot/waf.ichunt.net/vendor/composer/../laravel/framework/src", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/data/wwwroot/waf.ichunt.net/vendor/composer/../laravel/framework", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/data/wwwroot/waf.ichunt.net/vendor/composer/../laravel", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/data/wwwroot/waf.ichunt.net/vendor/composer", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/data/wwwroot/waf.ichunt.net/vendor", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/data/wwwroot/waf.ichunt.net", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/data/wwwroot", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/data", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open("/data/wwwroot/waf.ichunt.net/vendor/laravel/framework/src/Illuminate/Http/Response.php", O_RDONLY) = 18
fstat(18, {st_mode=S_IFREG|0644, st_size=2697, ...}) = 0
fstat(18, {st_mode=S_IFREG|0644, st_size=2697, ...}) = 0
fstat(18, {st_mode=S_IFREG|0644, st_size=2697, ...}) = 0
mmap(NULL, 2697, PROT_READ, MAP_SHARED, 18, 0) = 0x7fc0e2ad8000
fcntl(18, F_GETFL)                      = 0x8000 (flags O_RDONLY|O_LARGEFILE)
fstat(18, {st_mode=S_IFREG|0644, st_size=2697, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fc0e2ad7000
lseek(18, 0, SEEK_CUR)                  = 0
lseek(18, 0, SEEK_SET)                  = 0
read(18, "<?php\n\nnamespace Illuminate\\Http"..., 4096) = 2697
lseek(18, 2697, SEEK_SET)               = 2697
munmap(0x7fc0e2ad8000, 2697)            = 0
lseek(18, -2697, SEEK_CUR)              = 0
close(18)                               = 0
munmap(0x7fc0e2ad7000, 4096)            = 0
lstat("/data/wwwroot/waf.ichunt.net/vendor/composer/../symfony/http-foundation/Response.php", {st_mode=S_IFREG|0644, st_size=35446, ...}) = 0
lstat("/data/wwwroot/waf.ichunt.net/vendor/composer/../symfony/http-foundation", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/data/wwwroot/waf.ichunt.net/vendor/composer/../symfony", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/data/wwwroot/waf.ichunt.net/vendor/composer", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/data/wwwroot/waf.ichunt.net/vendor", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/data/wwwroot/waf.ichunt.net", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/data/wwwroot", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/data", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open("/data/wwwroot/waf.ichunt.net/vendor/symfony/http-foundation/Response.php", O_RDONLY) = 18
fstat(18, {st_mode=S_IFREG|0644, st_size=35446, ...}) = 0
fstat(18, {st_mode=S_IFREG|0644, st_size=35446, ...}) = 0
fstat(18, {st_mode=S_IFREG|0644, st_size=35446, ...}) = 0
mmap(NULL, 35446, PROT_READ, MAP_SHARED, 18, 0) = 0x7fc0e2ad0000
fcntl(18, F_GETFL)                      = 0x8000 (flags O_RDONLY|O_LARGEFILE)
fstat(18, {st_mode=S_IFREG|0644, st_size=35446, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fc0e2acf000
lseek(18, 0, SEEK_CUR)                  = 0
lseek(18, 0, SEEK_SET)                  = 0
read(18, "<?php\n\n/*\n * This file is part o"..., 4096) = 4096
lseek(18, 4096, SEEK_SET)               = 4096
munmap(0x7fc0e2ad0000, 35446)           = 0
lseek(18, -4096, SEEK_CUR)              = 0
close(18)                               = 0
munmap(0x7fc0e2acf000, 4096)            = 0
lstat("/data/wwwroot/waf.ichunt.net/vendor/composer/../laravel/framework/src/Illuminate/Http/ResponseTrait.php", {st_mode=S_IFREG|0644, st_size=2016, ...}) = 0
lstat("/data/wwwroot/waf.ichunt.net/vendor/composer/../laravel/framework/src/Illuminate/Http", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/data/wwwroot/waf.ichunt.net/vendor/composer/../laravel/framework/src/Illuminate", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/data/wwwroot/waf.ichunt.net/vendor/composer/../laravel/framework/src", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/data/wwwroot/waf.ichunt.net/vendor/composer/../laravel/framework", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/data/wwwroot/waf.ichunt.net/vendor/composer/../laravel", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/data/wwwroot/waf.ichunt.net/vendor/composer", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/data/wwwroot/waf.ichunt.net/vendor", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/data/wwwroot/waf.ichunt.net", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/data/wwwroot", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/data", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open("/data/wwwroot/waf.ichunt.net/vendor/laravel/framework/src/Illuminate/Http/ResponseTrait.php", O_RDONLY) = 18
fstat(18, {st_mode=S_IFREG|0644, st_size=2016, ...}) = 0
fstat(18, {st_mode=S_IFREG|0644, st_size=2016, ...}) = 0
fstat(18, {st_mode=S_IFREG|0644, st_size=2016, ...}) = 0
mmap(NULL, 2016, PROT_READ, MAP_SHARED, 18, 0) = 0x7fc0e2ad8000
fcntl(18, F_GETFL)                      = 0x8000 (flags O_RDONLY|O_LARGEFILE)
fstat(18, {st_mode=S_IFREG|0644, st_size=2016, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fc0e2ad7000
lseek(18, 0, SEEK_CUR)                  = 0
lseek(18, 0, SEEK_SET)                  = 0
read(18, "<?php\n\nnamespace Illuminate\\Http"..., 4096) = 2016
lseek(18, 2016, SEEK_SET)               = 2016
munmap(0x7fc0e2ad8000, 2016)            = 0
lseek(18, -2016, SEEK_CUR)              = 0
close(18)                               = 0
munmap(0x7fc0e2ad7000, 4096)            = 0
lstat("/data/wwwroot/waf.ichunt.net/vendor/composer/../symfony/http-foundation/ResponseHeaderBag.php", {st_mode=S_IFREG|0644, st_size=8777, ...}) = 0
lstat("/data/wwwroot/waf.ichunt.net/vendor/composer/../symfony/http-foundation", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/data/wwwroot/waf.ichunt.net/vendor/composer/../symfony", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/data/wwwroot/waf.ichunt.net/vendor/composer", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/data/wwwroot/waf.ichunt.net/vendor", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/data/wwwroot/waf.ichunt.net", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/data/wwwroot", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/data", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open("/data/wwwroot/waf.ichunt.net/vendor/symfony/http-foundation/ResponseHeaderBag.php", O_RDONLY) = 18
fstat(18, {st_mode=S_IFREG|0644, st_size=8777, ...}) = 0
fstat(18, {st_mode=S_IFREG|0644, st_size=8777, ...}) = 0
fstat(18, {st_mode=S_IFREG|0644, st_size=8777, ...}) = 0
mmap(NULL, 8777, PROT_READ, MAP_SHARED, 18, 0) = 0x7fc0e2ad6000
fcntl(18, F_GETFL)                      = 0x8000 (flags O_RDONLY|O_LARGEFILE)
fstat(18, {st_mode=S_IFREG|0644, st_size=8777, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fc0e2ad5000
lseek(18, 0, SEEK_CUR)                  = 0
lseek(18, 0, SEEK_SET)                  = 0
read(18, "<?php\n\n/*\n * This file is part o"..., 4096) = 4096
lseek(18, 4096, SEEK_SET)               = 4096
munmap(0x7fc0e2ad6000, 8777)            = 0
lseek(18, -4096, SEEK_CUR)              = 0
close(18)                               = 0
munmap(0x7fc0e2ad5000, 4096)            = 0
clock_gettime(CLOCK_MONOTONIC, {180905924, 898678056}) = 0
gettimeofday({1702605733, 783981}, NULL) = 0
close(13)                               = 0
clock_gettime(CLOCK_MONOTONIC, {180905924, 898857463}) = 0
munmap(0x7fc0e2ad9000, 8192)            = 0
write(4, "\1\6\0\1\37\370\0\0tml\"\n    [\"Unix\"]=>\n    "..., 8192) = 8192
write(4, "\1\6\0\1\1L\4\00064) AppleWebKit/537.36 ("..., 360) = 360
shutdown(4, SHUT_WR)                    = 0
recvfrom(4, "\1\5\0\1\0\0\0\0", 8, 0, NULL, NULL) = 8
recvfrom(4, "", 8, 0, NULL, NULL)       = 0
close(4)                                = 0
clock_gettime(CLOCK_MONOTONIC, {180905924, 899778500}) = 0
chdir("/")                              = 0
clock_gettime(CLOCK_MONOTONIC, {180905924, 900108244}) = 0
times({tms_utime=14272, tms_stime=2106, tms_cutime=0, tms_cstime=0}) = 18517244170
close(17)                               = 0
setitimer(ITIMER_PROF, {it_interval={0, 0}, it_value={0, 0}}, NULL) = 0
sendto(14, "\1\0\0\0\1", 5, MSG_DONTWAIT, NULL, 0) = 5
close(14)                               = 0
close(10)                               = 0
unlink("/tmp/phpqJ5WPM")                = 0
setitimer(ITIMER_PROF, {it_interval={0, 0}, it_value={0, 0}}, NULL) = 0
clock_gettime(CLOCK_MONOTONIC, {180905924, 906997799}) = 0
accept(0, ^CProcess 21106 detached
View Code

 

查看php-fpm慢日志

 

 

目前出现的问题基本上都是too many open file的错误,

优化建议:

1,代码层面,减少api项目内部curl调用(继续优化ichuntapi项目内部的curl调用)

2,迁移项目到其它服务器(增加php-fpm资源)
user.ichunt.net
perm.ichunt.net
so.ichunt.com

2.1优化php-fpm参数调优

2.2根据php-fpm慢日志(上面的请求慢日志)优化代码

     

3,增加内存,服务器内存已不足

4,linux性能调优

查看当前TCP连接的状态和对应的连接数量:
[huntadmin@iZwz9diw9y2w5pkse0cx3jZ wwwroot]$  netstat -n | awk '/^tcp/ {++S[$NF]} END {for(a in S) print a, S[a]}'
TIME_WAIT 3397
CLOSE_WAIT 214
FIN_WAIT1 9
FIN_WAIT2 2
ESTABLISHED 2000
SYN_RECV 8

vim /etc/sysctl.conf

net.ipv4.tcp_syncookies= 1    #开启SYNCookies。当SYN等待队列溢出时,启用cookies处理,可防范少量SYN攻击,默认0,表关闭;
net.ipv4.tcp_tw_reuse= 1    #开启重用。允许将TIME-WAITsockets重用于新的TCP连接,默认0,表示关闭;
net.ipv4.tcp_tw_recycle= 1    #开启TCP连接中TIME-WAITsockets的快速回收,默认0,表关闭;
net.ipv4.tcp_fin_timeout= 30    #修改系統默认的 TIMEOUT 时间。

#输入下面的命令,让内核参数生效:
sysctl -p

 

Centos排除too many open files的问题 增加文件句柄打开数量
cat /etc/sysctl.conf
fs.file-max = 100000

cat /etc/security/limits.conf
* soft nofile 100000
* hard nofile 100000
重启服务

 

标签:...,ichunt,网站,性能,st,mode,net,优化,size
From: https://www.cnblogs.com/sunlong88/p/17902755.html

相关文章

  • 很不错的几个图标网站
      阿里巴巴矢量图标库IconFont大家应该一点也不陌生了,提供矢量图标下载、在线存储、格式转换等,内含矢量图标近百万个,是设计师和前端开发的便捷工具。今天给大家分享几个比较独特有趣的图标网站,个人觉得都很有特点,比那些单纯的线条样式要好玩儿一些。【......
  • CUDA优化相关问题总结
    如何利用ncu检查sharedmemory传输数据量ncu(NVIDIACommandLineProfiler)是NVIDIACUDA工具包中的一个命令行性能分析工具,可以用于检查共享内存(SharedMemory)的传输情况。SharedMemory是CUDA中的一种共享内存空间,可以在同一个线程块的不同线程之间共享数据。要检查Shared......
  • jemter--性能测试(并发量与吞吐量以及线程数关系)
     1.性能测试满足用户量计算(2、8原则):e.g:业务量10000     时间1min   接口平均响应时间为0.4S   调度时间300s ①吞吐量(QPS)=(10000*80%)/(1*60*20%)=667②并发数=线程数(不循环)=QPS*平均响应时间=667*0.4=266             ......
  • 内部集成M0内核MCU Sub-1G 高性能低功耗的单片集成收发芯片DP4306F
    DP4306F是一款高性能低功耗的单片集成收发机,集成M0核MCU,工作频率可覆盖200MHz~1000MHz,支持230/408/433/470/868/915频段。该芯片集成了射频接收器、射频发射器、频率综合器、GFSK调制器、GFSK解调器等功能模块。通过SPI接口可以对输出功率、频道选择以及数据包格式进行灵活配置,并......
  • 记录ArcGIS Server Manager服务的网站配置文件泄露漏洞
    描述此漏洞在ArcGISServer10.2forWindows上被发现,在启用了ArcGISServerManager服务时,通过GET请求[主机+端口]/arcgis/manager/3370/js/../WEB-INT/web.xml地址,任意用户可获取ArcGIS的manager应用服务配置。风险等级:低(被泄露的文件对所有此产品用户可见,不包含机密信息)分......
  • 优化创造力:Eagle
    官网地址:https://eagle.cool/引言在进入Eagle的世界之前,管理我的图像资产是一个混乱和耗时的过程。我经常面临着文件夹杂乱无章、命名规范不一致,以及在需要时快速定位正确图片的挑战。这种杂乱无章的方法不仅妨碍了我的工作流程,也抑制了我的创造力。发现Eagle我对Eagle的介绍......
  • 转DM8的SQL性能优化思路浅谈系列(二)
    ########sample2  https://www.modb.pro/db/635695干货攻略】达梦数据库DM8的SQL性能优化思路浅谈系列(二)们在上一次的分享中已介绍SQL优化的重要性,预估执行计划生成及基础说明和达梦性能分析思路。今天我们接着来聊一下达梦数据库参数调整、跟踪存储过程中的慢SQL思路及辅......
  • mysql 索引优化2
    对于关联sql的优化关联字段加索引,让mysql做join操作时尽量选择NLJ算法小表驱动大表,写多表连接sql时如果明确知道哪张表是小表可以用straight_join写法固定连接驱动方式,省去mysql优化器自己判断的时间 in和exsits优化原则:小表驱动大表,即小的数据集驱动大的数据集in:当B表的......
  • 图像识别的精度与效率优化研究
    基于深度学习的图像识别算法研究摘要:随着深度学习技术的快速发展,基于深度学习的图像识别算法已经成为计算机视觉领域的研究热点。本文将介绍基于深度学习的图像识别算法的基本原理、研究进展和应用领域,并探讨其未来的发展趋势。一、引言深度学习是一种基于神经网络的机器学习方......
  • 开源 Serverless 框架 Laf 性能优化实践
    介绍Laf是一个完全开源的Serverless框架,Laf的Node.js运行时容器(以下简称为Runtime)是Laf的函数执行环境,依托于Express.js框架。采用容器进程常驻的方式,每一个应用对应于一个或多个容器(弹性伸缩下),底层使用了Node.js的vm模块,使用MongoDB的watch()方法来监......