forum

How to optimize osu! from random lagging moment

posted
Total Posts
2
Topic Starter
Parky4373
We uses a lot of programs while running windows, but sometimes they uses a lot of computer resource, so it sometimes give us lag. To reduce the lag, I recommend you to use it.
  1. spoiler parts are optional stuffs, so if you are busy, you don't have to read them at all.
  2. This guide is for 2/4 Core CPU. (but can be applied for more then 6)
  3. This guide won't reduce the whole delay. What I wrote is for lag that happens all of a sudden.
  4. I will manually set numbers using my best experience, but you can freely change /affinity number depends on your system / total core count / programs you run / ect.
  5. <parameters> will be used for system-depends stuffs. Make sure you remove <> stuffs to write on there.
  6. Make sure you make a file that will contain several files. I will take C:\BatchFiles as an example.
  7. You must Change Save as type as All files (*.*) EVERY TIME YOU SAVE FILES or it won't work as you expected.
Before it starts, Search Notepad on the windows search bar and run it, and write

@echo off

to it. We will add several stuffs on here to optimize, so stay keep that text file!

What is Processor Affinity, and what does the number means next to /affinity?
Processor Affinity defines which core will be used for each of the program. Unless application set that before automatedly, default setting is all core.
The numbers next to /affinity means the core that will be used. Its value different depends on the computer's core count, regardless it uses exactly same core number.
I will give you some core numbers example for 2/4 Core CPU.

* All cpu core starts with 0, not 1.
 

If you play osu! with window mode...

If you play osu! with window mode, a process called Desktop Windows Manager(dwm.exe) will use your computer resource a lot. That process uses quite a lot of computer resource, but we do need it. So, we should run it with different core.

  1. Open Notepad and write this.

    1. 4 core
      @echo off
      powershell "$Process = Get-Process dwm; $Process.ProcessorAffinity=3"
    2. 2 core
      @echo off
      powershell "$Process = Get-Process dwm; $Process.ProcessorAffinity=0"
     
  2. Save it as dwmOptimize.bat.
  3. Open Notepad again and write this.

    Set objShell = CreateObject("Shell.Application")
    objShell.ShellExecute "C:\BatchFiles\dwmOptimize.bat", "/c lodctr.exe /r" , "", "runas", 0
  4. Save it as dwmOptimize.vbs
  5. Search Task Scheduler on the windows search bar and open it.
  6. Click Create Task...




  7. Back to Notepad that opened at 1st, and write schtasks /run /TN "dwm2Core". This command will be used to write main script to run osu.
 

If you use Graphics Tablet for playing osu!

You can skip this when you play osu! with Fullscreen mode.

Usually, Graphics Tablet doesn't get cursor movement directly, and it usually use 1 Process. To prevent it from lagging / delays comes from core-to-core delay, I'd rather put it at the same core what osu! runs. But if you don't want to, by checking Processor Affinity tips, you can change the core as different core.
  1. Check the Driver's process name. Open Task Manager by Ctrl+Shift+Esc, and Click More Details, and click CPU tab once.
  2. Try to hover pen and move fast (like when you faced a spinner) and check the cpu tab in detail. Some process like TabletDriverCore.exe / Wacom_Tablet.exe / ect will be suddenly appeared to the top (or become high enough). Note that <Driver process name> as TabletDriverCore / Wacom_Tablet / ect stuffs without .exe
  3. Back to the Notepad that opened at 1st, and write

    1. 4 core
      powershell "$Process = Get-Process <Driver process name>; $Process.ProcessorAffinity=8"
    2. 2 core
      powershell "$Process = Get-Process <Driver process name>; $Process.ProcessorAffinity=1"
Optional optimize for tablet driver itself
If you'd like to optimize tablet driver, you'd better make a new script and set it as startup program.
  1. Right-click <Driver process name>.exe and select Go to details.
  2. Right-click the value that it focused and select Open File location.
  3. Note that <path> as the file's path that you can copy at the address bar of the File Manager, and <file> as file name include .exe
  4. Open Notepad and write below.

    1. 4 core
      @echo off
      start /abovenormal /d "<path>" /b <file> /affinity 8
    2. 2 core
      @echo off
      start /abovenormal /d "<path>" /b <file> /affinity 1
     
  5. Save it as DriverStart.bat
  6. Open Notepad again and write below.


    (Sorry for inconvenience, osu! denies to post those text when I write directly on here.)
  7. save it as DriverStart.vbs
  8. Create Shortcut about DriverStart.vbs and cut it.
  9. Press Win+R and type shell:startup and press Enter.
  10. Paste Shortcut on the file.

If you use Chrome / Discord while playing osu!

For Chrome / Discord case, it usually takes sooooooooo many tasks to run. And if we apply above settings, that command won't work.
I HIGHLY recommend you to apply this settings for Discord, since it usually takes quite a lot of cpu resource even on background.
  1. Check the processor's name and mark it as <process> without .exe part. It usually as same as the product's name, but double-check it.
  2. Back to the Notepad that opened at 1st, and write
    1. 4 core
      Powershell "ForEach($PROCESS in GET-PROCESS <process>) { $PROCESS.ProcessorAffinity=4}"
    2. 2 core
      Powershell "ForEach($PROCESS in GET-PROCESS <process>) { $PROCESS.ProcessorAffinity=0}"

Open osu! and save files to run

Now All done! It's time to open osu! using it. Make sure you check that if you replaced your osu! file to another location. I will take default location as an example, so make sure you change it if your osu! file exists on another location.

  1. Back to the Notepad that opened at 1st, and write

    1. 4 core
      start /d "%localappdata%\osu!\" /b osu!.exe /affinity 8
    2. 2 core
      start /d "%localappdata%\osu!\" /b osu!.exe /affinity 1
     
  2. save the file as osu!start.bat
  3. open notepad again, and write


    (Sorry for inconvenience, osu! denies to post those text when I write directly on here.)
  4. save the file as osu!start.vbs
  5. Create Shortcuts of osu!start.vbs and cut/paste it where you want.
how to change icon
  1. Right-click the shortcut and select properties.

 
How to roll back settings after playing osu!
You can freely roll back settings by editing some stuffs with using above commands.
First of all, you should add /wait parameter between start and /d on the last sentence.
ex) start /wait /d "%localappdata%\osu!\" /b osu!.exe /affinity 8
Note that /affinity number should be 2 for dual-core and 15 for quad-core. I won't write the commands one-by-one again.
 
Hope you guys got a good tip for it and get better performance and pp for it. You did a good job if you follow them well and Thanks for reading it.
oSumAtrIX
Thank you for this detailed guide. Can you provide some sort of a comparison chart?
Please sign in to reply.

New reply