public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: "Fabian Grünbichler" <f.gruenbichler@proxmox.com>
To: Filip Schauer <f.schauer@proxmox.com>, pbs-devel@lists.proxmox.com
Subject: Re: [pbs-devel] [PATCH vma-to-pbs v3 2/6] add support for bulk import of a dump directory
Date: Wed, 30 Oct 2024 15:04:37 +0100 (CET)	[thread overview]
Message-ID: <970947159.5197.1730297077485@webmail.proxmox.com> (raw)
In-Reply-To: <8997bed6-e690-46e5-8b38-971bf48b3eba@proxmox.com>


> Filip Schauer <f.schauer@proxmox.com> hat am 30.10.2024 14:59 CET geschrieben:
> 
>  
> On 29/10/2024 11:41, Fabian Grünbichler wrote:
> >> +        let re = Regex::new(
> >> +            r"vzdump-qemu-(\d+)-(\d{4}_\d{2}_\d{2}-\d{2}_\d{2}_\d{2}).vma(|.zst|.lzo|.gz)$",
> >> +        )?;
> >> +
> >> +        let mut vmas = Vec::new();
> >> +
> >> +        for entry in read_dir(dump_dir_path)? {
> >> +            let entry = entry?;
> >> +            let path = entry.path();
> >> +
> >> +            if !path.is_file() {
> >> +                continue;
> >> +            }
> >> +
> >> +            if let Some(file_name) = path.file_name().and_then(|n|  n.to_str()) {
> > if we find a file that is not valid UTF-8, should we warn about it?
> 
> 
> Any file name that contains invalid UTF-8 will not get matched by the
> regex anyway and v4 of this patch adds a debug message logging any file
> that does not match the regex.
> 
> 
> On 29/10/2024 11:41, Fabian Grünbichler wrote:
> >> +            let process = cmd.arg(vma_file_path).stdout(Stdio::piped()).spawn()?;
> >> +            let stdout = process.stdout.expect("Failed to capture stdout");
> >> +            Box::new(BufReader::new(stdout))
> > did you test whether with_capacity and a higher buffer size than 8K improves performance?

just realized that there is a pipe before it anyhow which likely has a 64k buffer..

> >
> >> +        }
> >> +        None => match &backup_args.vma_file_path {
> >> +            Some(vma_file_path) => matchFile::open(vma_file_path)  {
> >> +                Err(why) => return Err(anyhow!("Couldn't open file: {}", why)),
> >> +                Ok(file) => Box::new(BufReader::new(file)),
> > same here
> 
> 
> Tested buffer sizes from 1024 up to 1048576 and it made no measurable
> performance difference.


_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel

  reply	other threads:[~2024-10-30 14:04 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-22 14:28 [pbs-devel] [PATCH vma-to-pbs v3 0/6] " Filip Schauer
2024-10-22 14:28 ` [pbs-devel] [PATCH vma-to-pbs v3 1/6] split BackupVmaToPbsArgs into PbsArgs and VmaBackupArgs Filip Schauer
2024-10-22 14:28 ` [pbs-devel] [PATCH vma-to-pbs v3 2/6] add support for bulk import of a dump directory Filip Schauer
2024-10-29 10:41   ` Fabian Grünbichler
2024-10-30 13:59     ` Filip Schauer
2024-10-30 14:04       ` Fabian Grünbichler [this message]
2024-10-22 14:28 ` [pbs-devel] [PATCH vma-to-pbs v3 3/6] add option to skip vmids whose backups failed to upload Filip Schauer
2024-10-22 14:28 ` [pbs-devel] [PATCH vma-to-pbs v3 4/6] remove hard coded values Filip Schauer
2024-10-22 14:28 ` [pbs-devel] [PATCH vma-to-pbs v3 5/6] use level-based logging instead of println Filip Schauer
2024-10-22 14:28 ` [pbs-devel] [PATCH vma-to-pbs v3 6/6] log device upload progress as a percentage Filip Schauer
2024-10-29 10:39   ` Fabian Grünbichler
2024-10-29 10:51 ` [pbs-devel] [PATCH vma-to-pbs v3 0/6] add support for bulk import of a dump directory Fabian Grünbichler
2024-10-30 14:02   ` Filip Schauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=970947159.5197.1730297077485@webmail.proxmox.com \
    --to=f.gruenbichler@proxmox.com \
    --cc=f.schauer@proxmox.com \
    --cc=pbs-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal