Hi Sergio,

I suppose you replied personally to me instead of to
the list by mistake. I will provide my answer here,
quoting yours:

On Tue, 25 Sep 2018 08:56:30 +0200 Sergio Gelato wrote:

> I think you're asking the wrong question. The
> question I would ask is: is the performance of
> Bacula limited by the CPU or by other factors
> (especially I/O and system calls)? If Bacula isn't
> CPU-bound, the difference between -O2 and -O3 isn't
> going to be worth worrying about.

I understand what you are saying but still I was
interested to know.

> I haven't looked at the Bacula code base in enough
> detail to be sure, but I'd expect its loops to be
> linked-list traversals rather than iterations over
> large arrays. Vectorization isn't going to help much
> in that case.

Hopefully someone who has more in-depth look at the
code could provide more clarity.

> Ultimately, the best way to answer such questions is
> by direct benchmarking: build it both ways, and see
> if you can measure a difference.

I don't know how to create a benchmark comparison
scenario, otherwise I wouldn't mind doing it.

> I just wouldn't bother to do it with Bacula since
> its main job is I/O, not computation.

Aren't DB operations, sorting, (maybe something else)
affected by certain optimizations?

> (Some things in Bacula are memory-bound. For
> example, doing an accurate backup of a filesystem
> with lots of inodes is going to require lots of RAM;
> if you're short of memory the page swapping activity
> will kill performance. None of this is going to be
> affected by -O2 vs. -O3, and I don't think even -Os
> is going to help much; what's needed is an algorithm
> that makes smarter use of the available memory. Most
> people just buy more RAM instead.)

Algorithm efficiency is surely essential, I am not
even questioning that. But since I am unaware of what
algorithms are used and which of them may benefit or
suffer from -O3, I decided to ask.

> > Also: I would like to use a faster machine to
> > create builds for other slower machines (one of
> > them even 32-bit). Do I need anything more than
> > just finding the proper "-march" setting for the
> > target CPU?  
> 
> I'm not sure you need to do even that. The default
> should be to produce code that will run on all
> supported CPUs (of the same instruction set
> architecture). Unless you need to cross-compile, or
> to target a CPU so old that it is no longer
> supported by default (e.g., a 80x86 with x<6), you
> probably don't need to do anything special. Creating
> a 32-bit build on a 64-bit system may require you to
> use -m32 (or whatever the exact syntax is) or (my
> preferred approach) to build in a 32-bit environment
> (chroot, container or virtual machine).

I am particularly interested in building FDs for two
types of CPUs. I am attaching the /proc/cpuinfo for
both. Could you advise on specifics?

--
George
# cat /proc/cpuinfo
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 13
model name      : Intel(R) Celeron(R) M processor         1.50GHz
stepping        : 8
microcode       : 0x20
cpu MHz         : 1496.392
cache size      : 1024 KB
physical id     : 0
siblings        : 1
core id         : 0
cpu cores       : 1
apicid          : 0
initial apicid  : 0
fdiv_bug        : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 2
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov 
clflush dts acpi mmx fxsr sse sse2 ss tm pbe bts cpuid
bugs            : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf
bogomips        : 2992.78
clflush size    : 64
cache_alignment : 64
address sizes   : 32 bits physical, 32 bits virtual
power management:
# cat /proc/cpuinfo
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 15
model           : 3
model name      : Intel(R) Xeon(TM) CPU 2.80GHz
stepping        : 4
microcode       : 0x17
cpu MHz         : 2799.886
cache size      : 1024 KB
physical id     : 0
siblings        : 2
core id         : 0
cpu cores       : 1
apicid          : 0
initial apicid  : 0
fpu             : yes
fpu_exception   : yes
cpuid level     : 5
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov 
pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall lm 
constant_tsc pebs bts nopl cpuid pni dtes64 monitor ds_cpl cid xtpr pti
bugs            : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf
bogomips        : 5599.77
clflush size    : 64
cache_alignment : 128
address sizes   : 36 bits physical, 48 bits virtual
power management:

processor       : 1
vendor_id       : GenuineIntel
cpu family      : 15
model           : 3
model name      : Intel(R) Xeon(TM) CPU 2.80GHz
stepping        : 4
microcode       : 0x17
cpu MHz         : 2799.886
cache size      : 1024 KB
physical id     : 3
siblings        : 2
core id         : 0
cpu cores       : 1
apicid          : 6
initial apicid  : 6
fpu             : yes
fpu_exception   : yes
cpuid level     : 5
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov 
pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall lm 
constant_tsc pebs bts nopl cpuid pni dtes64 monitor ds_cpl cid xtpr pti
bugs            : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf
bogomips        : 5600.59
clflush size    : 64
cache_alignment : 128
address sizes   : 36 bits physical, 48 bits virtual
power management:

processor       : 2
vendor_id       : GenuineIntel
cpu family      : 15
model           : 3
model name      : Intel(R) Xeon(TM) CPU 2.80GHz
stepping        : 4
microcode       : 0x17
cpu MHz         : 2799.886
cache size      : 1024 KB
physical id     : 0
siblings        : 2
core id         : 0
cpu cores       : 1
apicid          : 1
initial apicid  : 1
fpu             : yes
fpu_exception   : yes
cpuid level     : 5
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov 
pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall lm 
constant_tsc pebs bts nopl cpuid pni dtes64 monitor ds_cpl cid xtpr pti
bugs            : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf
bogomips        : 5599.77
clflush size    : 64
cache_alignment : 128
address sizes   : 36 bits physical, 48 bits virtual
power management:

processor       : 3
vendor_id       : GenuineIntel
cpu family      : 15
model           : 3
model name      : Intel(R) Xeon(TM) CPU 2.80GHz
stepping        : 4
microcode       : 0x17
cpu MHz         : 2799.886
cache size      : 1024 KB
physical id     : 3
siblings        : 2
core id         : 0
cpu cores       : 1
apicid          : 7
initial apicid  : 7
fpu             : yes
fpu_exception   : yes
cpuid level     : 5
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov 
pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall lm 
constant_tsc pebs bts nopl cpuid pni dtes64 monitor ds_cpl cid xtpr pti
bugs            : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf
bogomips        : 5600.59
clflush size    : 64
cache_alignment : 128
address sizes   : 36 bits physical, 48 bits virtual
power management:
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to