Questions tagged [buffer]

This tag is for questions about kernel buffer caches, including pipe buffers. These are used to store the recently accessed files and/or frequently accessed files.

Filter by
Sorted by
Tagged with
4
votes
1answer
50 views

broken pipe when tar extracted from stdin buffer

I am restoring files from a tar archive on an LTO-7 tape to a locally mounted network share. If I directly restore to the share it runs very slowly (90 MB/s). When I use an additional buffer I get the ...
0
votes
1answer
17 views

Bright Color Escape Sequences not saved in Tmux capture-pane?

I'm trying to use tmux to create a pty for me that I can read the contents of, including color. I'm using tmux capture-pane -e -t paneName and tmux save-buffer tmuxbuffer.txt and I get normal colors, ...
0
votes
0answers
25 views

Effect of Buffer Size in File I/O in Unix

I am trying to understand the inner workings of Unix based OSs. I was reading on buffered I/O, and how the buffer size affects the number of system calls made, which in turn affects the total time ...
4
votes
2answers
83 views

Buffering stdout separately from stderr

I am running a utility, which emits the following: Progress to its Standard Error Data/Yield/Output to its Standard Output I did not build the utility, nor can I easily modify it. I wish to do the ...
2
votes
1answer
21 views

Does it have 3 levels of buffering, or 2 levels of buffering, when using stdio library?

