[pve-devel] [RFC PATCH pve-cluster] fix #5728: pmxcfs: allow bigger writes than 4k for fuse
Friedrich Weber
f.weber at proxmox.com
Mon Sep 23 14:00:57 CEST 2024
On 23/09/2024 11:17, Dominik Csapak wrote:
> [...]
> so i did some benchmarks (mostly disk writes) and wrote the short script
> below
> (maybe we can reuse that?)
>
> ----8<----
> use strict;
> use warnings;
>
> use PVE::Tools;
>
> my $size = shift;
>
> sub get_bytes_written {
> my $fh = IO::File->new("/proc/diskstats", "r");
> die if !$fh;
> my $bytes = undef;
> while (defined(my $line = <$fh>)) {
> if ($line =~ m/sdb/) {
> my @fields = split(/\s+/, $line);
> $bytes = $fields[10] * 512;
> }
> }
> return $bytes;
> }
>
> sub test_write {
> my ($k) = @_;
> system("rm /etc/pve/testfile");
> my $data = "a"x($k*1024);
> system("sync; echo -n 3> /proc/sys/vm/drop_caches");
I'm not sure this actually drops the caches: Without the space between
`3` and `>` I think this redirects fd 3 to that file (so doesn't
actually write the `3`)? I didn't run the script though, so not sure if
it makes any difference for the results.
More information about the pve-devel
mailing list