CPU upgrade and LVM questions.

classic Classic list List threaded Threaded
68 messages Options
1234
Reply | Threaded
Open this post in threaded view
|

CPU upgrade and LVM questions.

Dale-46
Howdy,

I mentioned in other threads that I'm doing some upgrades to my system. 
My first question is about a CPU upgrade.  I currently have this for my
CPU, from cpuinfo:

AMD Phenom(tm) II X4 955 Processor

I've bought but not yet installed a FX-8350 CPU.  I have this in my
make.conf file:

CFLAGS="-march=native -O2 -pipe"
USE_CPU="fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov
pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt
pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc rep_good nopl nonstop_tsc
extd_apicid pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic
cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt
nodeid_msr hw_pstate npt lbrv svm_lock nrip_save"

Those were put there ages ago, likely when I built and installed Gentoo
on this rig.  Do I need to change those to something that is compatible
with both CPUs and then change to the new CPU after it is installed?  Or
will the new CPU be close enough that it won't matter?  Right now, I
don't know for sure what the new CPU supports or doesn't. 

Now to the second question.  I found a 8TB hard drive and bought it.  My
plan is to take my 6TB backup drive and install it in place of a 3TB
drive which has LVM on it.  I plan to use the 8TB drive as a external
backup drive in the end.  Will do a backup before changing internal
drives tho.  From what I've read, I can use pvmove and pvremove to
replace that drive.  Just tell pv to move the data and when done, remove
the old drive. After that, the new 6TB drive will be used in that PV and
the 3TB drive can be used for something else.  Is it really that easy or
is there more to it than that?  Pardon me but that doesn't sound
complicated enough to me.  lol 

While at it, going from a 4 core CPU at 3.2GHz to a 8 core CPU at
4.0/4.2GHz, just how much increase can I expect?  Will it double and
that's about it or will it be more than that?  Also, since it has two
speeds, will it run at the slower or faster one?  Will it depend on
load?  I've never had a CPU with two clock speeds like this before. 

Thanks in advance.

Dale

:-)  :-) 

Reply | Threaded
Open this post in threaded view
|

Re: CPU upgrade and LVM questions.

Neil Bothwick
On Thu, 6 Dec 2018 03:27:31 -0600, Dale wrote:

> Now to the second question.  I found a 8TB hard drive and bought it.  My
> plan is to take my 6TB backup drive and install it in place of a 3TB
> drive which has LVM on it.  I plan to use the 8TB drive as a external
> backup drive in the end.  Will do a backup before changing internal
> drives tho.  From what I've read, I can use pvmove and pvremove to
> replace that drive.  Just tell pv to move the data and when done, remove
> the old drive. After that, the new 6TB drive will be used in that PV and
> the 3TB drive can be used for something else.  Is it really that easy or
> is there more to it than that?  Pardon me but that doesn't sound
> complicated enough to me.  lol 
It's been a while since I did that but AFAIR, yes it is that simple.
pvmove does all the hard work and it can take a while, but it can survive
an interruption.


--
Neil Bothwick

Not one shred of evidence supports the notion that life is serious.

attachment0 (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: CPU upgrade and LVM questions.

Dale-46
Neil Bothwick wrote:

> On Thu, 6 Dec 2018 03:27:31 -0600, Dale wrote:
>
>> Now to the second question.  I found a 8TB hard drive and bought it.  My
>> plan is to take my 6TB backup drive and install it in place of a 3TB
>> drive which has LVM on it.  I plan to use the 8TB drive as a external
>> backup drive in the end.  Will do a backup before changing internal
>> drives tho.  From what I've read, I can use pvmove and pvremove to
>> replace that drive.  Just tell pv to move the data and when done, remove
>> the old drive. After that, the new 6TB drive will be used in that PV and
>> the 3TB drive can be used for something else.  Is it really that easy or
>> is there more to it than that?  Pardon me but that doesn't sound
>> complicated enough to me.  lol 
> It's been a while since I did that but AFAIR, yes it is that simple.
> pvmove does all the hard work and it can take a while, but it can survive
> an interruption.
>
>


That's what I read too.  I thought it was to easy and then read that it
can be stopped and restarted.  I was like, WHAT? 

If I keep downloading videos, I'm going to have to get creative later on
with my backups.  At some point, it won't fit on a single drive, even a
really really large one.  :/

Thanks.

Dale

:-)  :-) 

Reply | Threaded
Open this post in threaded view
|

Re: CPU upgrade and LVM questions.

J. Roeleveld
In reply to this post by Neil Bothwick
Be careful to reduce the interval for reporting the progress.
Not sure if the memory leak was fixed yet, I ended up setting the interval to 10 to 30 minutes in the past to avoid memory issues.

--
Joost

On December 6, 2018 10:03:31 AM UTC, Neil Bothwick <[hidden email]> wrote:
On Thu, 6 Dec 2018 03:27:31 -0600, Dale wrote:

Now to the second question.  I found a 8TB hard drive and bought it.  My
plan is to take my 6TB backup drive and install it in place of a 3TB
drive which has LVM on it.  I plan to use the 8TB drive as a external
backup drive in the end.  Will do a backup before changing internal
drives tho.  From what I've read, I can use pvmove and pvremove to
replace that drive.  Just tell pv to move the data and when done, remove
the old drive. After that, the new 6TB drive will be used in that PV and
the 3TB drive can be used for something else.  Is it really that easy or
is there more to it than that?  Pardon me but that doesn't sound
complicated enough to me.  lol 

It's been a while since I did that but AFAIR, yes it is that simple.
pvmove does all the hard work and it can take a while, but it can survive
an interruption.


--
Sent from my Android device with K-9 Mail. Please excuse my brevity.
Reply | Threaded
Open this post in threaded view
|

Re: CPU upgrade and LVM questions.

Corbin Bird
In reply to this post by Dale-46
My two cents worth :

Update gcc before changing any hardware.

With gcc somewhat current, try this on the replacement CPU.
This gives a listing of all CPU supported compiler flags.
Including -mtune / -march :)

gcc -c -Q -march=native --help=target

sample of output :

  -msse4                       [enabled]
  -msse4.1                     [enabled]
  -msse4.2                     [enabled]
  -msse4a                     [enabled]
  -msse5                      
  -msseregparm                 [disabled]
  -mssse3                     [enabled]
  -mstack-arg-probe           [disabled]
  -mstack-protector-guard=     tls
  -mstackrealign               [disabled]
  -mstringop-strategy=         [default]
  -mstv                       [enabled]
  -mtbm                       [enabled]
  -mtls-dialect=               gnu
  -mtls-direct-seg-refs       [enabled]
  -mtune-ctrl=                
  -mtune=                     bdver2
  -muclibc                     [disabled]
  -mveclibabi=                 [default]
  -mvect8-ret-in-mem           [disabled]
  -mvzeroupper                 [enabled]
  -mx32                       [disabled]
  -mxop                       [enabled]
  -mxsave                     [enabled]
  -mxsavec                     [disabled]
  -mxsaveopt                   [disabled]
  -mxsaves                     [disabled]


This will give you the L1 / L2 cache/line/size parameters :

gcc -### -march=native /usr/include/stdlib.h

sample of output :

gcc version 7.3.0 (Gentoo 7.3.0-r3 p1.4)
COLLECT_GCC_OPTIONS='-march=native'
 /usr/libexec/gcc/x86_64-pc-linux-gnu/7.3.0/cc1 -quiet
/usr/include/stdlib.h "-march=bdver2" -mmmx -mno-3dnow -msse -msse2
-msse3 -mssse3 -msse4a -mcx16 -msahf -mno-movbe -maes -mno-sha -mpclmul
-mpopcnt -mabm -mlwp -mfma -mfma4 -mxop -mbmi -mno-sgx -mno-bmi2 -mtbm
-mavx -mno-avx2 -msse4.2 -msse4.1 -mlzcnt -mno-rtm -mno-hle -mno-rdrnd
-mf16c -mno-fsgsbase -mno-rdseed -mprfchw -mno-adx -mfxsr -mxsave
-mno-xsaveopt -mno-avx512f -mno-avx512er -mno-avx512cd -mno-avx512pf
-mno-prefetchwt1 -mno-clflushopt -mno-xsavec -mno-xsaves -mno-avx512dq
-mno-avx512bw -mno-avx512vl -mno-avx512ifma -mno-avx512vbmi
-mno-avx5124fmaps -mno-avx5124vnniw -mno-clwb -mno-mwaitx -mno-clzero
-mno-pku -mno-rdpid --param "l1-cache-size=16" --param
"l1-cache-line-size=64" --param "l2-cache-size=2048" "-mtune=bdver2"
-quiet -dumpbase stdlib.h -auxbase stdlib -o /tmp/ccQiaXih.s
"--output-pch=/usr/include/stdlib.h.gch"


Reference Link : https://wiki.gentoo.org/wiki/GCC_optimization

On 12/6/18 3:27 AM, Dale wrote:

> Howdy,
>
> I mentioned in other threads that I'm doing some upgrades to my system. 
> My first question is about a CPU upgrade.  I currently have this for my
> CPU, from cpuinfo:
>
> AMD Phenom(tm) II X4 955 Processor
>
> Those were put there ages ago, likely when I built and installed Gentoo
> on this rig.  Do I need to change those to something that is compatible
> with both CPUs and then change to the new CPU after it is installed?  Or
> will the new CPU be close enough that it won't matter?  Right now, I
> don't know for sure what the new CPU supports or doesn't. 
>

Reply | Threaded
Open this post in threaded view
|

Re: CPU upgrade and LVM questions.

Dale-46
Hi,

I think that is how I got the flags for the current CPU.  Those commands
look familiar.  Since then, I think cpuid2cpuflags can do most of it,
tho it does seem to fall short on some flags.  The way you did it
reveals a lot more details. 

My concern is this tho.  I have my old CPU still installed and
everything is compiled based on that.  So, I'm stable with the old CPU. 
However, when I shutdown, take out the old CPU and install the new one,
I'm concerned it may not boot at all because of the change or may boot
but be very unstable.  I recall years ago being able to set up the flags
in such a way that it can run on virtually any CPU but it's been a long
time ago and I don't know if it is needed or not.  My hope was, someone
did a very similar upgrade and can say for sure if it works or if I need
to do things before changing the CPUs to make sure I can boot and be
stable.  If I can just get a stable console, I can do a emerge -e world
and get the OS inline with the CPU.  I'm just concerned whether I will
have that or not. 

I should be current on gcc.  I just updated the other day and update
once a week.  I used to do more often but time isn't as plentiful as it
used to be. 

I just don't want to swap CPUs only to find out I've got to swap back
because my system won't boot at all. Heck, it may even fail to load the
kernel itself for all I know. 

Dale

:-)  :-) 




Corbin Bird wrote:

> My two cents worth :
>
> Update gcc before changing any hardware.
>
> With gcc somewhat current, try this on the replacement CPU.
> This gives a listing of all CPU supported compiler flags.
> Including -mtune / -march :)
>
> gcc -c -Q -march=native --help=target
>
> sample of output :
>
>   -msse4                       [enabled]
>   -msse4.1                     [enabled]
>   -msse4.2                     [enabled]
>   -msse4a                     [enabled]
>   -msse5                      
>   -msseregparm                 [disabled]
>   -mssse3                     [enabled]
>   -mstack-arg-probe           [disabled]
>   -mstack-protector-guard=     tls
>   -mstackrealign               [disabled]
>   -mstringop-strategy=         [default]
>   -mstv                       [enabled]
>   -mtbm                       [enabled]
>   -mtls-dialect=               gnu
>   -mtls-direct-seg-refs       [enabled]
>   -mtune-ctrl=                
>   -mtune=                     bdver2
>   -muclibc                     [disabled]
>   -mveclibabi=                 [default]
>   -mvect8-ret-in-mem           [disabled]
>   -mvzeroupper                 [enabled]
>   -mx32                       [disabled]
>   -mxop                       [enabled]
>   -mxsave                     [enabled]
>   -mxsavec                     [disabled]
>   -mxsaveopt                   [disabled]
>   -mxsaves                     [disabled]
>
>
> This will give you the L1 / L2 cache/line/size parameters :
>
> gcc -### -march=native /usr/include/stdlib.h
>
> sample of output :
>
> gcc version 7.3.0 (Gentoo 7.3.0-r3 p1.4)
> COLLECT_GCC_OPTIONS='-march=native'
>  /usr/libexec/gcc/x86_64-pc-linux-gnu/7.3.0/cc1 -quiet
> /usr/include/stdlib.h "-march=bdver2" -mmmx -mno-3dnow -msse -msse2
> -msse3 -mssse3 -msse4a -mcx16 -msahf -mno-movbe -maes -mno-sha -mpclmul
> -mpopcnt -mabm -mlwp -mfma -mfma4 -mxop -mbmi -mno-sgx -mno-bmi2 -mtbm
> -mavx -mno-avx2 -msse4.2 -msse4.1 -mlzcnt -mno-rtm -mno-hle -mno-rdrnd
> -mf16c -mno-fsgsbase -mno-rdseed -mprfchw -mno-adx -mfxsr -mxsave
> -mno-xsaveopt -mno-avx512f -mno-avx512er -mno-avx512cd -mno-avx512pf
> -mno-prefetchwt1 -mno-clflushopt -mno-xsavec -mno-xsaves -mno-avx512dq
> -mno-avx512bw -mno-avx512vl -mno-avx512ifma -mno-avx512vbmi
> -mno-avx5124fmaps -mno-avx5124vnniw -mno-clwb -mno-mwaitx -mno-clzero
> -mno-pku -mno-rdpid --param "l1-cache-size=16" --param
> "l1-cache-line-size=64" --param "l2-cache-size=2048" "-mtune=bdver2"
> -quiet -dumpbase stdlib.h -auxbase stdlib -o /tmp/ccQiaXih.s
> "--output-pch=/usr/include/stdlib.h.gch"
>
>
> Reference Link : https://wiki.gentoo.org/wiki/GCC_optimization
>
> On 12/6/18 3:27 AM, Dale wrote:
>> Howdy,
>>
>> I mentioned in other threads that I'm doing some upgrades to my system. 
>> My first question is about a CPU upgrade.  I currently have this for my
>> CPU, from cpuinfo:
>>
>> AMD Phenom(tm) II X4 955 Processor
>>
>> Those were put there ages ago, likely when I built and installed Gentoo
>> on this rig.  Do I need to change those to something that is compatible
>> with both CPUs and then change to the new CPU after it is installed?  Or
>> will the new CPU be close enough that it won't matter?  Right now, I
>> don't know for sure what the new CPU supports or doesn't. 
>>
>


Reply | Threaded
Open this post in threaded view
|

Re: CPU upgrade and LVM questions.

Nikos Chantziaras-2
In reply to this post by Dale-46
On 06/12/2018 11:27, Dale wrote:
>
> I've bought but not yet installed a FX-8350 CPU.  I have this in my
> make.conf file:
>
> CFLAGS="-march=native -O2 -pipe"
> USE_CPU="

USE_CPU does not do anything, AFAICT. CPU features are specified in
CPU_FLAGS_X86. You can get appropriate flags using the
app-portage/cpuid2cpuflags tool. For example, here:

$ cpuid2cpuflags
CPU_FLAGS_X86: aes avx mmx mmxext pclmul popcnt sse sse2 sse3 sse4_1
sse4_2 ssse3

So in my make.conf, I use:

CPU_FLAGS_X86="aes avx mmx mmxext pclmul popcnt sse sse2 sse3 sse4_1
sse4_2 ssse3"


> Those were put there ages ago, likely when I built and installed Gentoo
> on this rig.  Do I need to change those to something that is compatible
> with both CPUs and then change to the new CPU after it is installed?  Or
> will the new CPU be close enough that it won't matter?  Right now, I
> don't know for sure what the new CPU supports or doesn't.

Just install the new CPU and run cpuid2cpuflags to see what to put in
CPU_FLAGS_X86. You can delete USE_CPU as that doesn't seem to be used
for anything.



> While at it, going from a 4 core CPU at 3.2GHz to a 8 core CPU at
> 4.0/4.2GHz, just how much increase can I expect?  Will it double and
> that's about it or will it be more than that?

You won't get anything close to double the speed. The extra cores will
mostly go unused, unless you use applications that make use of them.

You will still get a speed up due to the newer CPU architecture and the
higher frequency.


> Also, since it has two
> speeds, will it run at the slower or faster one?  Will it depend on
> load?  I've never had a CPU with two clock speeds like this before.

