LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 10-17-2022, 09:37 PM   #1
Ansen
LQ Newbie
 
Registered: Oct 2022
Posts: 17

Rep: Reputation: 0
Question what is difference between performance and frequency of processers


There are two concepts in cpufreq framework:
1. performance
2. frequency

But only the frequency is the real variable to adjust the cpu's.
What is different between them ?
 
Old 10-18-2022, 12:04 AM   #2
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,223

Rep: Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320
Well, uh, you know how computers used to have a turbo button?
 
Old 10-18-2022, 01:06 AM   #3
Ansen
LQ Newbie
 
Registered: Oct 2022
Posts: 17

Original Poster
Rep: Reputation: 0
I have no idea about the button.
 
Old 10-18-2022, 04:24 AM   #4
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,841

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
https://en.wikipedia.org/wiki/Turbo_button
https://www.kernel.org/doc/html/late...m/cpufreq.html
 
1 members found this post helpful.
Old 10-18-2022, 08:40 AM   #5
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
In a nutshell: How performant a processor is depends upon it's clock speed (how many things it can do per second) and the number of clock cycles (things it does) one instruction takes.
So, say a processor is working at two cycles per second 2Hz and the operation of adding two numbers together takes two clock cycles - that CPU will only be that same speed, in reality, as one which is working at 1Hz but can add in one clock cycle.
Modern processors of the x86 variety actually do more that just simple arithmetic per clock cycle and how much they can do per clock cycle is a big factor in how well they actually perform.
 
Old 10-18-2022, 10:23 PM   #6
Ansen
LQ Newbie
 
Registered: Oct 2022
Posts: 17

Original Poster
Rep: Reputation: 0
In Linux Source Code, especially intel_pstate.c, to adjuest cpu's with Performance value, frequency value or pstate value.
So how to know when to choice, when I want to adjuest cpu's?
 
Old 10-19-2022, 12:59 AM   #7
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,841

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
what kind of file is this intel_pstate.c ? where is it from? Does it have some documentation?
 
Old 10-19-2022, 01:24 AM   #8
Ansen
LQ Newbie
 
Registered: Oct 2022
Posts: 17

Original Poster
Rep: Reputation: 0
https://elixir.bootlin.com/linux/lat...intel_pstate.c

I read this file written by C language. I don't know the different between them, and how to choise one for cpu.

Last edited by Ansen; 10-19-2022 at 01:39 AM.
 
Old 10-19-2022, 08:52 AM   #9
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,223

Rep: Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320
Quote:
Originally Posted by Ansen View Post
There are two concepts in cpufreq framework:
1. performance
2. frequency

But only the frequency is the real variable to adjust the cpu's.
What is different between them ?
Are you asking what these words mean?

This covers it nicely:

https://en.wikipedia.org/wiki/Clock_rate

Last edited by dugan; 10-19-2022 at 08:56 AM.
 
Old 10-19-2022, 08:08 PM   #10
Ansen
LQ Newbie
 
Registered: Oct 2022
Posts: 17

Original Poster
Rep: Reputation: 0
frequency is the clock rate or clock speed when cpu is running.
P state is a combination of voltage and frequency.
But I don't know how to understand performance. The performance is an alias for Pstate?

Last edited by Ansen; 10-19-2022 at 08:10 PM.
 
Old 10-19-2022, 11:53 PM   #11
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,841

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
https://en.wikipedia.org/wiki/Computer_performance
 
1 members found this post helpful.
Old 10-20-2022, 08:15 PM   #12
Ansen
LQ Newbie
 
Registered: Oct 2022
Posts: 17

Original Poster
Rep: Reputation: 0
Thanks All for answers.
According to the documents you have provided and analyzing source code of Linux, I think Performance is a mathematical abstraction and an intermediate variable used for calculating.
 
Old 10-22-2022, 04:39 PM   #13
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,223

Rep: Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320
Quote:
Originally Posted by Ansen View Post
The performance is an alias for Pstate?
The P in p-state is not short for performance. It's short for power. Power as in the electricity that gets used by the CPU.

My understanding of how these relate is the common one: that as power and frequency increase, "performance" (see the Wikipedia article above for the definition) also increases.

Last edited by dugan; 10-22-2022 at 04:44 PM.
 
Old 10-25-2022, 02:58 AM   #14
Ansen
LQ Newbie
 
Registered: Oct 2022
Posts: 17

Original Poster
Rep: Reputation: 0
14.2
P-STATE HARDWARE COORDINATION
The Advanced Configuration and Power Interface (ACPI) defines performance states (P-states) that are used to
facilitate system software’s ability to manage processor power consumption. Different P-states correspond to
different performance levels that are applied while the processor is actively executing instructions. Enhanced Intel
SpeedStep Technology supports P-states by providing software interfaces that control the operating frequency and
voltage of a processor.

That copied from "Intel 64 and IA-32 Architectures Software Developer's Manual".
It's to metion: performance states (P-states)
 
Old 10-26-2022, 07:42 AM   #15
zeebra
Senior Member
 
Registered: Dec 2011
Distribution: Slackware
Posts: 1,830
Blog Entries: 17

Rep: Reputation: 638Reputation: 638Reputation: 638Reputation: 638Reputation: 638Reputation: 638
Quote:
Originally Posted by Ansen View Post
In Linux Source Code, especially intel_pstate.c, to adjuest cpu's with Performance value, frequency value or pstate value.
So how to know when to choice, when I want to adjuest cpu's?
Screw Intel_Pstate.. Add
Code:
intel_pstate=disable
to your bootline, and it will use acpi-cpufreq driver instead. With this driver you can do alot more with your cpufreq and frequency scaling in general.
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Set Clock Frequency on a Frequency Scaling Disabled Kernel mobin.seven Linux - Kernel 3 02-18-2017 10:33 PM
[SOLVED] Have 2 old XP and vista laptops both have dual processers. Which Mint best for them? Zupe Linux Mint 29 09-26-2016 06:24 PM
Is there much of a difference in performance between x86 and amd64 distros? Cultist Linux - General 9 09-08-2010 08:08 PM
Difference between SUSE 10.0 X86 and X86/64 performance ausm SUSE / openSUSE 2 12-13-2005 03:53 PM
difference between CPU speed and System clock frequency raees Linux - Software 1 04-26-2005 06:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 08:38 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration