Debian 9 Recompiling Kernel to 1000HZ

Kernels & Hardware, configuring network, installing services

Debian 9 Recompiling Kernel to 1000HZ

Postby filip212 » 2017-08-07 09:33

Hello,
I need to recompile my kernel on Debian 9 to 1000HZ. I tried this tutorial viewtopic.php?f=16&t=36525 but i have problem. When i try
Code: Select all
 apt-get install kernel-package
result is
Code: Select all
E: Package 'kernel-package' has no installation candidate
filip212
 
Posts: 4
Joined: 2017-08-07 09:26

Re: Debian 9 Recompiling Kernel to 1000HZ

Postby wizard10000 » 2017-08-07 13:00

That thread is eight years old; good on you for searching, but the process has changed.

Debian's installer wiki and installation handbook haven't been updated for Stretch yet - at least not the parts about compiling your own kernel. This would be the best place to look for guidance - http://kernel-handbook.alioth.debian.org/

I don't' know what "recompiling kernel to 1000HZ" means. Can you share a little information about your hardware and why you'd like to roll your own kernel?
we see things not as they are, but as we are.
-- anais nin
User avatar
wizard10000
 
Posts: 1146
Joined: 2011-05-09 20:02
Location: midwestern us

Re: Debian 9 Recompiling Kernel to 1000HZ

Postby filip212 » 2017-08-07 13:40

I have VPS Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz, 4 cores and 12GB RAM.
I need do gameserver counter-strike 1,6 and need 1000FPS stable. Because now is settings in kernel to 250HZ i cant have. On server developers forum they write i need recompile kernel to 1000HZ to get 1000FPS stable server...

I need do this option at recompiling kernel...
# Processor type and features -> Timer frequency -> change to 1000HZ -> Exit -> Exit -> Yes (Save)
filip212
 
Posts: 4
Joined: 2017-08-07 09:26

Re: Debian 9 Recompiling Kernel to 1000HZ

Postby wizard10000 » 2017-08-07 13:56

You really need to check with your VPS provider before proceeding. Most VPS run custom kernels and compiling your own kernel may or may not break your VPS. You could also ask them if they have a realtime kernel available; maybe they've already got one they can install for you.
we see things not as they are, but as we are.
-- anais nin
User avatar
wizard10000
 
Posts: 1146
Joined: 2011-05-09 20:02
Location: midwestern us

Re: Debian 9 Recompiling Kernel to 1000HZ

Postby filip212 » 2017-08-07 14:12

i already tried real time kernel and Liquorix Kernel on this kernels i have more fps but are still unstable and i need stable for this i need to recompile my own kernel... With this kernels no problem have to run VPS. I think there will be no problems. Only dont know how i can recompile it on debian 9
filip212
 
Posts: 4
Joined: 2017-08-07 09:26

Re: Debian 9 Recompiling Kernel to 1000HZ

Postby wizard10000 » 2017-08-07 14:20

filip212 wrote:i already tried real time kernel and Liquorix Kernel on this kernels i have more fps but are still unstable and i need stable for this i need to recompile my own kernel... With this kernels no problem have to run VPS. I think there will be no problems. Only dont know how i can recompile it on debian 9


Look in the kernel handbook linked above.

edit: I just googled a bit and found that the Liquorix kernel is set at 1000Hz. If Liquorix isn't stable it's unlikely you'll be able to configure a kernel that is. But - it's your VPS ;)
we see things not as they are, but as we are.
-- anais nin
User avatar
wizard10000
 
Posts: 1146
Joined: 2011-05-09 20:02
Location: midwestern us

Re: Debian 9 Recompiling Kernel to 1000HZ

Postby dasein » 2017-08-07 17:35

@OP: I notice you've been spamming multiple forums all over the 'Net.

Oddly, you seem not to have implemented several suggestions that you've received in other venues.

If you're going to keep spamming random forums with a question that you don't even understand, then you need to start documenting exactly what you've already tried, along with the exact result(s) for each and every thing you tried, and then providing that information in each new venue where you post.

Hint: "And nothing" is not an exact result. "Didn't work" isn't either.
User avatar
dasein
 
Posts: 7774
Joined: 2011-03-04 01:06
Location: Terra Incantationum

Re: Debian 9 Recompiling Kernel to 1000HZ

Postby stevepusser » 2017-08-07 17:55

i fear you may be suffering from a common misconception about "unstable", because Liquorix uses that in its changelog file. Are you just going by this, or have you actually tried it and found problems with it?

Debian provides built-in tools that you can use to rebuild any package in the repos, and there are many tutorials for doing that. I will let you find them as part of a learning experience instead of spoon feeding you the answers.

Hints: they would involve the "deb-src" lines in your sources, "apt-get source linux-image-$(uname -r)", "apt-get build" and so on. The 1000Hz kernel context switch setting can be accomplished by editing /debian/config/config, currently starting at line 5949:

Code: Select all
##
## file: kernel/Kconfig.hz
##
## choice: Timer frequency
# CONFIG_HZ_100 is not set
CONFIG_HZ_250=y
# CONFIG_HZ_300 is not set
# CONFIG_HZ_1000 is not set
## end choice


It's rather obvious to me what you need to change, but ask if you're not sure.