The two speeds specify the lower and upper speeds, depending on how many
CPU cores are currently being under load, and also how much load there
is. You don't have to worry about it though. It's all automatic. When
you're not running anything that stressed the CPU, clock speeds are
actually lower than 4GHz (some CPUs can clock down to 1GHz or so when
they're idle and not doing anything.) Once something CPU-heavy runs, it
will clock up to 4.2GHz. If you run something that stresses all CPU
cores, then it will go to 4.0GHz to avoid overheating.

But again, all this is automatic.


Reply | Threaded
Open this post in threaded view
|

Re: CPU upgrade and LVM questions.

Grant Taylor-2
In reply to this post by Dale-46
On 12/06/2018 02:27 AM, Dale wrote:
> From what I've read, I can use pvmove and pvremove to replace that drive.
> Just tell pv to move the data and when done, remove the old drive. After
> that, the new 6TB drive will be used in that PV and the 3TB drive can
> be used for something else.  Is it really that easy or is there more to
> it than that?  Pardon me but that doesn't sound complicated enough to me.

I've migrated multiple hundreds of TB of data this way.

In short:

1)  Partition the new drive(s) as desired.
2)  pvcreate /dev/$newPv
3)  vgextend $vgName /dev/$newPv
4)  pvmove /dev/$oldPv /dev/$newPv
5)  vgreduce $vgName /dev/$oldPv
6)  pvremove /dev/$oldPv

This does work well, even if the LV(s) are in use / file system(s) are
mounted.

I have occasionally had issues where the system seems to not respond,
despite the fact that it is doing what it's supposed to.  I wonder if
it's related to the memory leak that J. Roeleveld was talking about.

Note:  I /do/ *STRONGLY* recommend that you do partition the new drive
and /not/ pvcreate the entire drive.  —  Many of the data recovery tools
/expect/ there to be a partition table.  Those that don't care are happy
to work with a partition table.  I've seen others be in a very
uncomfortable situation when they /didn't/ use a partition table.
Simple easy thing to avoid painting yourself into a corner.



--
Grant. . . .
unix || die

Reply | Threaded
Open this post in threaded view
|

Re: CPU upgrade and LVM questions.

Jack
In reply to this post by Dale-46
On 2018.12.06 15:58, Dale wrote:
[snip...]

> My concern is this tho.  I have my old CPU still installed and  
> everything is compiled based on that.  So, I'm stable with the old  
> CPU.  However, when I shutdown, take out the old CPU and install the  
> new one, I'm concerned it may not boot at all because of the change  
> or may boot but be very unstable.  I recall years ago being able to  
> set up the flags in such a way that it can run on virtually any CPU  
> but it's been a long time ago and I don't know if it is needed or  
> not.  My hope was, someone did a very similar upgrade and can say for  
> sure if it works or if I need to do things before changing the CPUs  
> to make sure I can boot and be stable.  If I can just get a stable  
> console, I can do a emerge -e world and get the OS inline with the  
> CPU.  I'm just concerned whether I will have that or not. 
>
[snip...]
>
> I just don't want to swap CPUs only to find out I've got to swap back  
> because my system won't boot at all. Heck, it may even fail to load  
> the kernel itself for all I know. 
I once made the mistake of getting a whole new (used...) PC and just  
moved the HDD from the old one to the new, without thinking about any  
of this.  Of course it wouldn't boot at all, because I was switching  
from an AMD to an Intel CPU and had set all flags accordingly in the  
old box.  In your case, as long as you include any flags necessary for  
the new CPU, and remove any flags for features the new CPU does not  
have, you should be good.  (I know that sounds simple, but does ignore  
how you find that info.)  Given your two CPUs are relatively close  
(unless I misread something) there should be little if anything  
critical to change.

However, if you have a live DVD, (or on USB stick) that will always  
boot, and you can then do a chroot and reset flags and start  
recompiling whatever might fail.   I actually think the kernel IS the  
likely failure if any, but once that boots, you should be good to  
recompile whatever fails.  (Yes, toolchain stuff might be an issue, but  
again, just boot back to the live DVD.)  You may need to reboot a few  
times, but you won't need to swap the old CPU back in.

Jack
Reply | Threaded
Open this post in threaded view
|

Re: CPU upgrade and LVM questions.

Dale-46
In reply to this post by Nikos Chantziaras-2
Nikos Chantziaras wrote:

> On 06/12/2018 11:27, Dale wrote:
>>
>> I've bought but not yet installed a FX-8350 CPU.  I have this in my
>> make.conf file:
>>
>> CFLAGS="-march=native -O2 -pipe"
>> USE_CPU="
>
> USE_CPU does not do anything, AFAICT. CPU features are specified in
> CPU_FLAGS_X86. You can get appropriate flags using the
> app-portage/cpuid2cpuflags tool. For example, here:
>
> $ cpuid2cpuflags
> CPU_FLAGS_X86: aes avx mmx mmxext pclmul popcnt sse sse2 sse3 sse4_1
> sse4_2 ssse3
>
> So in my make.conf, I use:
>
> CPU_FLAGS_X86="aes avx mmx mmxext pclmul popcnt sse sse2 sse3 sse4_1
> sse4_2 ssse3"
>
>

I was wondering if those are used anymore.  I did that a looooong time
ago.  Things change.  After I do the swap, I'll get the settings up to
date.  No need changing things now just to change them again later. 
Besides, the current settings may be better when I install the new one. 
I did have the correct one in make.conf but didn't notice it to post.  I
did comment out the old unused one tho.  The current setting is this:

CPU_FLAGS_X86="3dnow 3dnowext mmx mmxext popcnt sse sse2 sse3 sse4a"

I'll update that when I get the new CPU installed.  I already have
cpuid2cpuflags installed.  At least now I know it is the current tool to
use.  ;-) 

I wish the monthly news letter would come back to let us know about some
of these changes.  Some things don't require a news item but we still
need to know when we can remove outdated stuff and add new stuff. 


 

