Nick Ethier
f897ac79e8
client/ar: thread through cpuset manager
2021-04-13 13:28:36 -04:00
Nick Ethier
03d6eb8205
client: only fingerprint reservable cores via cgroups, allowing manual override for other platforms
2021-04-13 13:28:15 -04:00
Nick Ethier
b8397a712d
fingerprint: implement client fingerprinting of reservable cores
...
on Linux systems this is derived from the configure cpuset cgroup parent (defaults to /nomad)
for non Linux systems and Linux systems where cgroups are not enabled, the client defaults to using all cores
2021-04-13 13:28:15 -04:00
Joel May
2e17610406
Allow client.cpu_total_compute to override attr.cpu.totalcompute
2021-01-07 15:31:11 -05:00
Seth Hoenig
da1235f35b
client/fingerprint/cpu: use fallback total compute value if cpu not detected
...
Previously, Nomad would fail to startup if the CPU fingerprinter could
not detect the cpu total compute (i.e. cores * mhz). This is common on
some EC2 instance types (graviton class), where the env_aws fingerprinter
will override the detected CPU performance with a more accurate value
anyway.
Instead of crashing on startup, have Nomad use a low default for available
cpu performance of 1000 ticks (e.g. 1 core * 1 GHz). This enables Nomad
to get past the useless cpu fingerprinting on those EC2 instances. The
crashing error message is now a log statement suggesting the setting of
cpu_total_compute in client config.
Fixes #7989
2020-12-09 10:35:58 -06:00
Danielle Tomlinson
da48a7eab3
client: Move fingerprint structs to pkg
...
This removes a cyclical dependency when importing client/structs from
dependencies of the plugin_loader, specifically, drivers. Due to
client/config also depending on the plugin_loader.
It also better reflects the ownership of fingerprint structs, as they
are fairly internal to the fingerprint manager.
2018-12-01 17:10:39 +01:00
Alex Dadgar
9a2c2a4f68
client uses passed logger and fix fingerprinters
2018-10-16 16:53:30 -07:00
Alex Dadgar
5e67b37aad
use int64
2018-10-16 15:34:32 -07:00
Preetha Appan
3ca71ae935
Change CPU/Disk/MemoryMB to int everywhere in new resource structs
2018-10-16 16:21:42 -05:00
Alex Dadgar
e30b20e65e
renames
2018-10-04 14:57:25 -07:00
Alex Dadgar
b310a54aa6
Node resources on client
2018-09-29 17:23:41 -07:00
Chelsea Holland Komlo
ba2ebbc7f9
code review fixup
2018-01-31 18:34:03 -05:00
Chelsea Holland Komlo
a9447addd3
add applicable boolean to fingerprint response
...
public fields and remove getter functions
2018-01-31 13:21:45 -05:00
Chelsea Holland Komlo
f5fc20a564
create safe getters and setters for fingerprint response
2018-01-26 11:22:05 -05:00
Chelsea Holland Komlo
5e8151d700
refactor Fingerprint to request/response construct
2018-01-24 11:54:02 -05:00
Michael Schurter
ca38020521
0 compute == error
2017-07-03 14:51:02 -07:00
Michael Schurter
c10f530964
Fix cpu_total_compute override
2017-07-03 14:51:02 -07:00
Alex Dadgar
bfebe1afdc
rename cpu_total_compute and docs
2017-03-14 14:15:49 -07:00
Alex Dadgar
36dc330737
Various fixes
...
This PR:
* Uses Go 1.8 executable lookup
* Stores any err message from stats init method
* Allows overriding of Cpu Compute for hosts where it can't be detected
2017-03-14 12:56:31 -07:00
Kenjiro Nakayama
5e4dbd0ff3
tiny: Fix duplicated error message in CPU fingerprint
2016-08-07 12:49:40 +09:00
Alex Dadgar
f2e28735a5
Treat float as int
2016-06-22 15:09:39 -07:00
Alex Dadgar
d87d988491
Floor CPU MHz and total compute and mark hostname as unique
2016-06-22 15:01:36 -07:00
Sean Chittenden
e26606acfd
Memoize the CPU stats. Error if CPU fingerprinting fails.
2016-06-17 12:13:53 -07:00
Sean Chittenden
e42f7d5c23
Record and use only the first Mhz from the CPU fingerprinter.
...
Assume all cores are the same speed.
2016-06-17 11:06:57 -07:00
Sean Chittenden
b0490efb38
In the debug log, split the unit from the measurement
...
awk(1) friendly is UNIX(tm) friendly.
2016-06-16 23:07:13 -07:00
Sean Chittenden
e0b4f7a080
Warn when we're unable to fingerprint the CPU Mhz
2016-06-16 23:07:13 -07:00
Sean Chittenden
a6dc002415
Explicitly call cpu.Counts() to determine the CPU core count
...
Much safer than counting the number of InfoStat structs returned.
2016-06-16 23:07:13 -07:00
Diptanu Choudhury
445b181fec
Updated gopsutil
2016-05-28 19:42:34 -07:00
Sean Chittenden
a91f41ce14
Establish a floor of one core for the number of cores.
...
In most cases the upstream library [shirou/gopsutil](https://github.com/shirou/gopsutil )
needs to be fixed.
2016-05-09 12:22:40 -07:00
Sean Chittenden
fd9bcabaa8
Emit various debugging information with the results of the fingerprinter
2016-05-09 12:21:51 -07:00
Alex Dadgar
5b067a3e4f
Merge fix
2015-11-05 13:46:02 -08:00
Armon Dadgar
b81105bd09
Change CPU from float64 to int
2015-09-23 11:14:32 -07:00
Chris Bednarski
ca7798268e
Get average frequency of all CPUs so we can do average frequency * cores for total compute
2015-08-27 13:35:54 -07:00
Clint
d05d878dfc
Merge pull request #6 from hashicorp/cpu-resources
...
populate CPU in Node Resources
2015-08-27 15:26:00 -05:00
Chris Bednarski
9a12a00966
Merge pull request #4 from hashicorp/f-storage-fingerprint
...
Add storage fingerprinter
2015-08-27 12:43:18 -07:00
Chris Bednarski
6804ec7450
Changed logs to errors; added data to node.Resources.DiskMB
2015-08-27 12:23:17 -07:00
Clint Shryock
050ee19547
populate CPU in Node Resources
2015-08-27 14:15:56 -05:00
Clint Shryock
4e5dcf5c43
Add cpu.frequency, cpu.totalcompute
2015-08-27 09:19:53 -05:00
Clint Shryock
a0680d95f7
refactor into multiple fingerprints
2015-08-26 16:29:18 -05:00