<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p><br>
    </p>
    <div class="moz-cite-prefix">On 30-10-2019 11.59, Surya Teja wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CA+0Ac3z91u9K3sPDkChKw66esUPOxyq_r9iq90peUq6tcs7MZA@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">
        <div>I was thinking that since it leaves the .<time> file
          present, it may have problems doing the file operations. </div>
        <div>I did some experimenting, whatever way I make the files
          write protected, dhcpd manages to change them back. The only
          thing I did not test is SELinux.</div>
        <div>-------> Sten, can you suggest few steps to cross check
          on how to confirm that would be file operations issues when it
          has bulk data</div>
      </div>
    </blockquote>
    What I did was to deliberately write-protect the files in various
    combinations including giving the /var/lib/dhcp a new owner and
    write protect it, then restart dhcpd. In my setup the file
    operations always finished with no visible delay or other hickups. I
    was a bit surprised as I did not expect dhcpd to be able to touch a
    write-protected file that it does not own.<br>
    <blockquote type="cite"
cite="mid:CA+0Ac3z91u9K3sPDkChKw66esUPOxyq_r9iq90peUq6tcs7MZA@mail.gmail.com"><br>
      <div class="gmail_quote">
        <div dir="ltr" class="gmail_attr">On Tue, Oct 29, 2019 at 7:11
          PM Sten Carlsen <<a href="mailto:stenc@s-carlsen.dk"
            moz-do-not-send="true">stenc@s-carlsen.dk</a>> wrote:<br>
        </div>
        <blockquote class="gmail_quote" style="margin:0px 0px 0px
          0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
          <div style="overflow-wrap: break-word;"><br>
            <div>
              <div dir="auto" style="overflow-wrap: break-word;"><br>
              </div>
            </div>
            <div><br>
              <blockquote type="cite">
                <div>On 29 Oct 2019, at 13.49, Surya Teja <<a
                    href="mailto:suryateja042@gmail.com" target="_blank"
                    moz-do-not-send="true">suryateja042@gmail.com</a>>
                  wrote:</div>
                <br>
                <div>
                  <div dir="ltr">Could there be issues with file
                    permissions?<br>
                    My guess is that the temporary file written can not
                    be renamed because dhcpd does not have write
                    permissions?   ------><br>
                    <div>Hi Sten, I don't think it is with permission
                      because after few minutes dhcpd is restarting and
                      granting lease, the issue is it is taking long
                      time,</div>
                  </div>
                </div>
              </blockquote>
              <div><br>
              </div>
              I was thinking that since it leaves the .<time> file
              present, it may have problems doing the file operations. </div>
            <div>I did some experimenting, whatever way I make the files
              write protected, dhcpd manages to change them back. The
              only thing I did not test is SELinux.</div>
            <div><br>
              <blockquote type="cite">
                <div>
                  <div dir="ltr">
                    <div>In the isc dhcp forum I observed few options
                      like  <span
                        style="font-family:Consolas,Monaco,"Andale
                        Mono","Ubuntu
                        Mono",monospace;font-size:inherit;word-spacing:normal">dont-use-fsync
                        but it also suggest not recommended until </span>thorough
                      understanding OS </div>
                    <div>I have installed the dhcpd on centos7, does any
                      one have used this option? Any experience with it
                      would be much helpful for me     </div>
                    <div><br>
                    </div>
                    <div>Thanks in advance</div>
                  </div>
                  <br>
                  <div class="gmail_quote">
                    <div dir="ltr" class="gmail_attr">On Tue, Oct 29,
                      2019 at 6:12 PM Surya Teja <<a
                        href="mailto:suryateja042@gmail.com"
                        target="_blank" moz-do-not-send="true">suryateja042@gmail.com</a>>
                      wrote:<br>
                    </div>
                    <blockquote class="gmail_quote" style="margin:0px
                      0px 0px 0.8ex;border-left:1px solid
                      rgb(204,204,204);padding-left:1ex">
                      <div dir="ltr">you're doing something wrong. With
                        a decent disk subsystem this is expected to take
                        a few *seconds* (5 - 10 seconds would be my
                        estimate ) ---->
                        <div>Hi 
                          sthaug I don't see any disk subsystem issues,
                          may be I am missing the cases, can you
                          please suggest the areas or commands to cross
                          check if possible?<br>
                        </div>
                        <div><br>
                        </div>
                        <div><br>
                        </div>
                        <div>Thanks Teja</div>
                      </div>
                      <br>
                      <div class="gmail_quote">
                        <div dir="ltr" class="gmail_attr">On Tue, Oct
                          29, 2019 at 5:13 PM Sten Carlsen <<a
                            href="mailto:stenc@s-carlsen.dk"
                            target="_blank" moz-do-not-send="true">stenc@s-carlsen.dk</a>>
                          wrote:<br>
                        </div>
                        <blockquote class="gmail_quote"
                          style="margin:0px 0px 0px
                          0.8ex;border-left:1px solid
                          rgb(204,204,204);padding-left:1ex"><br>
                          <br>
                          > On 29 Oct 2019, at 11.20, <a
                            href="mailto:sthaug@nethelp.no"
                            target="_blank" moz-do-not-send="true">sthaug@nethelp.no</a>
                          wrote:<br>
                          > <br>
                          >> The main thing I am facing the issue
                          is when the data is too high like<br>
                          >> 50-60k leases in the file, the dhcpd
                          service restart is taking more time<br>
                          >> (nearly 5-6 minutes) some times
                          nearly 10-11 mins<br>
                          > <br>
                          > If a dhcpd restart with 50 - 60k leases
                          takes 5-6 minutes or more,<br>
                          > you're doing something wrong. With a
                          decent disk subsystem this is<br>
                          > expected to take a few *seconds* (5 - 10
                          seconds would be my estimate<br>
                          > based on what we see here with a larger
                          leases file).<br>
                          <br>
                          Could there be issues with file permissions?<br>
                          <br>
                          My guess is that the temporary file written
                          can not be renamed because dhcpd does not have
                          write permissions?<br>
                          <br>
                          > <br>
                          > Steinar Haug, Nethelp consulting, <a
                            href="mailto:sthaug@nethelp.no"
                            target="_blank" moz-do-not-send="true">sthaug@nethelp.no</a><br>
                          >
                          _______________________________________________<br>
                          > dhcp-users mailing list<br>
                          > <a
                            href="mailto:dhcp-users@lists.isc.org"
                            target="_blank" moz-do-not-send="true">dhcp-users@lists.isc.org</a><br>
                          > <a
                            href="https://lists.isc.org/mailman/listinfo/dhcp-users"
                            rel="noreferrer" target="_blank"
                            moz-do-not-send="true">https://lists.isc.org/mailman/listinfo/dhcp-users</a><br>
                          <br>
                        </blockquote>
                      </div>
                    </blockquote>
                  </div>
                </div>
              </blockquote>
            </div>
            <br>
          </div>
        </blockquote>
      </div>
    </blockquote>
    <pre class="moz-signature" cols="72">-- 
Best regards

Sten Carlsen

No improvements come from shouting:

"MALE BOVINE MANURE!!!" </pre>
  </body>
</html>