>> Those were put there ages ago, likely when I built and installed Gentoo
>> on this rig.  Do I need to change those to something that is compatible
>> with both CPUs and then change to the new CPU after it is installed?  Or
>> will the new CPU be close enough that it won't matter?  Right now, I
>> don't know for sure what the new CPU supports or doesn't.
>
> Just install the new CPU and run cpuid2cpuflags to see what to put in
> CPU_FLAGS_X86. You can delete USE_CPU as that doesn't seem to be used
> for anything.
>
>

Old setting gone.

>
>> While at it, going from a 4 core CPU at 3.2GHz to a 8 core CPU at
>> 4.0/4.2GHz, just how much increase can I expect?  Will it double and
>> that's about it or will it be more than that?
>
> You won't get anything close to double the speed. The extra cores will
> mostly go unused, unless you use applications that make use of them.
>
> You will still get a speed up due to the newer CPU architecture and
> the higher frequency.
>
>

What I was thinking about is something like when compiling and all the
cores are used.  In other words, CPU is at max load.  Right now, I have
only 4 cores.  New CPU doubles that and each core is faster as well.  As
a example, Firefox takes about a hour to compile.  I was hopeful that
would drop to 30 or 35 minutes or so.  I realize there is some overhead
on this so it isn't a exact thing.  I was just curious about a rough
number to expect.  I know upgrading from 16GBs of ram to 32GBs has
helped.  I tested Dolphin the other day and it still have its memory hog
issue.  At least this time I had enough memory that it didn't cause a
crash.  ;-)


>> Also, since it has two
>> speeds, will it run at the slower or faster one?  Will it depend on
>> load?  I've never had a CPU with two clock speeds like this before.
>
> The two speeds specify the lower and upper speeds, depending on how
> many CPU cores are currently being under load, and also how much load
> there is. You don't have to worry about it though. It's all automatic.
> When you're not running anything that stressed the CPU, clock speeds
> are actually lower than 4GHz (some CPUs can clock down to 1GHz or so
> when they're idle and not doing anything.) Once something CPU-heavy
> runs, it will clock up to 4.2GHz. If you run something that stresses
> all CPU cores, then it will go to 4.0GHz to avoid overheating.
>
> But again, all this is automatic.
>
>
>


That's good to know.  That I was wondering about and couldn't find a
clear answer on.  I didn't know if I needed to install something to
manage that or what.   At least now I know to install the CPU and it
will do its own thing without me having to worry about it.  BTW, I know
my video card does that too.  The processor on it varies its clock speed
by a fairly wide margin.  Speaking of, I also found a MSI GeForce GTX
650 1GB Video Card.  It is a used card but it is faster I think than my
current 220 series.  Keep in mind, my idea of gaming is Kpatience.  The
biggest load is watching TV.  ;-)

Thanks for the info.  This answers a lot of questions I had.  Makes me
hopeful that this will work like I expect. 

Dale

:-)  :-) 

Reply | Threaded
Open this post in threaded view
|

Re: CPU upgrade and LVM questions.

Dale-46
In reply to this post by Jack
Jack wrote:

> On 2018.12.06 15:58, Dale wrote:
> [snip...]
>> My concern is this tho.  I have my old CPU still installed and
>> everything is compiled based on that.  So, I'm stable with the old
>> CPU.  However, when I shutdown, take out the old CPU and install the
>> new one, I'm concerned it may not boot at all because of the change
>> or may boot but be very unstable.  I recall years ago being able to
>> set up the flags in such a way that it can run on virtually any CPU
>> but it's been a long time ago and I don't know if it is needed or
>> not.  My hope was, someone did a very similar upgrade and can say for
>> sure if it works or if I need to do things before changing the CPUs
>> to make sure I can boot and be stable.  If I can just get a stable
>> console, I can do a emerge -e world and get the OS inline with the
>> CPU.  I'm just concerned whether I will have that or not. 
>>
> [snip...]
>>
>> I just don't want to swap CPUs only to find out I've got to swap back
>> because my system won't boot at all. Heck, it may even fail to load
>> the kernel itself for all I know. 
> I once made the mistake of getting a whole new (used...) PC and just
> moved the HDD from the old one to the new, without thinking about any
> of this.  Of course it wouldn't boot at all, because I was switching
> from an AMD to an Intel CPU and had set all flags accordingly in the
> old box.  In your case, as long as you include any flags necessary for
> the new CPU, and remove any flags for features the new CPU does not
> have, you should be good.  (I know that sounds simple, but does ignore
> how you find that info.)  Given your two CPUs are relatively close
> (unless I misread something) there should be little if anything
> critical to change.
>
> However, if you have a live DVD, (or on USB stick) that will always
> boot, and you can then do a chroot and reset flags and start
> recompiling whatever might fail.   I actually think the kernel IS the
> likely failure if any, but once that boots, you should be good to
> recompile whatever fails.  (Yes, toolchain stuff might be an issue,
> but again, just boot back to the live DVD.)  You may need to reboot a
> few times, but you won't need to swap the old CPU back in.
>
> Jack
>

I've tried that too.  Heck, sometimes that doesn't work even with
windoze.   My concerns are sort of along those lines tho.  I don't have
and can't find the current flags for the new CPU so I don't know what to
do flag wise.  I'm not sure that there is even a common setting but
suspect there is.  If I can get the kernel to boot and login at a
console, even with no X, I can rebuild from there, provided everything
works toolchain wise. 

I guess this is a good time to make sure my sysrescue and other tools
work.  That slipped my mind completely.  Thanks for the reminder.  Hmmm,
I need to check on the current mount and chroot process for this too. 

Thanks.

Dale

:-)  :-) 

Reply | Threaded
Open this post in threaded view
|

Re: CPU upgrade and LVM questions.

