发布于Software分类中的文章

Oct 28

免费升级了中国移动的 300M 光纤后发现跑不满,试过一下几种方法:(之前状态是关闭 CTF,开启 QoS,带宽监控等功能)

1. 开启 CTF (Cut-Through Forwarding),能跑满,但此时 QoS 等依赖防火墙包过滤的功能失效,转发功能正常;
2. 关闭 CTF,关 QoS ,带宽监控等一切依赖防火墙包过滤的功能,也勉强可以跑满带宽,但 ksoftirqd 基本占满了 CPU

目前用 1 :???:

8709677303.png


Oct 09

包含:

Portraiture v3.0.2
Portraiture 是一款支持 Photoshop 以及 Lightroom 的插件,用于人像图片润色。它能智能地对图像中的皮肤材质、头发、眉毛、睫毛等部位进行平滑和减少疵点处理。

Noiseware v5.0.3
Noiseware Professional 是一款 Photoshop 的插件,主要用于恢复图片质量,可消除图像噪点和讨厌的人为因素,如高 ISO 设置或低亮度环境。它提供了许多已经设置好的配置,让你解决大多数普通噪点问题,而不需要进一步的配置;另外,你可以更改配置或指定你自己的自定义的配置或使用自学习功能自动创建噪点配置文件。Noiseware 支持批量处理。

Realgrain v2.0.1
Realgrain 是 Imagenomic 软件公司研发的一款专业的 Photoshop 胶片效果滤镜插件,内置超多胶片颗粒效果,只需要选择效果即可快速生成一张唯美的照片。无需胶片机,快速高效。
如官方网站介绍,Realgrain 胶片滤镜插件将会带你回到暗房时代,软软的,暖暖的颗粒感电影,或模糊,复古的外观,或者模拟传统胶片增强您的数码照片质地。

这个滤镜程序能轻松地模拟各种胶片相机的影像效果。提供了多种方式实现图片的胶片颗粒效果,不同的胶片的颜色和色调以及不同的分辨率体现了图片的胶片效果!


Sep 24

网上教程一般都是 Potplayer + LAV Filters + MadVR 来实现 HDR 影片的播放,实际上 Potplayer 在 1.7.18958 版本后已经自带 HDR 的播放功能,能正确识别并且正常表现 HDR 影片的色彩。当 Potplayer 识别到 HDR 影片播放时,控制栏的 HDR 字样会被点亮,如下图:

在 1.7.18958-19955 版本中,默认设置即可实现 HDR 播放,如下图:

到了 1.7.20538 版本后,需要设置:

根据:

PotPlayer 1.7.20538 changelog:

Changed default HEVC decoder to Built-in FFmpeg HEVC H/W Decoder

:shock: :shock: :shock:


Sep 19

一直更新记录吧,老了记性太差了。 :sad: :sad: :sad:

#强化随机熵
sudo apt install haveged

#开启 bbr
sudo nano /etc/sysctl.conf

net.core.default_qdisc = fq
net.ipv4.tcp_congestion_control = bbr

sudo sysctl -p

#shadowsocks offcial tweak
sudo nano /etc/sysctl.conf

# max open files
fs.file-max = 81920
# max read buffer
net.core.rmem_max = 67108864
# max write buffer
net.core.wmem_max = 67108864
# default read buffer
net.core.rmem_default = 65536
# default write buffer
net.core.wmem_default = 65536
# max processor input queue
net.core.netdev_max_backlog = 4096
# max backlog
net.core.somaxconn = 4096

# resist SYN flood attacks
net.ipv4.tcp_syncookies = 1
# reuse timewait sockets when safe
net.ipv4.tcp_tw_reuse = 1
# turn off fast timewait sockets recycling
net.ipv4.tcp_tw_recycle = 0
# short FIN timeout
net.ipv4.tcp_fin_timeout = 30
# short keepalive time
net.ipv4.tcp_keepalive_time = 1200
# outbound port range
net.ipv4.ip_local_port_range = 10000 65000
# max SYN backlog
net.ipv4.tcp_max_syn_backlog = 4096
# max timewait sockets held by system simultaneously
net.ipv4.tcp_max_tw_buckets = 5000
# turn on TCP Fast Open on both client and server side
net.ipv4.tcp_fastopen = 3
# TCP receive buffer
net.ipv4.tcp_rmem = 4096 87380 67108864
# TCP write buffer
net.ipv4.tcp_wmem = 4096 65536 67108864
# turn on path MTU discovery
net.ipv4.tcp_mtu_probing = 1

# for high-latency network
net.ipv4.tcp_congestion_control = hybla

# for low-latency network, use cubic instead
# net.ipv4.tcp_congestion_control = cubic

# for 4.9+
# net.ipv4.tcp_congestion_control = bbr

sudo vim /etc/security/limits.conf

* soft nofile 81920
* hard nofile 81920
www-data soft nofile 81920
www-data hard nofile 81920
root soft nofile 81920
root hard nofile 81920

sudo nano/etc/pam.d/common-session

session required pam_limits.so

#给予程序监听底端口权限
sudo setcap CAP_NET_BIND_SERVICE=+eip /usr/local/sbin/overture
sudo setcap CAP_NET_BIND_SERVICE=+eip /usr/local/bin/caddy

