Questions tagged [fsync]

The fsync system call causes all modified data and attributes associated to a given file descriptor to be moved to a permanent storage device.

The fsync system call causes all modified data and attributes associated to a given file descriptor to be moved to a permanent storage device.

http://www.freebsd.org/cgi/man.cgi?query=fsync&sektion=2

101 questions
0
votes
0 answers

Force filesystem sync after delete

I'd like to load a file such that the contents are either in memory or on disk but not both. By doing a simple open, read, and delete, this should accomplish the task. But it seems that it's up to the OS to decide when to flush the delete command to…
MarkP
  • 4,168
  • 10
  • 43
  • 84
0
votes
1 answer

How to force fsync when using cv::imwrite in c++

I am writing images to disk using cv::imwrite, but I need to make sure that the file is sync to disk after that function returns. Is there a way to guarantee that? In order to use the system call fsync, I need a file descriptor, which I have no…
luisremis
  • 43
  • 1
  • 3
0
votes
1 answer

Is it possible to speed up debootstrap by disabling fsync()?

I think I was able to speed up creating a Fedora chroot (dnf --installroot=...) using LD_PRELOAD=/usr/lib64/nosync/nosync.so. But that doesn't seem to help for debootstrap. I think it still uses fsync(), just looking at the performance / disk…
sourcejedi
  • 3,051
  • 2
  • 24
  • 42
0
votes
2 answers

In Python, how to write a file on a remote machine synchronously?

Now I need to open a remote file to write something, the code just like this: client =…
An Ting Shi
  • 36
  • 1
  • 4
0
votes
1 answer

fsync not working on ext3 or ext4 system

I tried to use fsync to write some file to SD card ASAP. However fsync does not actually block before the file is physically written to the SD card. It seems to take about 5-6 seconds before the data is actually on the SD card. However mount the…
0
votes
2 answers

How to write data on USB stick safely - Linux (ARM) - C++

I'm trying to copy some folders and files on a USB stick and right after everything is done, to remove the USB stick. The implementation is something like this: create the corresponding folder structure on USB stick using mkdir fsync on each…
0
votes
0 answers

fake fsync calls to improve performance

Up to now it takes one hour to run all tests of our software which is build with this components: Linux, PostgreSQL, Python, Django I guess the performance could be improved if we fake fsync calls. PostgreSQL has the option to disable fsync, but…
guettli
  • 25,042
  • 81
  • 346
  • 663
0
votes
1 answer

linux: smart fsync()?

I'm recording audio and writing the same to a SD Card, the data rate is around 1.5 MB/s. I'm using a class 4 SD Card with ext4 file system. After certain interval, kernel auto syncs the files. The downside of this is, my application buffers pile up…
0
votes
1 answer

To minimize the disk access using fsync

There is a situation that whenever a write occurs, fsync is used with that write. Then, how to minimise the disk access? How the kernel does this? fsync() transfers ("flushes") all modified in-core data of (i.e., modified buffer cache pages for)…
Luv
  • 5,381
  • 9
  • 48
  • 61
-1
votes
1 answer

Windows: FlushFileBuffers system call fails on network mapped drive

fsync doc states Calling fsync() does not necessarily ensure that the entry in the directory containing the file has also reached disk. For that an explicit fsync() on a file descriptor for the directory is also needed. I'm trying to…
Ibrahim
  • 287
  • 1
  • 3
  • 13
-1
votes
1 answer

Disk access during file copy and rename in ext4

I have a process let's say 'A' whose job is to copy three 4 GB files to a temporary file and then rename it by overwriting to an existing file. 'A' does this every 15 minutes. The CentOS version is…
John Subas
  • 81
  • 1
  • 11
1 2 3 4 5 6
7