tail -f delay

I am experiencing long delays on tail -f command. I have read it may be to do with nfs. I am using the arch distro which does not have nfs userland tools installed but it shows nfsiod and rpciod in the kernel. I am not sure if this is what is causes the delay or if it is something else

Does anyone know how to disable the nfs in the kernel?

How does tail -f perform on other linodes?

3 Replies

@iceman2:

I am experiencing long delays on tail -f command. I have read it may be to do with nfs. I am using the arch distro which does not have nfs userland tools installed but it shows nfsiod and rpciod in the kernel. I am not sure if this is what is causes the delay or if it is something else
I suspect whatever resource you looked at that mentioned nfs was referring to tailing a file that was mounted via nfs, since that can involve additional network latencies and potentially clock issues between the systems. Just having it in the kernel (or even mounting other filesystems) won't have any indirect impact on other filesystems.

> How does tail -f perform on other linodes?
Pretty normal in my experience. Tail'ing a file is always going to be subject to any latencies of data being written to the file, of course. Are you sure that the file you are watching is in fact getting written when you expect? You could be running into buffering/flushing issues with the process that is writing to the file - e.g., the delay could be on the write side rather than your tail's reading side.

– David

Now that you explain it like that it makes sense.

I will look further into the actual writing of the file

If you see a large delay then lots of lines in a chunk then a large delay then a chunk of lines… this normally means the writing side is block buffered, rather than line buffered. In this case tail can't see any data 'cos nothing it's still in the buffer on the writing side.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct