Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 192132 - genlop -q cannot find CPU at gentoo.linuxhowtos.org
Summary: genlop -q cannot find CPU at gentoo.linuxhowtos.org
Status: CONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Tools (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Portage Tools Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-09-11 12:12 UTC by Tim Boundy
Modified: 2021-11-12 22:07 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Boundy 2007-09-11 12:12:57 UTC
In some cases, genlop sends the wrong query string to gentoo.linuxhowtos.org due to the inconsistency in the naming convention in the database (some are prefixed with the number of CPUs, some aren't).
Modifying line 535 of genlop:
--my $cpuname = $pcpu . "x $modelname $cachesize";
++my $cpuname = "$modelname $cachesize";
fixes the problem on my machine, but will break machines that have the CPU stored with the prefix on the database. As a workaround, it should be possible to try one query string format then try the other if it fails, but a more correct solution would be to fix the consistency of the naming on the database.

Reproducible: Always

Steps to Reproduce:
1.genlop -qt openoffice


Actual Results:  
Your CPU is not yet known, please add it by following the instructions on http://gentoo.linuxhowtos.org/compiletimeestimator/

Expected Results:  
Estimated merge time: 4 hours, 35 minutes and 38 seconds.

genlop version 0.30.7

# cat /proc/cpuinfo
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 14
model name      : Genuine Intel(R) CPU           T2250  @ 1.73GHz
stepping        : 8
cpu MHz         : 1733.000
cache size      : 2048 KB
physical id     : 0
siblings        : 2
core id         : 0
cpu cores       : 2
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 10
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe constant_tsc pni monitor est tm2 xtpr
bogomips        : 3461.85
clflush size    : 64
(second core omitted for clarity)

# emerge --info
Portage 2.1.3.9 (default-linux/x86/2006.1/desktop, gcc-4.2.0, glibc-2.6.1-r0, 2.6.22-suspend2-r1 i686)
=================================================================
System uname: 2.6.22-suspend2-r1 i686 Genuine Intel(R) CPU T2250 @ 1.73GHz
Timestamp of tree: Tue, 11 Sep 2007 06:50:01 +0000
app-shells/bash:     3.2_p17-r1
dev-java/java-config: 1.3.7, 2.0.33-r1
dev-lang/python:     2.5.1-r2
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 2.0.0_rc4-r1
sys-apps/sandbox:    1.2.18.1
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.18.50.0.1
sys-devel/gcc-config: 1.4.0-r2
sys-devel/libtool:   1.5.24
virtual/os-headers:  2.6.22-r2
ACCEPT_KEYWORDS="x86 ~x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=prescott -O2 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/splash /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-march=prescott -O2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks metadata-transfer sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://linux.citylink.co.nz/gentoo http://mirror.pacific.net.au/linux/Gentoo"
LC_ALL="en_US.utf8"
LINGUAS="en"
MAKEOPTS="-j4"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.au.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi aiglx alsa arts asf audiofile bash-completion berkdb bitmap-fonts branding bzip2 cairo calendar cdr cli cracklib crypt dbus dri dvd dvdr dvdread emboss encode esd fam fbsplash ffmpeg firefox flac foomaticdb fortran ftp gdbm gif gpm gtk hal iconv idn imagemagick imap imlib ip1000 iproute2 ipv6 isdnlog jabber java javascript jpeg kde kdeenablefinal kdexdeltas kerberos lcd libwww logrotate mad midi mikmod mime mmx mmxext mng mono mozbranding mozilla mozsvg mp3 mpeg mplayer msn mudflap ncurses nls nptl nptlonly nsplugin ntfs offensive ogg ogvorbis opengl openmp oss pam pcmcia pcre pdf perl png posix ppds pppd python qt qt3 qt4 quicktime rdesktop readline reflection reiserfs samba sdl servicetools session spell spl sse sse2 ssl svg tcpd theora threads tiff truetype truetype-fonts type1-fonts unicode usb vim vim-syntax vorbis wifi win32codecs wxwindows x86 xine xinerama xml xml2 xorg xosd xpm xscreensaver xv xvid zlib" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard mouse synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en" LIRC_DEVICES="streamzap" USERLAND="GNU" VIDEO_CARDS="vesa i810"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Zoltan Puskas 2020-08-02 04:01:01 UTC
This is still an issue apparently, so the bug is technically valid. 

However looking through the CPU list at http://gentoo.linuxhowtos.org/compiletimeestimator/, it does not seem people have been submitting recent CPU-s to the database (probably neither build times).

Does anyone still rely on this online database? 
- If yes, beyond fixing the CPU naming issue, probably there should be a way to automatically submit results to the database rather then emailing `genlop -ntl` outputs.
- If not (more likely this is the case) then rather fixing this, removing the online query feature would make more sense.
Comment 2 Zoltan Puskas 2020-08-02 04:13:03 UTC
One more note regarding this feature. Even if we had auto-submit, the dataset would be relatively low confidence at this point. Why?
- People use different type of SSD-s which are faster than HDD (not sure though if people still use HDDs as their main drive),
- Some people compile in tmpfs,
- Some people use distcc,
- Cloud computing is now a thing,
- Multicore systems are everywhere, users `-j` settings will heavily affect results.

Thus genlop compile times are really comparable on a given host configuration not really across many hosts, even if they have the same CPU. So for the previously mentioned reasons as well what is listed above I'd vote for removing the query feature from genlop.

Any and all opinions are welcome.
Comment 3 korte 2021-11-12 22:07:26 UTC
Imho the feature should be removed or renewed and the DB should be put on a gentoo server. The database could be created on a (maybe protected) wiki page or a text file in a git repo.

When installing gentoo on weak computers, like a RaspberryPi 400, the DB would be of use. I submitted values to gentoo.linuxhowtos.org, but they didn't get enlisted.

using tcpdump: /query.php?cpuname=1x%20%20&vcpu=4&packetname=libreoffice

The cpustring creation doesn't fit to the Pi400.

It should be more like: "4x BCM2835 ARMv8, Raspberry Pi 400 Rev 1.0" or "Raspberry Pi 400 Rev 1.0, 4x BCM2835 ARMv8"

details like ccache, distcc, CPU speed (over-/underclocked), (non-)rotational media, RAM, max RAM used, emerge -jx, MAKEOPTS="-jy" would be of use.

a manually "compressed" cpuinfo:

processor       : 0-3
BogoMIPS        : 108.00
Features        : fp asimd evtstrm crc32 cpuid
CPU implementer : 0x41
CPU architecture: 8
CPU variant     : 0x0
CPU part        : 0xd08
CPU revision    : 3

Hardware        : BCM2835
Revision        : XXXXXX
Serial          : XXXXXXXXXXXXXXXX
Model           : Raspberry Pi 400 Rev 1.0



From app-portage/genlop-0.30.10-r2 /usr/bin/genlop line 547

        open(my $cmdline, "/proc/cpuinfo");
        while (<$cmdline>)
        {
                if (m/processor\s*:\s*(\d*)/)
                {
                        $vcpu = $1 if ($1 > $vcpu);
                }
                if (m/model name\s*:\s*(.*)$/)
                {
                        $modelname = $1;
                }
                if (m/cache size\s*:\s*(.*)$/)
                {
                        $cachesize = $1;
                }
                if (m/physical id\s*:\s*(\d*)$/)
                {
                        $pcpu++ if ($1 != $opcpu);
                        $opcpu = $1;
                }
        }
        $vcpu++;
        $pcpu = 1 if ($pcpu == 0);
        my $cpuname = $pcpu . "x $modelname $cachesize";
        $cpuname =~ s/ /%20/g;
        my $retval = LWP::Simple::get("http://gentoo.linuxhowtos.org/query.php?cpuname=$cpuname&vcpu=$vcpu&packetname=$packet");