Nikos Chantziaras-2
In reply to this post by Dale-46
On 06/12/2018 23:45, Dale wrote:

>>
>> You won't get anything close to double the speed. The extra cores will
>> mostly go unused, unless you use applications that make use of them.
>>
>> You will still get a speed up due to the newer CPU architecture and
>> the higher frequency.
>
> What I was thinking about is something like when compiling and all the
> cores are used.  In other words, CPU is at max load.  Right now, I have
> only 4 cores.  New CPU doubles that and each core is faster as well.  As
> a example, Firefox takes about a hour to compile.  I was hopeful that
> would drop to 30 or 35 minutes or so.

Oh that. Yeah, there will be a 2x speedup when emerging packages
(MAKEOPTS="-j8"). I was referring to application performance when using
the machine. I don't consider package installation as "using the
machine" :-)


>> The two speeds specify the lower and upper speeds, depending on how
>> many CPU cores are currently being under load, and also how much load
>> there is. You don't have to worry about it though. It's all automatic.
>> [...]
>
> That's good to know.  That I was wondering about and couldn't find a
> clear answer on.  I didn't know if I needed to install something to
> manage that or what.

The kernel takes care of that. You should be able to observe the CPU's
frequency and temperature in KSysGuard. Here's how it looks here:

   https://i.imgur.com/Xogy3h0.png

In that screenshot, the CPU has all 4 cores clocked down to 1.6GHz
because they're all mostly idle. Once there's high CPU load, it will
crank up the clocks towards 4GHz.

You need to add these sensors manually to KSysGuard though. But if you
do, it's a good way to verify things are working as intended.


Reply | Threaded
Open this post in threaded view
|

Re: CPU upgrade and LVM questions.

Dale-46
Nikos Chantziaras wrote:

> On 06/12/2018 23:45, Dale wrote:
>>>
>>> You won't get anything close to double the speed. The extra cores will
>>> mostly go unused, unless you use applications that make use of them.
>>>
>>> You will still get a speed up due to the newer CPU architecture and
>>> the higher frequency.
>>
>> What I was thinking about is something like when compiling and all the
>> cores are used.  In other words, CPU is at max load.  Right now, I have
>> only 4 cores.  New CPU doubles that and each core is faster as well.  As
>> a example, Firefox takes about a hour to compile.  I was hopeful that
>> would drop to 30 or 35 minutes or so.
>
> Oh that. Yeah, there will be a 2x speedup when emerging packages
> (MAKEOPTS="-j8"). I was referring to application performance when
> using the machine. I don't consider package installation as "using the
> machine" :-)
>
>

Well, one thing I been doing that uses a LOT of memory and CPU, scanning
images and editing them in Gimp.  The biggest problem was Dolphin and
its memory leak, which at the time I didn't realize was abnormal.  At
one point, just opening the directory with a lot of large images made
Dolphin go crazy with memory usage.  I've since realized that Dolphin
has a bug.  Still, having 32GBs of ram is better since I can now compile
Firefox and others in tmpfs instead of on the hard drive.  That said,
Gimp uses quite a bit CPU power at times too.  I also sometimes convert
videos which can get CPU and/or memory hungry. 


>>> The two speeds specify the lower and upper speeds, depending on how
>>> many CPU cores are currently being under load, and also how much load
>>> there is. You don't have to worry about it though. It's all automatic.
>>> [...]
>>
>> That's good to know.  That I was wondering about and couldn't find a
>> clear answer on.  I didn't know if I needed to install something to
>> manage that or what.
>
> The kernel takes care of that. You should be able to observe the CPU's
> frequency and temperature in KSysGuard. Here's how it looks here:
>
>   https://i.imgur.com/Xogy3h0.png
>
> In that screenshot, the CPU has all 4 cores clocked down to 1.6GHz
> because they're all mostly idle. Once there's high CPU load, it will
> crank up the clocks towards 4GHz.
>
> You need to add these sensors manually to KSysGuard though. But if you
> do, it's a good way to verify things are working as intended.
>
>
>


I use the sensors built into the kernel.  Last time I tried lm-sensors,
I couldn't get it to work right.  I enabled and recompiled the kernel
with the needed drivers and I haven't had any trouble since.  That was
on a previous rig too.  I guess I can cat /proc/cpuinfo to see if it is
working as well.  As long as I can see it is working as it should, I'm
not going to worry about checking it much.  I use gkrellm to monitor my
stuff.  I do check Ksysguard at times tho. 

Right now, I'm waiting on a new fan for my CPU.  I noticed when I turned
the rig back on last time, it was slow to get going.  I had to give it a
little push with my finger.  Since it has a lot of hours on it, I oiled
it a bit to help it along temporarily and ordered a new fan.  I plan to
clean the CPU cooler real good, replace the fan and upgrade the CPU all
at one time.  Then the video card and hard drive stuff after that. 

What I'm doing, upgrading to almost a new system.  I have a Gigabyte 970
mobo.  With the new CPU, video card, memory and such, I should get
several more years unless something burns out.  Looking at newer stuff,
I'm not sure it is worth building a whole new rig at this point. 
Computers seem to have sort of peeked unless you spend lots of money.  I
just wonder what will come next that gives a whole new generation of
computing.  It seems clock speed has pretty much reached its limit or
something. 

Dale

:-)  :-)

Reply | Threaded
Open this post in threaded view
|

Re: CPU upgrade and LVM questions.

Nikos Chantziaras-2
On 07/12/2018 01:23, Dale wrote:
> Nikos Chantziaras wrote:
>> On 06/12/2018 23:45, Dale wrote:
> I also sometimes convert videos which can get CPU and/or memory hungry.

Video encoding is one of the prime example where more cores will scale
very well. You can almost halve encoding time by doubling the amount of
cores.


