CPU Rapeing begins.

by on Aug.19, 2020, under Ultimate Edition

I have been building Operating Systems Since 2006. Want to know the most singular program that has impressed me? It is running as I type this.
Parallel mksquashfs: Using 32 processors, at first I thought my god leave me a Core. Everything is still smooth. I wrote an app that utilizes the same technology. It does not stop it keeps opening threads until you have none left and watches for one to complete, only to launch another thread. Until the job is done. The results are phenomenal. The fella that wrote that app had his mindset right.

I am considering dropping the same technology into Repostorm. Why build one deb at a time when you can build 32 at a time? But Glenn, err TheeMahn I only have a Quad core? Results are the same. Software acceleration.

I did tell you I would share the source code with you:

# Snatch the number of CPU Core(s) / threads the end user has.
CORES=$(grep -i "processor" "/proc/cpuinfo" | sed '/model/d' | wc -l)
(( ACTUALCORES = ${CORES} -1 ))
Encapsulate "Number of CPU Core(s) / threads(s) detected: ${CORES}"
Encapsulate "Launching ${CORES} instances to accelerate the building process, please wait."
   for VERSION in {2..6};
do
    for DOT in {0..9}; 
    do
        # How many core do we have running currently?
           RUNNINGINSTANCES=$(ps -C uetheme | wc -l)
        # EXPELL all core, let's go to work, if we have maxed out, wait for one core to finish.
        while [[ "${RUNNINGINSTANCES}" -ge "${CORES}" ]] ;
               do
                RUNNINGINSTANCES=$(ps -C uetheme | wc -l)
               done
        # Yee HAW we have an open core, let's put it to work.
           if [[ "${RUNNINGINSTANCES}" -lt "${CORES}" ]]; then
               INSTANCE=$(( "${RUNNINGINSTANCES}" + 1 ))
               Encapsulate "Launching thread #${INSTANCE}: Populating Ultimate Edition Theme: ${VERSION}.${DOT} (RUNNING INSTANCES: ${RUNNINGINSTANCES})"
               uetheme --setup ${VERSION}.${DOT} wallpaper=${VERSION}.${DOT}.png theme=${VERSION}.${DOT} --suppress & #& allows that to process and continue running through current software hence why the not equal 3 below
           fi        
       done
done
# Wait for the cores to finish, before continuing.
while [[ "${RUNNINGINSTANCES}" -ne "3" ]] ;
   do
    #Encapsulate "Waiting for threads to complete: ${RUNNINGINSTANCES}"
    RUNNINGINSTANCES=$(ps -C uetheme | wc -l)
   done
# I hate this command, but ensures all files are there before continuing.
sync;
# Import Goodies?
for VERSION in {2..6};
do
    for DOT in {0..9}; 
    do
        if [[ -d "${VERSION}.${DOT}" ]]; then
            Encapsulate "Build folder for ${VERSION}.${DOT} found: Importing to Ultimate Edition ${VERSION}.${DOT}/theme"
            cp -T -R "${VERSION}.${DOT}/" "Ultimate Edition ${VERSION}.${DOT}/theme/ultimate-edition-theme-${VERSION}.${DOT}_all/"
        fi
    done
done
sync;
for VERSION in {2..6};
do
    for DOT in {0..9}; 
    do
           RUNNINGINSTANCES=$(ps -C uetheme | wc -l)
        while [[ "${RUNNINGINSTANCES}" -ge "${CORES}" ]] ;
               do
                RUNNINGINSTANCES=$(ps -C uetheme | wc -l)
               done
           if [[ "${RUNNINGINSTANCES}" -lt "${CORES}" ]]; then
               INSTANCE=$(( "${RUNNINGINSTANCES}" + 1 ))
               Encapsulate "Launching thread #${INSTANCE}: Building Ultimate Edition Theme: ${VERSION}.${DOT} deb(s) (RUNNING INSTANCES: ${RUNNINGINSTANCES})"
               uetheme --builddebs ${VERSION}.${DOT}  --suppress &
           fi        
       done
done
while [[ "${RUNNINGINSTANCES}" -ne "3" ]] ;
   do
    #Encapsulate "Waiting for threads to complete: ${RUNNINGINSTANCES}"
    RUNNINGINSTANCES=$(ps -C uetheme | wc -l)
   done
sync;
TOTALDEBS=0
for VERSION in {2..6};
do
    for DOT in {0..9}; 
    do
        if [[ -d "Ultimate Edition ${VERSION}.${DOT}" ]]; then
            Encapsulate "Scanning Ultimate Edition ${VERSION}.${DOT} for successful builds."
            cd "Ultimate Edition ${VERSION}.${DOT}" || exit 1;
            find . -name "*.deb" -type f -exec mv {} . \;
            sync;
            DEBS=(./*.deb)
            COUNTDEBS="${#DEBS[@]}"
            (( TOTALDEBS += ${COUNTDEBS} ))
            Encapsulate "Found ${COUNTDEBS} perfect deb(s) in ${PWD}"
            cd "${INFOLDER}" || exit 1;
        fi
    done
done
Timer "Stop"

What does it look like in principal?
Launching thread #32: Populating Ultimate Edition Theme: 5.7 (RUNNING INSTANCES: 31)

Oh, that is right I am writing software to make all our themes perfect & I do mean perfect. Why not take advantage of CPU cores? I am a CPU rapeist. I highly suggest you pay attention to the code. Cores will only increase here going forward. They have maxed out on your GHZ, unless you want to drop Liquid Nitrogen on your chip. I am right. Why do you think AMD is so successful? Brought the Giant down, as soon as software catches up, I just provided you an example above.

Do not think Intel is now heading that way. They will make “chiplets” and stear away from monolithic design. Even though Intel said in the past, a stupid design by AMD. Eat it Intel. Yes, I also know 3D stacking of chips err chiplets are inbound.

You will find out I am very knowledgeable. I have a Genius IQ.

TheeMahn,


Leave a Reply

You must be logged in to post a comment.

Back to top ↑