From The Linux Programming Interface: (I've read the related sections. I pasted this sum-up diagram just for illustration.) I know that for direct IO which uses read and write system calls. There is ...
0
votes
0answers
22 views

Do I have a use-case for mount -o sync?

Let me explain my thought process: We have an out-of-core FEM solver (closed source) that relies on using disk space as a replacement for too little RAM. Consequently, its performance largely depends ...
1
vote
1answer
35 views

File order on FAT/FAT32/VFAT file systems

I have several audio devices (car radio, portable radio, MP3 player) that take SD cards and USB sticks with a FAT file system on it. Because these devices have limited intelligence they do not sort ...
0
votes
0answers
24 views

What does 'Not Supported' mean in the msecli reports?

A Micron MTFDHAL800MCE SSD is installed on my computer system and the OS is Linux Mint18. Micron has provided msecli for the management and configuration of the SSDs using specific commands on the ...
0
votes
0answers
32 views

mount cifs async cause temporary freeze of the directory tree

I have an issue with high buffering and high workload while copying large files to my samba mount. I have NAS with samba share and some Linux and Windows machine. My Windows machine works well - avg ...
2
votes
2answers
152 views

How to send output of `pv` to python script, and output progress one line at a time?

I use tar to quickly copy thousands of small files which I pipe to pv to show the progress and speed of the copying. $ sudo tar c --files-from /tmp/camfilenames | pv --width 40 | sudo tar x -C /...
0
votes
1answer
73 views

Disable buffering for file descriptors in bash

I may be misunderstanding what's going on here, but I feel it's got to do with pipe buffering. I have a script which uses several file descriptors (# 3 and above) for various logging levels. Depending ...
-1
votes
1answer
65 views

Which hardware is used by buffer

I know that the cache is used to store data so that future requests for that data can be served faster. Normally we have three level cache: L1, L2 and L3 in the current computer architecture. We can ...
0
votes
1answer
123 views

Linux FIFO buffering depends on invocation order of readers and writers

I'm trying to write a simple python script that reads from a fifo and then writes to another fifo. I have created two FIFOs using the following command: $ mkfifo input $ mkfifo output I invoke the ...
6
votes
1answer
2k views

Do I need to take action regarding my Microarchitectural Data Sampling (MDS) status?

My dmesg output contains the following line: [ 0.265021] MDS CPU bug present and SMT on, data leak possible. See https://www.kernel.org/doc/html/latest/admin-guide/hw-vuln/mds.html for more ...
1
vote
1answer
73 views

avoid bash buffering problem in log processing

I have bash buffering a problem similar to what can be found here: Turn off buffering in pipe The socat solution in the above question is quite interesting as I have access to this command in my ...
14
votes
3answers
1k views

What happens when a file that is 100% paged in to the page cache gets modified by another process

I know that when a page cache page is modified, it is marked dirty and requires a writeback, but what happens when: Scenario: The file /apps/EXE, which is an executable file, is paged in to the page ...
0
votes
0answers
64 views

background process with “&” and problem with buffering

I've written this script in the ~/.bashrc file and I've sourced the file, but it's not working properly. It's purpose is to open the link provided by the jupyter notebook in the Chrome browser in a ...
1
vote
0answers
23 views

Why doesn't sync guarantee that buffers are flushed?

As far as I can see, the only use of sync is to ensure that there's no incomplete information, which is supposed to be safely written on disk but may actually be still only in a volatile buffer. ...
0
votes
0answers
42 views

Displaying a changing buffer in realtime in linux

Sometimes when I am searching for a song on my machine, I use the following: locate *artist*.mp3 | sort | less The thing about this is that the sort will buffer until all files have been located, ...
2
votes
2answers
485 views

Flush the pipe/printf buffers externally for already running process with known PID

I am writing a data logging app, all programs are started like: ./program > out.bin The data collector periodically pools the stdout output files and reads the data. The issue is that the IO ...
1
vote
0answers
64 views

Unbuffer converting all characters to bell?

When I pipe a large-ish output through unbuffer, all I end up getting is an endless stream of the bell character (u0007). See here, a 1631-character string of arbitrary content piped through unbuffer ...
1
vote
1answer
422 views

Disable buff/cache linux for fixing ubuntu hangs on full ram

I have 8 gb of ram, ssd and very greedy for ram Android studio/gradle. and sometimes when gradle builds project(eats ram) it hangs all ubuntu(and xubuntu). ui becomes so laggish - mouse cursor moves 1 ...
1
vote
1answer
1k views

What controls the buffering of stdout stderr?

What part of the system sets up the buffering of the three standard streams when a program is started? Is this part of linux, or glibc, or maybe bash? Does POSIX define the behaviour, or is it part ...
1
vote
0answers
919 views

UDP send buffer error in netstat

I we are running voice application which stream UDP (RTP) packets for voice, I am investigation some strange issue where my ifconfig ens4 | grep error counter going up specifically overrun If you see ...
3
votes
1answer
271 views

Using multiple copy buffers in Bash

Ctrlu cuts text from current location to the beginning of line. Now, I can paste this with Ctrly whenever I want until the next time I hit Ctrlu to copy another line in the buffer. Now the problem I ...
0
votes
0answers
1k views

flush tty device buffer from terminal

I have a serial device on /dev/ttyAMA0. I have program written in C that communicates with this device. But apart from the C program I sometimes need to input some configuration data from terminal, ...
0
votes
0answers
45 views

Sizing of Samba Linux Server

Do you know any performance of sizing recommendations about Samba 4.7.1 ? For few informations : 2vCPUs / 1 Core 8GB of RAM 140 simultaneous Windows users / 250 at most / 20 NFS volumes mounted via ...
4
votes
0answers
139 views

Tailing file using less +F/shift-F, turn off line buffering?

When using tail -f, it prints each character as it is written to the file, but less +F won't print until it sees a linefeed. And if the data being written to the file does not contain linefeeds, must ...
2
votes
0answers
99 views

fq_codel not working on saturated link?

I'm setting up a test to saturate a link between two machines with a gig router in between them, then run fq_codel on Debian Buster and see if my ping times can improve (what I think fq_codel is ...
2
votes
1answer
959 views

Why do terminal emulators still have screen flicker?

Why are there still visual artifacts when terminal emulators draw text-based applications? This on recent computers that render 3D games and GUI windows including anti-aliased vector fonts with no ...
1
vote
2answers
353 views

why /proc/net/udp is showing wrong rx_queue size in CentOS server?

I have a java server application. while(true) { serverSocket.receive(receivePacket); process(receivePacket); serverSocket.send(sendPacket); try { ...
3
votes
1answer
125 views

Page cache behavior guarantees and log files

Are there any guarantees as to when and in what order dirty pages are written out to disk? In the specific case of log structured files (files that are only ever appended to), is it possible for dirty ...
0
votes
0answers
67 views

How to get the network buffer usage of some process

I have an Ubuntu server, which contains some user-processes. It always crashes after starting-up several hours. "crashes" means that I cannot neither ssh to it nor ping it anymore. I'm doubting that ...
1
vote
1answer
216 views

How to pipe to less unbuffered?

I'm trying to display progress, and make it usable under less: while true; do echo -n .; sleep 1; done | less Is there a way to make it work?
1
vote
2answers
240 views

What are two caveats of line buffering in Unix?

A paragraph from APUE Chapter 5.4 about line buffer: Line buffered. In this case, the standard I/O library performs I/O when a newline character is encountered on input or output. This allows us ...
0
votes
1answer
36 views

Is buffer used only for writing or can it be used for both reading and writing?

I am reading about caching and buffering from Operating System Concepts, and here is a copy of it. Is it correct that cache is used only for reading not for writing? Is buffer used only for writing ...
3
votes
1answer
537 views

Block device cache v.s. a filesystem

Block devices provide buffering. This means that write() on a block device can return success, before the kernel has written the data to the device. A program can wait for all the buffered writes by ...
1
vote
1answer
366 views

free -m: free size reduced because of cache/buff

I'm using the function rosbag of ROS. rosbag can record lots of data from other ROS nodes. In a word, it will generate a huge file, such as a file of 200MB. After generating such a file, I found that ...
1
vote
1answer
133 views

Copy terminal scrollback buffer preserving ANSI escape sequences, but without pre-starting script/screen

I have a live running mate-terminal whose scrollback buffer already contains a lot of text with color/bolding, but (unfortunately) no screen management/capture program (like script/screen/tmux) was ...
1
vote
1answer
197 views

How does the kernel decides which buffer to use?

When the kernel accesses a disk block, it searches for a buffer with the appropriate device-block number combination. This line is from the book "The design of the unix operating system". So my ...
0
votes
1answer
56 views

How do I limit the maximum RAM for Linux VPS?

I rent a shared VPS that runs Debian 9. I am alloted 4GB RAM (4096MB), but sometimes my processes go over 4GB. This is largely due to the kernel caching a lot of my stuff, so I'd like to know if I ...
1
vote
0answers
119 views

hard disk high temperature and frequent access while idle

I have bought two WD Gold 4TB and installed debian sid with kde on a single RAID1 partition, md0: # cat /proc/mdstat Personalities : [raid1] [linear] [multipath] [raid0] [raid6] [raid5] [raid4] [...
1
vote
1answer
1k views

What is the difference between buffer and cache?

I know that a cache is used to improve the speed of reading data from hard drive because the speed of reading data from hard drive and the speed of reading data from RAM are very different. So the ...
-1
votes
1answer
383 views

Problems with external hard disk

I can't overcome a problem I have with my hard disk! I don't know if it is the right section, but the problem I have started suddenly while I was copying files on Debian. The problem is that my ...
1
vote
0answers
257 views

Ubuntu crashes on startup with a call trace (release_bts_buffer)

A friend of mine is having problems with her Ubuntu laptop and I have trouble finding informations that could help me know what is going on. I think this is a bit beyond the scope of my abilities. ...
1
vote
1answer
180 views

Can't grep output of apt-get

If I run: apt-get install --dry-run 2klic-embedded-gui=*-master I get: Reading package lists... Done Building dependency tree Reading state information... Done 2klic-embedded-gui is already ...
2
votes
2answers
2k views

stdin unbuffered

I'm executing a program with an stdin redirection: $ prog < f In that case, the stdin is fully buffered. Is there a trick to make it unbuffered or line buffered? EDIT. Without modifying the ...
2
votes
2answers
1k views

How to make any program work with the tee command?

I wrote a program (in Ruby) and it worked well. It prints out a few lines of text and then pause for a minute and then repeats the above. It works well (in Mac OS X's terminal), but I noted that if I ...
6
votes
3answers
2k views

How Do I Unbuffer The Output Passed From an Interactive Command Into a Pipeline Ending With `tee`?

     I'm troubleshooting an interactive command and would like to: see output printed to my screen with its original coloration, unbuffered or line-buffered (instead of ...
2
votes
0answers
110 views

linux: Discard dirty pages for block device (on usb disconnect)

When forcefully removing a USB device on linux while there are outstanding writes to the device the kernel log fills up with blk_update_request: I/O error, dev sdg, sector 50618368 Buffer I/O error ...