> I use the sensors built into the kernel.  Last time I tried lm-sensors,
> I couldn't get it to work right.

I don't use lm-sensors either. KSysGuard sees the kernel sensors just
fine without it. You just need to add them in the KSysGuard options.


Reply | Threaded
Open this post in threaded view
|

Re: CPU upgrade and LVM questions.

Dale-46
Nikos Chantziaras wrote:

> On 07/12/2018 01:23, Dale wrote:
>> Nikos Chantziaras wrote:
>>> On 06/12/2018 23:45, Dale wrote:
>> I also sometimes convert videos which can get CPU and/or memory hungry.
>
> Video encoding is one of the prime example where more cores will scale
> very well. You can almost halve encoding time by doubling the amount
> of cores.
>
>
>> I use the sensors built into the kernel.  Last time I tried lm-sensors,
>> I couldn't get it to work right.
>
> I don't use lm-sensors either. KSysGuard sees the kernel sensors just
> fine without it. You just need to add them in the KSysGuard options.
>
>
>


Got it.  I did some digging but I found it.  I had to add a tab and then
add it to that.  I also found the options as well.  There are tons of
things to monitor in there.  Right now, my current CPU is dead on.  It
reads 3200.  Now when I upgrade, I know where to go look.  I can also
compare to what cpuinfo says too. 

Thanks much.

Dale

:-)  :-) 

Reply | Threaded
Open this post in threaded view
|

Re: CPU upgrade and LVM questions.

Corbin Bird
In reply to this post by Dale-46
I don't think a straight 'drop-in/replacement' will boot.

The CPU scheduler does change from 'fam10h' to 'fam15h'.
The '3DNow!' && 'enhanced 3DNow!' ( used in fam10h ) instructions are
dropped / removed in fam15h.

Doing the 'emerge -e @world' with '-march=generic' is probably the only
guaranteed to work solution.

If you take this route set the CPU_FLAGS_X86= to MMX, SSE, SSE2 with no
3DNow!, enhanced 3DNow! ( gcc flags / CFLAGS -mno-3dnow, -mno-3dnowa )

Just remember to change the kernel configuration also.

Reference Links :
https://en.wikipedia.org/wiki/Phenom_II
https://en.wikipedia.org/wiki/List_of_AMD_FX_microprocessors

On 12/6/18 2:58 PM, Dale wrote:

> Hi,
>
> My concern is this tho.  I have my old CPU still installed and
> everything is compiled based on that.  So, I'm stable with the old CPU. 
> However, when I shutdown, take out the old CPU and install the new one,
> I'm concerned it may not boot at all because of the change or may boot
> but be very unstable.  I recall years ago being able to set up the flags
> in such a way that it can run on virtually any CPU but it's been a long
> time ago and I don't know if it is needed or not.  My hope was, someone
> did a very similar upgrade and can say for sure if it works or if I need
> to do things before changing the CPUs to make sure I can boot and be
> stable.  If I can just get a stable console, I can do a emerge -e world
> and get the OS inline with the CPU.  I'm just concerned whether I will
> have that or not. 
>

Reply | Threaded
Open this post in threaded view
|

Re: CPU upgrade and LVM questions.

Dale-46
Corbin Bird wrote:

> I don't think a straight 'drop-in/replacement' will boot.
>
> The CPU scheduler does change from 'fam10h' to 'fam15h'.
> The '3DNow!' && 'enhanced 3DNow!' ( used in fam10h ) instructions are
> dropped / removed in fam15h.
>
> Doing the 'emerge -e @world' with '-march=generic' is probably the only
> guaranteed to work solution.
>
> If you take this route set the CPU_FLAGS_X86= to MMX, SSE, SSE2 with no
> 3DNow!, enhanced 3DNow! ( gcc flags / CFLAGS -mno-3dnow, -mno-3dnowa )
>
> Just remember to change the kernel configuration also.
>
> Reference Links :
> https://en.wikipedia.org/wiki/Phenom_II
> https://en.wikipedia.org/wiki/List_of_AMD_FX_microprocessors
>

That's what I was curious about.  From my understanding, while a CPU
made by the same maker and has the same pin out, they are different
inside as far as what instructions they run.  I think I'll go the
generic route, which is what I was looking for really, and change the
CPU flags as well.  I'll at least do a -e @system run which should get
me a bootable OS.  Once I install the CPU, I can reset back to old march
setting and update the CPU flags to whatever cpuid2cpuflags shows for
the new CPU and rebuild again. 

Sounds like I need to build a new kernel as well. I guess I could name
one with FX in it to be able to tell it from the old one.  I do mine
manually anyway, except for the dracut thingy. 

Thanks much.

Dale

:-)  :-)

Reply | Threaded
Open this post in threaded view
|

Re: CPU upgrade and LVM questions.

Dale-46
Dale wrote:

> Corbin Bird wrote:
>> I don't think a straight 'drop-in/replacement' will boot.
>>
>> The CPU scheduler does change from 'fam10h' to 'fam15h'.
>> The '3DNow!' && 'enhanced 3DNow!' ( used in fam10h ) instructions are
>> dropped / removed in fam15h.
>>
>> Doing the 'emerge -e @world' with '-march=generic' is probably the only
>> guaranteed to work solution.
>>
>> If you take this route set the CPU_FLAGS_X86= to MMX, SSE, SSE2 with no
>> 3DNow!, enhanced 3DNow! ( gcc flags / CFLAGS -mno-3dnow, -mno-3dnowa )
>>
>> Just remember to change the kernel configuration also.
>>
>> Reference Links :
>> https://en.wikipedia.org/wiki/Phenom_II
>> https://en.wikipedia.org/wiki/List_of_AMD_FX_microprocessors
>>
> That's what I was curious about.  From my understanding, while a CPU
> made by the same maker and has the same pin out, they are different
> inside as far as what instructions they run.  I think I'll go the
> generic route, which is what I was looking for really, and change the
> CPU flags as well.  I'll at least do a -e @system run which should get
> me a bootable OS.  Once I install the CPU, I can reset back to old march
> setting and update the CPU flags to whatever cpuid2cpuflags shows for
> the new CPU and rebuild again. 
>
> Sounds like I need to build a new kernel as well. I guess I could name
> one with FX in it to be able to tell it from the old one.  I do mine
> manually anyway, except for the dracut thingy. 
>
> Thanks much.
>
> Dale
>
> :-)  :-)
>


Now this is odd.  I changed the settings and ran emerge.  I decided to
use -UDNa options to see if it would catch the changes.  It did.  Thing
is, outside a few video type packages, there were no packages to be
rebuilt.  It seems very few packages actually notice those settings. 
Given that, I just canceled the emerge since I can rebuild that after I
swap CPUs.  I can deal with ffmpeg being recompiled after I swap CPUs. 

My only question left, will those flags affect the kernel image itself? 
I may just have to make sure my USB stick works. 

Dale

:-)  :-) 

Reply | Threaded
Open this post in threaded view
|

Re: CPU upgrade and LVM questions.

Nikos Chantziaras-2
On 07/12/2018 07:10, Dale wrote:
> Now this is odd.  I changed the settings and ran emerge.  I decided to
> use -UDNa options to see if it would catch the changes.  It did.  Thing
> is, outside a few video type packages, there were no packages to be
> rebuilt.  It seems very few packages actually notice those settings.

That's correct. Some software has compile-time flags to enable/disable
specific CPU features. The ebuilds for that software use CPU_FLAGS_X86
to enable the relevant compile-time flags.

Most software doesn't contain low-level assembly code. Software that
does usually deals with video, audio or graphics, where hand crafted
low-level optimizations by the developers make sense.

If you want to see all of the installed packages that are affected, you
need to set CPU_FLAGS_X86 to an empty string:

   CPU_FLAGS_X86=""

and then do "emerge -puDN --with-bdeps=y @world". This is because
CPU_FLAGS_X86 is not empty by default. It contains sse and sse2 by
default, because these are supported by all 64-bit CPUs.


> My only question left, will those flags affect the kernel image itself?
> I may just have to make sure my USB stick works.

No. The kernel configuration is completely separate from anything in
make.conf. CFLAGS or CPU_FLAGS_X86 do not affect kernel builds.


Reply | Threaded
Open this post in threaded view
|

Re: CPU upgrade and LVM questions.

Dale-46
Nikos Chantziaras wrote:

> On 07/12/2018 07:10, Dale wrote:
>> Now this is odd.  I changed the settings and ran emerge.  I decided to
>> use -UDNa options to see if it would catch the changes.  It did.  Thing
>> is, outside a few video type packages, there were no packages to be
>> rebuilt.  It seems very few packages actually notice those settings.
>
> That's correct. Some software has compile-time flags to enable/disable
> specific CPU features. The ebuilds for that software use CPU_FLAGS_X86
> to enable the relevant compile-time flags.
>
> Most software doesn't contain low-level assembly code. Software that
> does usually deals with video, audio or graphics, where hand crafted
> low-level optimizations by the developers make sense.
>
> If you want to see all of the installed packages that are affected,
> you need to set CPU_FLAGS_X86 to an empty string:
>
>   CPU_FLAGS_X86=""
>
> and then do "emerge -puDN --with-bdeps=y @world". This is because
> CPU_FLAGS_X86 is not empty by default. It contains sse and sse2 by
> default, because these are supported by all 64-bit CPUs.
>

What I did, I commented out the whole line and ran it that way.  I also
tried other settings too.  It didn't list much but all of it was video
related stuff regardless of the setting.  I didn't see anything that
should affect booting or even logging into KDE itself.  I may not be
able to watch videos but I should have a bootable OS and a working GUI
as well it would seem.  Or am I missing something?  It sounds right. 


>
>> My only question left, will those flags affect the kernel image itself?
>> I may just have to make sure my USB stick works.
>
> No. The kernel configuration is completely separate from anything in
> make.conf. CFLAGS or CPU_FLAGS_X86 do not affect kernel builds.
>
>
>


That sounds good.  If the above is true then I should have a bootable
kernel, a bootable OS and most likely a working GUI.  Things like ffmpeg
and mplayer may not work but that can be fixed after the new CPU is
installed.  I'll have the correct flags from the CPU itself at that
point.  Plus it will compile faster anyway.  ;-) 

This is starting to sound good.  All this upgrading and the hardest part
is going to be the hardware itself.  Yeppie!!

Still can't believe LVM is going to be that easy.  I found a howto
someone sent me and read it too.  It still sounds to easy.  Something
has to go wrong here.  Lightening coming out the hard drive or
something.  ROFL  I have Grant's email on standby.  He included a list
of commands.  :-) 

One last question for anyone who has done this recently.  When finished,
I'll have a FX-8350 CPU with 8 cores at 4.0/4.2GHz, 32GBs of memory all
on a Gigabyte 970 series mobo.  Would there be any point in upgrading to
a whole new rig or is what I have about as fast is reasonable to build? 
I don't do gaming or anything.  Even the GTX 650 video card is likely
overkill for what I do here.  The older 200 series card is working just
fine.  On one hand, my current build is several years old.  On the
other, computers seem to have reached their peak.  I'm sure there is
more powerful systems out there but would I be any better off with one?

Thanks to all for the help on this. 

Dale

:-)  :-) 

1234