You probably just want a small increment at the end of the version for your new or modified stanza in the debian/changelog file, so that the next Debian security update will want to upgrade over your modified kernel, and alert you that you need to repeat the procedure with the updated source, so that you can keep up with the security fixes. The current version ends with "deb9u3", so just make it "deb9u3+1000hz" or something. Then "deb9u4" will still upgrade over it. If you want to prevent any upgrades, add or increment an "epoch" to the beginning of the version, as in version "1:4.9.30-2+deb9u3". This means it's up to you to watch for any Debian security updates.

Note that a Debian kernel package rebuild takes several times as long as a generic or Liquorix kernel rebuild, mostly because of the creation of the docs package. Also allow about 20 GB of free space on the drive for the build procedure.

Once you've done this, maybe you could try building and hosting your modified kernel on the openSUSE build service, which can build Debian packages from the source and automatically set up a repository for them. Besides doing all the work of building the kernel for you, this will also allow you to share it with others.

Edit: just saw dasein's response--has anyone else suggested the built-in tools?
The MX Linux repositories: Backports galore! If we don't have something, just ask and we'll try--we like challenges. New packages: AzPainter 2.0.6, Pale Moon 27.4.1, Liquorix kernel 4.11-9, mpv 0.26.0, Kodi 17.3, 0ad 0.0.22, Mesa 13.0.6
User avatar
stevepusser
 
Posts: 8537
Joined: 2009-10-06 05:53

Re: Debian 9 Recompiling Kernel to 1000HZ

Postby filip212 » 2017-08-07 19:27

Im not spamming i asked only here and on server developers forum... Thank you for help i will try and response about result... I think more heads better result... Because they told me i dont need rebuild kernel i need only Grab the process's pid. Then execute the following commands.
chrt -r -p -99 (pid of the process)
renice -19 (pid of the process)

I cant use chrt -r -p -99 (pid of the process) i can use chrt -r -p 99 (pid of the process) and renice -19 (pid of the process) i think he mean renice 19 (pid of the process).
Reason why i still finding recompiling kernel is its not work 100%. After that are fps on server better but still have drops...
With grabbing pids is too problem i must search and using pids of 10 processes and if i will have more servers and other peoples will have permissions to restart start stop it will be problem...

I use this script to start restart stop server... And its run 10 processes... all pids i must manually find and do... Try imagine when i will have 10 or 30 servers... Its unreal to do...
Code: Select all
#! /bin/sh

### BEGIN INIT INFO
# Provides:          cs16jailbreak
# Required-Start:    start
# Required-Stop:     stop
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: CS 1.6 JB
# Description:       Counter Strike 1.6 Jailbreak
### END INIT INFO

# The user that will run the server
CS_USER=jailbreak

# Leave this alone.
NAME=cs16jailbreak

PATH=/bin:/usr/bin:/sbin:/usr/sbin

# DON'T FORGET TO CHANGE THE PATH TO YOUR NEEDS!
DIR=/home/jailbreak/Steam/steamapps/common/Half-Life/

# Leave this alone.
DAEMON=hlds_run

# Internet-server:
PARAMS="-game cstrike -pingboost 2 +sv_lan 0 +ip 173.212.243.187 +port 27016 +maxplayers 24 +map de_dust2 +log on -master +mp_logecho 1 -secure -autoupdate &"

# Leave this alone.
DESC="Counter-Strike JailBreak Server"

. /lib/lsb/init-functions

server_start()
{
    log_daemon_msg "Starting $DESC: $NAME"
    if su $CS_USER -l -c "screen -ls" | grep $NAME;
    then
       log_failure_msg "$DESC: $NAME is already running!"
       exit 1
    else
       su $CS_USER -c "cd $DIR; screen -m -d -S $NAME ./$DAEMON $PARAMS"
       log_end_msg $?
    fi
}

server_stop()
{
    log_daemon_msg "Stopping $DESC: $NAME"
    if su $CS_USER -l -c "screen -ls" | grep $NAME;
    then
       kill `su $CS_USER -l -c "screen -ls" | grep $NAME | awk -F . '{print $1}'|awk '{print $1}'`
       log_end_msg $?
    else
       log_failure_msg "Coulnd't find a running $DESC"
       exit 1
    fi
}

server_status()
{
    if su $CS_USER -l -c "screen -ls" | grep $NAME;
    then
        log_success_msg "$DESC: $NAME is UP"
        exit 0
    else
        log_failure_msg "$DESC: $NAME is DOWN"
        exit 1
    fi
}
case "$1" in
 start)
    server_start
    ;;
 stop)
    server_stop
    ;;
 restart)
    server_stop
    sleep 1
    server_start
    ;;
 status)
    server_status
    ;;
 *)
    echo "Usage: $0 {start|stop|status|restart}"
    exit 1
    ;;
esac

exit 0
filip212
 
Posts: 4
Joined: 2017-08-07 09:26

Re: Debian 9 Recompiling Kernel to 1000HZ

Postby dasein » 2017-08-07 19:43

I guess I should have mentioned that "can't use" is also not specific.

Here's the bottom line: there is a finite number of solutions to any given problem. You claim you've tried them all. Supposedly, none of them works, which means that one of two things is true:

- You aren't applying the fixes correctly (by far the most likely)

- Your problem isn't solvable.

Pick whichever explanation you like.
User avatar
dasein
 
Posts: 7774
Joined: 2011-03-04 01:06
Location: Terra Incantationum


Return to System configuration

Who is online

Users browsing this forum: Onsemeliot and 8 guests

fashionable