标签: sles11

生成大量脏页会阻塞同步写入

我们有进程在后台写入大文件。我们希望这些对其他流程的影响最小。

这是在 SLES11 SP4 上实现的测试。服务器拥有大量内存,可以创建 4GB 的脏页。

> dd if=/dev/zero of=todel bs=1048576 count=4096
4096+0 records in
4096+0 records out
4294967296 bytes (4.3 GB) copied, 3.72657 s, 1.2 GB/s
> dd if=/dev/zero of=zer oflag=sync bs=512 count=1  
1+0 records in
1+0 records out
512 bytes (512 B) copied, 16.6997 s, 0.0 kB/s

real    0m16.701s
user    0m0.000s
sys     0m0.000s
> grep Dirty /proc/meminfo
Dirty:           4199704 kB
Run Code Online (Sandbox Code Playgroud)

这是我到目前为止的调查:

  • SLES11 SP4 (3.0.101-63)
  • 输入 ext3(rw、nosuid、nodev、noatime)
  • 截止日期调度程序
  • 当时超过 120GB 的可回收内存
  • dirty_ratio 设置为 40%,dirty_background_ratio 设置为 10%,30 秒到期,5 秒回写 …

linux performance filesystems memory sles11

5
推荐指数
1
解决办法
2335
查看次数

最大打开文件 - 为什么没有错误?

我怀疑我们的服务器应用程序之一已达到其最大打开文件限制。

该应用程序使用自己的帐户在用户空间中运行。init 脚本启动大量进程,这些进程又启动大量子进程和大量线程。

根据我在/etc/security/limits.conf 中设置的书:

USERNAME - nofile 2048
Run Code Online (Sandbox Code Playgroud)

我怀疑应用程序已达到限制 - 通过查看临时文件目录,我发现那里有 2000 多个文件。

在将限制提高到 4096 并重新启动应用程序后,我在那里发现了 2100 多个文件。

现在的问题是:如果应用程序达到了 2048 的限制 - 为什么没有登录 /var/log/messages?

syslog-ng 是当前使用的 syslog-daemon。

/etc/syslog-ng/syslog-ng.conf

options { long_hostnames(off); sync(0); perm(0640); stats(3600); };
source src {
    internal();
    unix-dgram("/dev/log");
    unix-dgram("/var/lib/ntp/dev/log");
};
filter f_iptables   { facility(kern) and match("IN=") and match("OUT="); };
filter f_console    { level(warn) and facility(kern) and not filter(f_iptables)
                      or level(err) and not facility(authpriv); };
filter f_newsnotice { level(notice) and facility(news); };
filter f_newscrit   { level(crit) …
Run Code Online (Sandbox Code Playgroud)

syslog sles11

0
推荐指数
1
解决办法
3978
查看次数

标签 统计

sles11 ×2

filesystems ×1

linux ×1

memory ×1

performance ×1

syslog ×1