Skip to content

Commit 8e3b7d1

Browse files
committed
uploaded comparing PCs with terminal commands.md
1 parent 13c4e3b commit 8e3b7d1

File tree

1 file changed

+122
-0
lines changed

1 file changed

+122
-0
lines changed
Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
---
2+
title: comparing PCs with terminal commands
3+
date: 2024-12-12
4+
tags:
5+
- pc-building
6+
- scripting
7+
- visualisation
8+
---
9+
I was given an old computer. I'd quite like to make a computer to use in my studio, and take my tower PC home to play video games (mainly/only local coop games like [Wilmot's Warehouse](https://www.wilmotswarehouse.com/), [Towerfall Ascension](https://maddymakesgamesinc.itch.io/towerfall), or [Unrailed](https://unrailed-game.com/unrailed.html), and occasionally [Gloomhaven](https://store.steampowered.com/app/780290/Gloomhaven/)).
10+
11+
It's not the best, and I'd like to know what parts I would want to replace to make it suit my needs (which are vaguely "can use a modern web browser" without being slow).
12+
13+
By searching the web, I found these commands to collect hardware information for a computer:
14+
15+
```bash
16+
uname -a # vague computer information
17+
lscpu # cpu information
18+
df -h # hard drive information
19+
sudo dmidecode -t bios # bios information
20+
free -h # memory (RAM) info
21+
lspci -v | grep VGA -A11 # GPU info (1)
22+
sudo lshw -numeric -C display # GPU info (2)
23+
```
24+
25+
I also found these commands to benchmark some things:
26+
27+
```bash
28+
sudo apt install sysbench glmark2
29+
# benchmark CPU
30+
sysbench --test=cpu run
31+
# benchmark memory
32+
sysbench --test=memory run
33+
# benchmark graphics
34+
glmark2
35+
```
36+
37+
I put the output of all of these commands into text files for each computer, into a directory that looks like:
38+
39+
```text
40+
├── ./current
41+
│   ├── ./current/benchmarks
42+
│   │   ├── ./current/benchmarks/cpu
43+
│   │   ├── ./current/benchmarks/gpu
44+
│   │   └── ./current/benchmarks/memory
45+
│   ├── ./current/bios
46+
│   ├── ./current/cpu
47+
│   ├── ./current/disks
48+
│   ├── ./current/gpu
49+
│   ├── ./current/memory
50+
│   └── ./current/uname
51+
└── ./new
52+
├── ./new/benchmarks
53+
│   ├── ./new/benchmarks/cpu
54+
│   ├── ./new/benchmarks/gpu
55+
│   └── ./new/benchmarks/memory
56+
├── ./new/bios
57+
├── ./new/cpu
58+
├── ./new/disks
59+
├── ./new/gpu
60+
├── ./new/memory
61+
└── ./new/uname
62+
4 directories, 19 files
63+
```
64+
65+
Then, I ran this command to generate a diff file to look at:
66+
67+
```bash
68+
echo "<html><head><style>html {background: black;color: white;}del {text-decoration: none;color: red;}ins {color: green;text-decoration: none;}</style></head><body>" > compare.html
69+
while read file; do
70+
f=$(echo "${file}" | sed 's/current\///')
71+
git diff --no-index --word-diff "current/${f}" "new/${f}"
72+
| sed 's/\[\-/<del>/g' | sed 's/-\]/<\/del>/g'
73+
| sed -E 's/\{\+/<ins>/g' | sed -E 's/\+\}/<\/ins>/g'
74+
| sed '1s/^/<pre>/' | sed '$a</pre>'
75+
done <<< $(find current/ -type f) >> compare.html
76+
echo "</body></html>" >> compare.html
77+
```
78+
79+
then I could open that html file and look very easily at the differences between the computers. Here is a snippet of the file as an example:
80+
81+
<div id="comparing-pcs-diff-section">
82+
<style>
83+
#comparing-pcs-diff-section > pre {background: black;color: white;}
84+
#comparing-pcs-diff-section del {text-decoration: none;color: red;}
85+
#comparing-pcs-diff-section ins {color: green;text-decoration: none;}
86+
</style>
87+
<pre>CPU(s): <del>12</del><ins>6</ins>
88+
On-line CPU(s) list: <del>0-11</del><ins>0-5</ins>
89+
Vendor ID: <del>AuthenticAMD</del><ins>GenuineIntel</ins>
90+
Model name: <del>AMD Ryzen 5 1600 Six-Core Processor</del><ins>Intel(R) Core(TM) i5-9400F CPU @ 2.90GHz</ins>
91+
CPU family: <del>23</del><ins>6</ins>
92+
Model: <del>1</del><ins>158</ins>
93+
Thread(s) per core: <del>2</del><ins>1</ins>
94+
Core(s) per socket: 6
95+
Socket(s): 1
96+
</pre>
97+
<pre>Latency (ms):
98+
min: <del>0.55</del><ins>0.71</ins>
99+
avg: <del>0.57</del><ins>0.73</ins>
100+
max: <del>1.62</del><ins>1.77</ins>
101+
95th percentile: <del>0.63</del><ins>0.74</ins>
102+
sum: <del>9997.51</del><ins>9998.07</ins>
103+
</pre>
104+
<pre>
105+
glmark2 2021.02
106+
=======================================================
107+
OpenGL Information
108+
GL_VENDOR: <del>AMD</del><ins>Mesa</ins>
109+
GL_RENDERER: <del>AMD Radeon RX 580 Series (radeonsi, polaris10, LLVM 15.0.7, DRM 3.57, 6.9.3-76060903-generic)</del><ins>NV106</ins>
110+
GL_VERSION: <del>4.6</del><ins>4.3</ins> (Compatibility Profile) Mesa 24.0.3-1pop1~1711635559~22.04~7a9f319
111+
...
112+
[loop] fragment-loop=false:fragment-steps=5:vertex-steps=5: FPS: <del>9303</del><ins>213</ins> FrameTime: <del>0.107</del><ins>4.695</ins> ms
113+
[loop] fragment-steps=5:fragment-uniform=false:vertex-steps=5: FPS: <del>8108</del><ins>144</ins> FrameTime: <del>0.123</del><ins>6.944</ins> ms
114+
[loop] fragment-steps=5:fragment-uniform=true:vertex-steps=5: FPS: <del>7987</del><ins>240</ins> FrameTime: <del>0.125</del><ins>4.167</ins> ms
115+
=======================================================
116+
glmark2 Score: <del>7736</del><ins>203</ins>
117+
</pre>
118+
</div>
119+
120+
It seems like the big limiting factor is the GPU. Everything else seems reasonable to leave in there.
121+
122+
As ever, I find `git diff --no-index` a highly invaluable tool.

0 commit comments

Comments
 (0)