Hello!
I noticed that in one of my clusters which happens to be of RaspberryPi 4’s I don’t see memory stats for any allocation. The chart is empty and using cli shows 0 Bytes too. Any ideas why? am I missing something obvious?
> nomad alloc status -stats 30700f94
...
Memory Stats
Cache Max Usage RSS Swap Usage
0 B 0 B 0 B 0 B 0 B
...
Nomad version 1.2.2
Raspberry PI 4 (arm64)
Ubuntu 20.04.2 LTS
Thanks
ravi
December 15, 2021, 2:18pm
2
I have been recently reading about their plugin system. Plugins allow Nomad to see HW on the PC.
I suppose it’s not default naming on the PI and may require some edits to the plugin. I’m not sure where the default location is though sorry.
lgfa29
December 15, 2021, 5:01pm
3
Hi @jcalonso
Could you check if the Nomad agent is running as sudo
? It may not have enough privileges to read system information.
Thanks!
Hi @lgfa29
I have Nomad running as root. Since its a homelab setup I have just 3 pi’s and each of them run as server and client (one single systemd unit doing both). Will this be a problem?
Might be related, but I think fingerprinting on aarch64
(amd64
) has been a bit iffy.
Does the agent report the cpu MHz correctly?
For aarch64
, I have this in my code to calculate the total cpu compute for quite some time:
(info farmed from GitHub issues, of course)
current_speed=$(dmidecode -t 4 | grep 'Current Speed:' | awk '{print $3}')
cpu_count=$(cat /proc/cpuinfo | grep 'processor' | wc -l)
CPU_TOTAL_COMPUTE=$(( $current_speed * $cpu_count ))
lgfa29
December 16, 2021, 3:32pm
6
Nope, it shouldn’t be a problem. Client fingerprinting should still work
That’s interesting! Did you notice bad fingerprinting in Nomad specifically or just in general?
haimgel
December 17, 2021, 1:14am
7
This could be because memory cgroups are not enabled. You could check if you have messages about cgroups in your logs, or try the solution proposed here: kubernetes - Enabling memory cgroup in Ubuntu 20.04 - Ask Ubuntu
@shantanugadgil cpu Mhz are fine.
I also noticed that in the client view the memory displays fine, so the issue is just per allocation.
@haimgel
Does this looks ok to you?
grep mem /proc/cgroups
memory 0 62 0
The code in my config is based on this:
opened 02:44PM - 12 May 17 UTC
closed 10:13PM - 03 Jul 17 UTC
type/bug
theme/client
If you have a question, prepend your issue with `[question]` or preferably use t… he [nomad mailing list](https://www.nomadproject.io/community.html).
If filing a bug please include the following:
### Nomad version
Output from `nomad version`
Nomad v0.5.6
### Operating system and Environment details
SUSE 12
s390x
### Issue
The client stanza variable cpu_total_compute is not working. There is no MHZ variable in /proc/cpuinfo. So the MHZ defaults to zero. I wish to set that value using this cput_total_compute but it does not change the value. I have also tried in a VM running in an x86 VM using VirtualBox without any luck.
### Reproduction steps
Create a client configuration with the value set.
client {
enabled = true
servers = ["x.x.x.x"]
cpu_total_compute = 4200
}
Run nomad.
nomad node-status --verbose <node_id>
cpu.totalcompute = 0
### Nomad Server logs (if appropriate)
### Nomad Client logs (if appropriate)
### Job file (if appropriate)
Last I was wrangling with this was here:
opened 06:25PM - 30 Apr 18 UTC
type/enhancement
theme/fingerprint
theme/client
theme/platform-arm
ARM chipsets sparsely populate `/proc/cpuinfo` and often cause `cpu_total_comput… e` fingerprinting to fail.
`dmidecode` is a viable fallback when `/proc/cpuinfo` does not contain the necessary information:
```shell
$ dmidecode -t 4
# dmidecode 3.0
Getting SMBIOS data from sysfs.
SMBIOS 3.0.0 present.
Handle 0x0400, DMI type 4, 42 bytes
Processor Information
Socket Designation: CPU 0
Type: Central Processor
Family: Other
Manufacturer: QEMU
ID: 00 00 00 00 00 00 00 00
Version: 1.0
Voltage: Unknown
External Clock: Unknown
Max Speed: 2000 MHz
Current Speed: 2000 MHz
Status: Populated, Enabled
Upgrade: Other
L1 Cache Handle: Not Provided
L2 Cache Handle: Not Provided
L3 Cache Handle: Not Provided
Serial Number: Not Specified
Asset Tag: Not Specified
Part Number: Not Specified
Core Count: 1
Core Enabled: 1
Thread Count: 1
Characteristics: None
...
```
See https://github.com/hashicorp/nomad/issues/2638#issuecomment-385239401 for details and thanks to @balupton for the suggestion!
maybe it has been fixed now, I haven’t rechecked.
haimgel
December 17, 2021, 4:12pm
10
@shantanugadgil nope.
The third column is “enabled”, it’s zero in your case, e.g. memory cgroups are disabled.
Thanks @haimgel enabling cgroups did the trick.
This is what I did:
echo -n " cgroup_enable=cpuset cgroup_enable=memory cgroup_memory=1" >> /boot/firmware/cmdline.txt
reboot