#ubuntu 允许所有进出站
sudo iptables -P INPUT ACCEPT
sudo iptables -P FORWARD ACCEPT
sudo iptables -P OUTPUT ACCEPT
sudo iptables -F
sudo netfilter-persistent save
sudo systemctl restart netfilter-persistent

#启用 rc.local
sudo nano /etc/systemd/system/rc-local.service

[Unit]
Description=/etc/rc.local Compatibility
ConditionPathExists=/etc/rc.local
[Service]
Type=forking
ExecStart=/etc/rc.local start
TimeoutSec=0
StandardOutput=tty
RemainAfterExit=yes
SysVStartPriority=99
[Install]
WantedBy=multi-user.target

printf '%s\n' '#!/bin/bash' 'exit 0' | sudo tee -a /etc/rc.local
sudo chmod +x /etc/rc.local
sudo systemctl enable rc-local
sudo systemctl start rc-local.service
sudo systemctl status rc-local.service

#改 DNS
sudo nano /etc/netplan/50-cloud-init.yaml

nameservers:
addresses: [8.8.8.8, 8.8..4.4]
addresses: [1.1.1.1, 1.0.0.1]

sudo netplan apply or sudo netplan --debug apply

systemd 文件打开限制解除:

打开 /etc/systemd/system.conf 和 /etc/systemd/user.conf ,修改:

DefaultLimitNOFILE=81920

重启.

参考:

https://ro-che.info/articles/2017-03-26-increase-open-files-limit
https://github.com/syncthing/syncthing/issues/5319
https://3proxy.ru/highload.asp

Tags: , ,

Sep 18

申请见: 申请 Oracle Cloud 永久免费服务 + 300 美元试用额度,不过文中 SSH 有错误,创建实例的时候需要贴入生成的公匙,私匙用来在客户端登陆。

测试结果,可用度不高。 :roll: :roll: :roll:

2019-09-18_001233.jpg

Tags: , ,

Sep 16

Maximum Wan->Lan throughput:

RT-N16 without bcm_nat ~100-120Mbps
RT-N16 with bcm_nat ~ 170Mbps
RT-N66U/AC66u without bcm_nat ~240Mbps
RT-N66U/AC66u with bcm_nat ~320Mbps
RT-N18u/AC56u/AC68u without CTF ~330Mbps
RT-N18u/AC56u/AC68u with CTF ~600Mbps
R7000 without CTF ~410Mbps
R7000 with CTF ~950Mbps

but if you load CPU by any others services then throughput will be much lower. USB support is the most
aggravating CPU service. And it`s not samba/ftp/torrents only. Also if you have syslog/bw monitor/etc stored in USB device, then it also load CPU.


Sep 14

先看这个脚本:

#!/bin/bash
alias elog="logger -t $0 -s"
elog() {
    logger -t $0 -s "$@"
}
elog "hahahaha"
test123(){
    elog "i am in function!"
}
test123

运行后提示:

elog: command not found

如果换成 #!/bin/sh 则无问题:

#!/bin/sh
alias elog="logger -t $0 -s"
elog() {
    logger -t $0 -s "$@"
}
elog "hahahaha"
test123(){
    elog "i am in function!"
}
test123

执行后:

<13>Sep 14 11:59:48 /root/init.d/testme: hahahaha
<13>Sep 14 11:59:48 /root/init.d/testme: i am in function!

参考:Execute a passed alias inside a function?

Aliases are expanded when a command is read, not when it is executed. Therefore, an alias definition appearing on the same line as another command does not take effect until the next line of input is read. The commands following the alias definition on that line are not affected by the new alias. This behavior is also an issue when functions are executed. Aliases are expanded when a function definition is read, not when the function is executed, because a function definition is itself a compound command. As a consequence, aliases defined in a function are not available until after that function is executed. To be safe, always put alias definitions on a separate line, and do not use alias in compound commands.

修改为:(函数形式)

#!/bin/bash
elog() {
    logger -t $0 -s "$@"
}
elog "hahahaha"
test123(){
    elog "i am in function!"
}
test123

可行。 :roll: :roll: :roll:

再参考:Linux 环境中 alias 不生效问题

Tags: , , ,

Sep 13

已修复,此文无效

2019-10-30 追加,作者已修复 suffix-tree 匹配模式!

https://github.com/shawn1m/overture/commit/865ee48b15bcb7da0afcf2f350ce0ef01a2ff54d


Sep 09

DNS 搞对了速度还行,8K 也能看,CPU 是瓶颈了。

:oops: :oops: :oops:

Tags: , ,

Sep 02

Window10 1903 打上最近的 KB4512941 升级后 (版本号 18362.329),重启你会发现即使什么也不干, SearchUI.exe 也占用 20%-30% 的 CPU。具体分析请看:

Windows 10 1903 update 18362329 causes high cpu usage

Windows 10 v1903 update KB4512941 workaround for the cortana high cpu load issue

解决办法一:

注册表编辑器打开

HKEY_CURRENT_USER\
Software\Microsoft\Windows\CurrentVersion\Search

删除 BingSearchEnabled 键,或者改键值为 1 ,重启系统;

这个方法会启用小娜的 Bing 搜索功能。

解决办法二:

下载附件运行即可,无需重启系统。

妈的阿三 :roll: :roll: :roll:


[1/20]  1 2 3 4 5 6 7 8 9 10 > ... »