<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">After some search, i guess the pid=1 limits come from the nr_open now and the default nr_open</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">come from linux code[0].</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">So there should be no way to change the pid=1 limit unless you re-compile your kernel with some code change.</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">[0] <a href="https://github.com/torvalds/linux/blob/master/fs/file.c#L22-L27">https://github.com/torvalds/linux/blob/master/fs/file.c#L22-L27</a></div></div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Oct 9, 2018 at 1:40 PM Jeffrey Zhang <<a href="mailto:zhang.lei.fly@gmail.com">zhang.lei.fly@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">Thanks Richard, </div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">That explains why archlinux NOFILE is 1048576. archlinux is using systemd 239.2-1</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">But it still can not explain where the pid=1 process limits come from? is there any way to change it?</div></div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Oct 9, 2018 at 1:31 PM Richard W <<a href="mailto:ellrywych@gmail.com" target="_blank">ellrywych@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif">There's an issue on github on this: <a href="https://github.com/systemd/systemd/issues/6559" target="_blank">https://github.com/systemd/systemd/issues/6559</a> </div></div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Oct 9, 2018 at 9:42 AM Jeffrey Zhang <<a href="mailto:zhang.lei.fly@gmail.com" target="_blank">zhang.lei.fly@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">hey guys, </div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">In the recently test, i found some interesting phenomenon.</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">in systemd service, if i configure LimitNOFILE=infinity, it is not a real infinity. the finally NOFILE will be 65536 ( on centos7 ) and 1048576 ( on archlinux), and the pid=1 process also have the same value. </div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">So my question is,</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">1. where the pid=1 limits come from? because centos7 and archlinux are different, so i guess this should be configurable or pre-compiled.</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">2. is the inifinity equals pid=1 limits in default?</div><div><br></div>-- <br><div dir="ltr" class="m_-5066160153470037433m_-7773901419810694433m_5717403479275866042gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><span style="font-size:13px;border-collapse:collapse"><font face="arial, helvetica, sans-serif">Regards,</font></span></div><div><span style="font-size:13px;border-collapse:collapse"><font face="arial, helvetica, sans-serif">Jeffrey Zhang</font></span></div><div><font face="arial, helvetica, sans-serif"><span style="font-size:12.8px">Blog: </span><a href="http://xcodest.me/" style="font-size:12.8px" target="_blank">http://xcodest.me</a></font><font face="monospace, monospace"><br></font></div></div></div></div></div></div></div></div></div></div></div></div></div></div>
_______________________________________________<br>
systemd-devel mailing list<br>
<a href="mailto:systemd-devel@lists.freedesktop.org" target="_blank">systemd-devel@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/systemd-devel" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/systemd-devel</a><br>
</blockquote></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="m_-5066160153470037433gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><span style="font-size:13px;border-collapse:collapse"><font face="arial, helvetica, sans-serif">Regards,</font></span></div><div><span style="font-size:13px;border-collapse:collapse"><font face="arial, helvetica, sans-serif">Jeffrey Zhang</font></span></div><div><font face="arial, helvetica, sans-serif"><span style="font-size:12.8px">Blog: </span><a href="http://xcodest.me/" style="font-size:12.8px" target="_blank">http://xcodest.me</a></font><font face="monospace, monospace"><br></font></div></div></div></div></div></div></div></div></div></div></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><span style="font-size:13px;border-collapse:collapse"><font face="arial, helvetica, sans-serif">Regards,</font></span></div><div><span style="font-size:13px;border-collapse:collapse"><font face="arial, helvetica, sans-serif">Jeffrey Zhang</font></span></div><div><font face="arial, helvetica, sans-serif"><span style="font-size:12.8px">Blog: </span><a href="http://xcodest.me/" style="font-size:12.8px" target="_blank">http://xcodest.me</a></font><font face="monospace, monospace"><br></font></div></div></div></div></div></div></div></div></div></div></div>