我在 Debian Wheezy 上的硬件 RAID1(可能是 LSI MegaRaid)中有 2 个 4TB 磁盘。物理块大小为 4kB。我将存储 150-2 亿个小文件(3 到 10kB 之间)。我不是在要求性能,而是为了节省存储空间的最佳文件系统和块大小。我已将 8200 字节的文件复制到块大小为 4kB 的 ext4 上。这占用了 32kB 的磁盘空间!?写日记是原因吗?那么有哪些选项可以为这些小文件节省大部分存储空间呢?
我正在使用 Debian Jessie。
# uname -a
Linux host 4.9.0-0.bpo.3-amd64 #1 SMP Debian 4.9.30-2+deb9u5~bpo8+1 (2017-09-28) x86_64 GNU/Linux
Run Code Online (Sandbox Code Playgroud)
并设置了RAID6。
# cat /proc/mdstat
Personalities : [raid6] [raid5] [raid4] [raid1]
md0 : active raid6 sda[0] sdd[3] sdc[2] sdb[1]
19532611584 blocks super 1.2 level 6, 512k chunk, algorithm 2 [4/4] [UUUU]
bitmap: 1/73 pages [4KB], 65536KB chunk
Run Code Online (Sandbox Code Playgroud)
这是 4x Seagate Enterprise 10TB 7200rpm。将大文件从 RAID 阵列复制到内部系统磁盘(SSD)时,平均吞吐量为 220MB/s。将大文件从 SSD 复制到阵列的速度为 145MB/s。当每月 RAID 检查完成时(由 cron 作业执行开始,checkarray --cron --all --idle --quiet这是默认行为)我可以看到
# cat /proc/mdstat Personalities : [raid6] …Run Code Online (Sandbox Code Playgroud) 使用 PHP7.3 FPM 和 Apache 2.4.25 我在启用 PHP FPM 状态页面时遇到问题。
什么工作:
# /etc/php/7.3/fpm/pool.d/www.conf
listen = /run/php/php7.3-fpm.sock
pm.status_path = /status-php
# /etc/apache2/sites-enabled/status.conf
<VirtualHost [::1]:80 127.0.0.1:80>
ServerName localhost
DocumentRoot /var/www
<Location /status-php>
SetHandler "proxy:unix:/run/php/php7.3-fpm.sock|fcgi://localhost"
</Location>
</VirtualHost>
Run Code Online (Sandbox Code Playgroud)
但是,什么行不通正在取代/status-php以/status/php这两个文件(PHP和Apache的配置)。这会导致 404 和一个 Apache 错误说:
AH01071: Got error 'Primary script unknown'
这是什么原因?为什么子文件夹变体不起作用?
我们通过 Dovecot(基于本教程)将 Postfix 与 Dovecot 和 SASL Auth 一起使用。一切都按预期工作。但是,当达夫科特下跌(即用于维护或其他原因),那么客户端可以在不进行身份验证的Postfix和Postfix拒绝,因为客户端请求smtpd_recipient_restrictions后随访permit_sasl_authenticated。
当 Dovecot 身份验证关闭时,有没有办法暂时拒绝到达 Postfix 的邮件?我们的后缀配置是:
smtpd_restriction_classes = check_sender_auth
check_sender_auth =
reject_authenticated_sender_login_mismatch,
permit_sasl_authenticated,
reject
smtpd_recipient_restrictions =
reject_invalid_helo_hostname,
reject_non_fqdn_recipient,
check_sender_access mysql:/etc/postfix/check_sender_domains,
reject_non_fqdn_helo_hostname,
[...]
Run Code Online (Sandbox Code Playgroud)
check_sender_domains是一个查找表,返回check_sender_auth声称来自我们的发件人地址。