首页
Search
1
v2ray异常错误之二
3,310 阅读
2
linux时区设置
2,698 阅读
3
DB2常用操作
2,173 阅读
4
websphere修改jvm内存xmx和xms
1,929 阅读
5
nfs客户端文件属主为nobody的现象
1,552 阅读
技术
生活
运动
游戏
电影
登录
Search
标签搜索
docker
linux
troubleshooting
nginx
secure
truenas
mysql
windows
python
esxi
docker swarm
oracle
zabbix
tomcat
blog
dsm
群晖
rpa
freenas
db
yuc
累计撰写
291
篇文章
累计收到
0
条评论
首页
栏目
技术
生活
运动
游戏
电影
页面
搜索到
289
篇与
的结果
2023-08-24
nginx平滑升级
0x1 nginx官方其实已经带了升级的办法,会根据 ./configure 在 Makefile 文件中显示出来,如下: default: build clean: rm -rf Makefile objs .PHONY: default clean build: $(MAKE) -f objs/Makefile install: $(MAKE) -f objs/Makefile install modules: $(MAKE) -f objs/Makefile modules upgrade: /usr/local/tengine/sbin/nginx -t kill -USR2 `cat /usr/local/tengine/logs/nginx.pid` sleep 1 test -f /usr/local/tengine/logs/nginx.pid.oldbin kill -QUIT `cat /usr/local/tengine/logs/nginx.pid.oldbin` .PHONY: build install modules upgrade 我们在 make 出二进制文件后,备份原有的二进制文件、替换,再使用 make upgrade 即可升级,或者根据上面的步骤手动操作也是可以的
2023年08月24日
376 阅读
0 评论
0 点赞
2023-08-24
https/ssl/tls安全性测试
0x1 测试方式推荐 手动 + openssl 测试。通过浏览器F12查看各安全头是否设置,通过 openssl 命令测试支持的 ssl 协议 openssl s_client -connect xxx.xxx.gov.cn:443 -ssl3 使用在工具测试 myssl.com 部署工具本地测试 testssl # github 代码地址 https://github.com/drwetter/testssl.sh # 官网 https://testssl.sh/
2023年08月24日
5 阅读
0 评论
0 点赞
2023-08-24
操作系统软硬件优化思路以及具体
0x1 内存优化 关闭swap分区的使用,尽量减少swap低性能的影响 关闭透明大页,导致内存分配策略问题 关闭numa,内存可能分配不均,导致仍然使用swap IO优化 选择高性能的磁盘,比如SSD、nvme、傲腾 合适的raid模式,比如raid10,raid6 选择性能更高的xfs作为文件系统类型,块大小 挂载关闭一些参数,比如 noatime,nodiratime io调度策略 cpu 设置performance性能模式 最大文件数 用户最大的进程数和最大文件数设置 网络优化 减少操作系统默认TIME_WAIT的时间,及时释放断开的链接提升在高并发下的请求性能 优化tcp keepalived时间,及时释放长时间未发送数据库的链接 端口重用等,不需要等到回收,节省端口回收分配时间 减少syn ack的确认次数 关闭 ipv6 -中间件 使用异步非阻塞的IO模型,防止io成为瓶颈 优化线程数,适当可以增大并发,防止等待 缓存,尽可能减少io甚至异机请求环节 适当优化内存配置 可选择压缩请求内容,根据网络和cpu状况综合考虑
2023年08月24日
9 阅读
0 评论
0 点赞
2023-08-24
rman备份策略以及脚本
0x1 rman推荐每周一次0级备份,其他时间1级备份,不需要搞其他级别备份,麻烦但是节省不了多少空间。 https://www.oracle.com/br/a/tech/docs/technical-resources/best-practices-for-oda.pdf 0x2 0级备份 echo `date +%a` rman target / run { allocate channel t1 type disk; allocate channel t2 type disk; allocate channel t3 type disk; allocate channel t4 type disk; backup as compressed backupset incremental level 0 tag 'db_level0' skip inaccessible format '/rman/back_%s_%p_%T_%d' database; sql 'alter system archive log current'; backup skip inaccessible tag 'archlog' format '/rman/arclogback_%s_%p_%t_%d' archivelog all; backup tag 'controlfile' format='$BACKUPDIR/controlfile_%d_%U_%T.ctl' current controlfile; backup tag 'spfile' format='$BACKUPDIR/spfile_%d_%U_%T.ora' spfile; #delete input; release CHANNEL t1; release CHANNEL t2; release CHANNEL t3; release CHANNEL t4; } allocate channel for maintenance device type disk; crosscheck archivelog all; delete noprompt expired archivelog all; crosscheck backup; delete noprompt expired backup; report obsolete; delete noprompt obsolete; list backup summary; release channel; 1级累积备份 rman target / run { allocate channel t1 type disk; allocate channel t2 type disk; allocate channel t3 type disk; allocate channel t4 type disk; backup as compressed backupset incremental level 1 cumulative tag 'db_level1' skip inaccessible format '/rman/back_%s_%p_%T_%d' database; sql 'alter system archive log current'; backup skip inaccessible tag 'archlog' format '/rman/arclogback_%s_%p_%t_%d' archivelog all; backup tag 'controlfile' format='$BACKUPDIR/controlfile_%d_%U_%T.ctl' current controlfile; backup tag 'spfile' format='$BACKUPDIR/spfile_%d_%U_%T.ora' spfile; #delete input; release CHANNEL t1; release CHANNEL t2; release CHANNEL t3; release CHANNEL t4; } allocate channel for maintenance device type disk; crosscheck archivelog all; delete noprompt expired archivelog all; crosscheck backup; delete noprompt expired backup; report obsolete; delete noprompt obsolete; list backup summary; release channel;
2023年08月24日
5 阅读
0 评论
0 点赞
2023-08-24
fio测试硬盘io
fio使用方法 很多年前我们使用 hdparm 或者 dd 测试磁盘的 io,但是跟随着系统技术和磁盘技术的发展,这些老工具已不再测试准备,或者要增加一些特别的参数,比较麻烦,所以可以选择 fio 来测试硬盘性能 顺序读 fio -filename=/opt/test -iodepth=64 -ioengine=psync -direct=1 -rw=read -bs=4k -size=8g -numjobs=64 -runtime=60 -group_reporting -name=test-read 顺序写 fio -filename=/opt/test -iodepth=64 -ioengine=psync -direct=1 -rw=write -bs=4k -size=8g -numjobs=64 -runtime=60 -group_reporting -name=test-write 随机读 fio -filename=/opt/test -iodepth=64 -ioengine=psync -direct=1 -rw=randread -bs=4k -size=8G -numjobs=64 -runtime=60 -group_reporting -name=test-rand-read 随机写 fio -filename=/opt/test -iodepth=64 -ioengine=psync -direct=1 -rw=randwrite -bs=4k -size=8G -numjobs=64 -runtime=60 -group_reporting -name=test-rand-write 20240415 fio 使用的引擎的话 psync 和 libaio 都是可以的,但是推荐使用 libaio。再就是 io 测试一般指标分为两个,一个是 iops ,一个是 吞吐量 其中 4k 随机读、4k 随机写,适用于 iops 测试 大块如,64k,256k,512k 等适用于吞吐量测试 最后关于参数,numjobs、iodepth,一般这两个参数的大小会最大影响测试结果: 其中 numjobs 是启动的任务,相当于多少个进程进行测试,一般来说不超过cpu核心数即可 iodepth测试io的队列深度,一般来说机械硬盘取1或2,ssd 等可以使用 8 ~ 64 所以最大的 io 队列深度其实是 numjobs x iodepth , 所以有可能出现如下情况 numjobs 设置为 cpu 核心数、 iodepth 设置 1 or 2,结果不好,iodepth需要设置更大 numjobs 设置为 cpu 核心数, iodepth 设置 1 or 2,测试结果正常,符合iops上限 numjobs 设置为 个位数,iodepth 设置为 32 ~ 64,测试结果正常,符合 iops 上限 以上这些情况都是有可能发生的,所以实际情况下,我们需要根据推荐来进行测试,或者觉得不符合当前磁盘性能的时候进行多次参数的变更测试 以下是针对阿里云 100k iops 的测试: 1. fio --filename=/tmp/test/test.test -size=30G --direct=1 --rw=randread --bs=4k --ioengine=libaio --iodepth=64 --runtime=30s --numjobs=1 --time_based --group_reporting --name=iops-test-job --eta-newline=1 2. fio --filename=/tmp/test/test.test -size=30G --direct=1 --rw=randread --bs=4k --ioengine=libaio --iodepth=64 --runtime=30s --numjobs=4 --time_based --group_reporting --name=iops-test-job --eta-newline=1 3. fio --filename=/tmp/test/test.test -size=30G --direct=1 --rw=randread --bs=4k --ioengine=libaio --iodepth=1 --runtime=30s --numjobs=4 --time_based --group_reporting --name=iops-test-job --eta-newline=1 4. fio --filename=/tmp/test/test.test -size=30G --direct=1 --rw=randread --bs=4k --ioengine=libaio --iodepth=1 --runtime=30s --numjobs=1 --time_based --group_reporting --name=iops-test-job --eta-newline=1 5. fio --filename=/tmp/test/test.test -size=30G --direct=1 --rw=randread --bs=4k --ioengine=libaio --iodepth=1 --runtime=30s --numjobs=32 --time_based --group_reporting --name=iops-test-job --eta-newline=1 6. fio --filename=/tmp/test/test.test -size=30G --direct=1 --rw=randread --bs=4k --ioengine=libaio --iodepth=32 --runtime=30s --numjobs=32 --time_based --group_reporting --name=iops-test-job --eta-newline=1 其中 3、4 测试结果不能达到满速,甚至是非常低,只有几k左右 其他方案 我们也可以选择使用vertica自带的工具测试
2023年08月24日
9 阅读
0 评论
0 点赞
1
...
35
36
37
...
58