Difference between revisions of "Performance Optimization/ru"

From TerraFirmaCraft Plus Wiki
Jump to: navigation, search
(Created page with "Оптимизация игры")
 
(Created page with "Эти аргументы были отредактированы редактором профилей и вставкой текста, так же как и пометко...")
 
(10 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
<languages/>
 
<languages/>
  
== Overview ==
+
== Общие сведения ==
  
Minecraft 1.7.10 is known to have some performance issues compared to other versions, and this is made even worse by the fact that TerraFirmaCraft utilizes the full 256 world height. Your system may be able to play other heavily modded instances of Minecraft with no issues, but when it comes to TerraFirmaCraft it's like comparing apples to oranges. In vanilla Minecraft, as well as 99.9% of all modded Minecraft, the sea-level of the overworld is at y=63. In TFC, sea-level is all the way up at about y=140. That means that in every chunk (which is an area of 16x16 blocks), there are about 20,000 more blocks to load. There are also a handful of other things that make TFC much more resource intensive, so this page is a guide to help make the game run as smoothly as possible. It is strongly recommended that you go through all of the following categories, as they are generally equally important in improving performance.
+
В сравнении с другими версиями 1.7.10 оптимизирован несколько хуже, и это усугубляется тем, что TFC+ использует высоту мира в 256 блоков. Ваш компьютер может справляться с большим количеством модов, но сравнивать обычные моды и TerraFirmaCraft - сравнивать землю и небо. В обычном майнкрафте море находится на y=63. В TFC же уровень моря - где-то y=140. Это означает, что один чанк (область 16 на 16 блоков) на целых 20 000 блоков больше. Есть ещё несколько вещей, делающих TFC ресурсоёмким модом, так что эта страница - гайд по улучшению производительности на столько, на сколько это возможно. Настоятельно рекомендуется попробовать все ниже описанные категории, так как они все одинаково важны при улучшении производительности.
  
  
== Java Version ==
+
== Версия Java ==
  
First and foremost, you should check which version of Java that Minecraft is running. You can do this on the vanilla launcher by clicking on the tab that says '''Launcher Log'''. If you are using a newer copy of the vanilla launcher, it will likely have come bundled with the correct version of java for your system, but it is still a good idea to check.
+
В первую очередь проверьте версию Java, которую использует майнкрафт. В обычном лаунчере это делается во вкладке '''Лог лаунчера'''. Если вы используете копию лаунчера новей, она скорее всего уже имеет при себе правильную для вашей системы версию Java, но всё же проверить стоит.
  
Clicking on the tab will show a log that looks like this:
+
Клик по вкладке покажет лог, выглядящий вот так:
  
 
[[File:LauncherLog.png|File:LauncherLog.png]]
 
[[File:LauncherLog.png|File:LauncherLog.png]]
  
On this log there are three values that you should look for:
+
В этом логе вам нужно найти три значения:
*os.arch - If you are using a 32-bit or 64-bit operating system.
+
*os.arch - 32 или 64 бита использует ваша система.
*java.version - The version of java you are currently using. You should be using Java 8, which is shown with the 1.8.#.
+
*java.version - версия используемой Java. Вы должны пользоваться Java 8, то есть версиями, начинающимися с 1.8.#.
*sun.arch.data.model - If you are using the 32-bit or 64-bit java. You should be using a version that matches your operating system.
+
*sun.arch.data.model - 32-х или 64-х битную Java вы используете. Битность Java и вашей системы должны совпадать.
  
 
The latest version of Java can be found [http://java.com/en/download/manual.jsp here]. Make sure you install the correct one for your operating system, and that you uninstall any older versions of Java your system may be running. x86 is for 32-bit systems, and x64 is for 64-bit systems. ''Note: If you are using a Mac, you may need to keep Java 6 installed.'' If in the program listing, it does not explicitly say 64-bit in the name, it is the 32-bit version.
 
The latest version of Java can be found [http://java.com/en/download/manual.jsp here]. Make sure you install the correct one for your operating system, and that you uninstall any older versions of Java your system may be running. x86 is for 32-bit systems, and x64 is for 64-bit systems. ''Note: If you are using a Mac, you may need to keep Java 6 installed.'' If in the program listing, it does not explicitly say 64-bit in the name, it is the 32-bit version.
  
'''''Important:''' Generally speaking, any updates to java that are automatically installed will be the 32-bit version. Each time you update it is crucial that you make sure it installed the correct version.''
+
'''''Важно:'''Вообще, все автоматические обновления Java - 32-х битные. Каждый раз, когда Вы обновляете необходимо убедиться, что вы установили корректную версию.''
  
If you needed to download and install a new version of java, click on Edit Profile on the launcher to make sure that it is going to use this new version. You'll need to point it to where java was installed:
+
Если вам понадобится скачать и установить новую версию Явы, кликните на "Редактировать профиль" в лаунчере чтоб убедиться, что он будет использовать эту новую версию. Вам нужно будет указать на расположение Java:
  
 
[[File:JavaExecutable.png|File:JavaExecutable.png]]
 
[[File:JavaExecutable.png|File:JavaExecutable.png]]
  
  
== JVM Arguments ==
+
== Аргументы JVM ==
  
'''''Important: Make sure that you delete any existing arguments in the text box before you add the ones below. If you don't, then you will likely have duplicate values for the same parameters, and the game may use the wrong one.'''''
+
'''''Важно: Убедитесь в том, что вы удалили любые существующие аргументы перед  добавлением ниже написанных. В противном случае у вас будут дубликаты, и игра может использовать не тот аргумент.'''''
  
These arguments are edited by using the profile editor and putting text into the bottom box as well as marking the appropriate checkbox. The following string is a good starting point, but will very likely need to be edited at least partially to work properly with your computer. An explanation of what each part does and what you may need to change it to will be explained below:
+
Эти аргументы были отредактированы редактором профилей и вставкой текста, так же как и пометкой соответствующих флажков. Следующие аргументы - хорошее начало
  
 
  -Xms1G -Xmx2G -XX:NewSize=512M -XX:MaxNewSize=1G -XX:SurvivorRatio=2 -XX:+DisableExplicitGC -d64 -XX:+UseConcMarkSweepGC -XX:+AggressiveOpts
 
  -Xms1G -Xmx2G -XX:NewSize=512M -XX:MaxNewSize=1G -XX:SurvivorRatio=2 -XX:+DisableExplicitGC -d64 -XX:+UseConcMarkSweepGC -XX:+AggressiveOpts

Latest revision as of 18:21, 2 May 2021

Other languages:
English • ‎русский

Общие сведения

В сравнении с другими версиями 1.7.10 оптимизирован несколько хуже, и это усугубляется тем, что TFC+ использует высоту мира в 256 блоков. Ваш компьютер может справляться с большим количеством модов, но сравнивать обычные моды и TerraFirmaCraft - сравнивать землю и небо. В обычном майнкрафте море находится на y=63. В TFC же уровень моря - где-то y=140. Это означает, что один чанк (область 16 на 16 блоков) на целых 20 000 блоков больше. Есть ещё несколько вещей, делающих TFC ресурсоёмким модом, так что эта страница - гайд по улучшению производительности на столько, на сколько это возможно. Настоятельно рекомендуется попробовать все ниже описанные категории, так как они все одинаково важны при улучшении производительности.


Версия Java

В первую очередь проверьте версию Java, которую использует майнкрафт. В обычном лаунчере это делается во вкладке Лог лаунчера. Если вы используете копию лаунчера новей, она скорее всего уже имеет при себе правильную для вашей системы версию Java, но всё же проверить стоит.

Клик по вкладке покажет лог, выглядящий вот так:

File:LauncherLog.png

В этом логе вам нужно найти три значения:

  • os.arch - 32 или 64 бита использует ваша система.
  • java.version - версия используемой Java. Вы должны пользоваться Java 8, то есть версиями, начинающимися с 1.8.#.
  • sun.arch.data.model - 32-х или 64-х битную Java вы используете. Битность Java и вашей системы должны совпадать.

The latest version of Java can be found here. Make sure you install the correct one for your operating system, and that you uninstall any older versions of Java your system may be running. x86 is for 32-bit systems, and x64 is for 64-bit systems. Note: If you are using a Mac, you may need to keep Java 6 installed. If in the program listing, it does not explicitly say 64-bit in the name, it is the 32-bit version.

Важно:Вообще, все автоматические обновления Java - 32-х битные. Каждый раз, когда Вы обновляете необходимо убедиться, что вы установили корректную версию.

Если вам понадобится скачать и установить новую версию Явы, кликните на "Редактировать профиль" в лаунчере чтоб убедиться, что он будет использовать эту новую версию. Вам нужно будет указать на расположение Java:

File:JavaExecutable.png


Аргументы JVM

Важно: Убедитесь в том, что вы удалили любые существующие аргументы перед добавлением ниже написанных. В противном случае у вас будут дубликаты, и игра может использовать не тот аргумент.

Эти аргументы были отредактированы редактором профилей и вставкой текста, так же как и пометкой соответствующих флажков. Следующие аргументы - хорошее начало

-Xms1G -Xmx2G -XX:NewSize=512M -XX:MaxNewSize=1G -XX:SurvivorRatio=2 -XX:+DisableExplicitGC -d64 -XX:+UseConcMarkSweepGC -XX:+AggressiveOpts

Note: This string was chosen for use with Java 8. If you are using Java 7 there may be additional arguments that could help increase performance. More information about Java 7 VM arguments can be found here.


Memory Allocation

-Xms1G -Xmx2G -XX:NewSize=512M -XX:MaxNewSize=1G 

TerraFirmaCraft requires a minimum of 1GB of memory to smoothly run single player without running into obvious issues. If you are using a 32-bit operating system, this is also essentially the maximum amount of memory you will be able to allocate as well. If you are using a 64-bit operating system, and are properly using a 64-bit version of java, you will be able to set your maximum higher. -Xms is used to set the minimum memory, and -Xmx is used to set the maximum memory allocation. -XX:NewSize and -XX:MaxNewSize should be set to 25% and 50% of -Xmx respectively.

For single player, or clients that are connecting to a server, a maximum of 2GB is recommended, but you are encouraged to adjust as necessary. The best way to see what will likely be a good maximum for you is to turn on the Minecraft Debug overlay using F3. In the upper-right corner you'll see what percentage of memory is currently used. Generally speaking, you should aim for keeping that number below 75%, and ideally it should average around 50%. Allocating too much memory to Minecraft can surprisingly cause just as many issues with lag spikes as not allocating enough.


32-bit Systems

If you are using a 32-bit operating system, the most you can generally allocate is the following string:

-Xms1G -Xmx1G -XX:NewSize=256M -XX:MaxNewSize=512M 


Garbage Collection

-XX:SurvivorRatio=2 -XX:+DisableExplicitGC -d64 -XX:+UseConcMarkSweepGC -XX:+AggressiveOpts

One of the best ways to increase performance is to use JVM arguments to help with garbage collection. This will help prevent the large lag spikes and freezes that often occur while doing resource intensive things such as generating new terrain.

  • -XX:SurvivorRatio=2 : Ratio of eden/survivor space size
  • -XX:+DisableExplicitGC : Disables calls to System.gc()
  • -d64 : Forces java to use the 64-bit version in case you have a lingering installation of 32-bit. Do not use this argument if you are on a 32-bit operating system.
  • -XX:+UseConcMarkSweepGC : Use concurrent mark-sweep collection for the old generation.
  • -XX:+AggressiveOpts

PermSize-related arguments and -XX:+CMSIncrementalPacing are intentionally not in this string, as they are deprecated in Java 8 and will be ignored.


Forge Version

You should always be using the version of Forge that TerraFirmaCraft was built on. If the current recommended version is newer than the version that TFC was built on, it should be safe to use that instead, but there is no guarantee.


Install FastCraft

FastCraft is a mod created by the IC2 coder, Player, that is designed to help performance with Minecraft. This mod is optional, and can be installed on both clients and servers to help resolve some performance issues that are in vanilla Minecraft's code.

FastCraft is located here.


Install/Uninstall Optifine

As counter-intuitive as it may sound, Optifine has been known in the past to cause more lag than it fixes when it comes to modded Minecraft. Your results may vary, but we still encourage that you try playing both with and without Optifine to see for yourself which way gets better performance on your system. Optifine may also cause graphical glitches such as floating trees and missing water; use at your own risk.

The official Optifine website can be found here.


Smooth Lighting

Turning off Smooth Lighting -especially in areas with a lot of trees or roofs -may increase your FPS.