Jump to content

Recommended Posts

Hi, people. I was struggling with this problem (in the video) and i could not find any solution for this, if someone can help me, i would be very appreciated. Thanks a lot. Have a great day.
The problem i mention https://metin2.download/picture/mrVmoUHlTk8JHCRY8Tm9zopB2z41IpzW/.gif

Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
https://metin2.dev/topic/29026-memory-increase-when-player-warps/
Share on other sites

  • Premium

You need to check what functions are called when you teleport (char.cpp ::WarpSet / intrologin.cpp ::EnterGame). It is probably in EnterGame. However depends also on your machine power. If it's a very weak virtual machine then even something easy may look like uses cpu power more than normal, but it can be actually just a weak cpu.

Edited by Speachless
5 hours ago, covfefe said:

could be either a memory leak or just a weak server (machine)...my 2 cents

Ps. have you made any changes recently in the source that you think could be causing this?

No, i just installed server files and tried it and i saw this problem.

6 hours ago, Speachless said:

You need to check what functions are called when you teleport (char.cpp ::WarpSet / intrologin.cpp ::EnterGame). It is probably in EnterGame. However depends also on your machine power. If it's a very weak virtual machine then even something easy may look like uses cpu power more than normal, but it can be actually just a weak cpu.

I also installed a different files and that files does not have this problem. Also my machine has 4GB's of ram and 4 CPU. I believe its enough for at least for one player.

4 hours ago, mustlight said:

No, i just installed server files and tried it and i saw this problem.

I also installed a different files and that files does not have this problem. Also my machine has 4GB's of ram and 4 CPU. I believe its enough for at least for one player.

yea that's more than good enough...I use only 1 GB for my VM and I don't have any issues.

Well here you go.. so maybe get rid of the other files that are causing this issue?

Edited by covfefe
  • Contributor

What you're showing us there is the Weighted CPU usage, not the memory. If you take a moment to look at what you gave us, you can see the cpu spikes when processing the data, then returns to baseline after it's done.

 

However, yes, it does add some memory as well. Since it's doesn't just flood the database with updates whenever the player does something, the core is saving some data in memory, which gets cleaned up after a while, when it saves it in the database.

 

Edit: A clean core is usually eating about 100mb of ram(in debug) at baseline and you don't need more than 5(maybe 10)mb per player so, if you do the math(with 10mb per player, which is quite huge), your server should be able to hold at least 400 players.

Auth and db are insignificant.

spacer.png

 

 

Hope it's helpful,

Good luck

Edited by Amun
more details
8 minutes ago, Amun said:

What you're showing us there is the Weighted CPU usage, not the memory. If you take a moment to look at what you gave us, you can see the cpu spikes when processing the data, then returns to baseline after it's done.

 

However, yes, it does add some memory as well. Since it's doesn't just flood the database with updates whenever the player does something, the core is saving some data in memory, which gets cleaned up after a while, when it saves it in the database.

 

Edit: A clean core is usually eating about 120mb of ram at baseline and you don't need more than 5(maybe 10)mb per player so, if you do the math(with 10mb per player, which is quite huge), your server should be able to hold at least 400 players.

 

Hope it's helpful,

Good luck

First of all, thanks for the reply. I have tested my own server with 750+ users and probably because of this problem, game usage gets higher and highter after 15+ hours, game becomes %100 and game starts lagging. (I used 128GB's of ram and 32 cores on machine and still became %100 usage after 15+ hours.) I believe that game usage increase is caused by this. If you have any idea what may have cause this and if you can share with me, i would be really appreciated. I wish you a good life everyone. Have a nice day.

  • Contributor

What I would do, if I was in your shoes, is move the source to windows and use visual studio's profiler to try and find the bottleneck.

Logs add an overhead to cpu usage as well, look around and see if you have crazy amounts of logs/syserr coming from some system/part of the server.

Also look for high magnitude loops - that's a viable option as well.

 

Unfortunately, this is the best advice I can give you.

I can't fix(or give advice about fixing) a problem that I don't have - problem that's probably coming from systems that I don't use.

 

Have a great day,

    - Amun

Edited by Amun
  • Love 2
  • Premium
3 hours ago, mustlight said:

The topic is still active. I am open to all ideas.

Then do the things i asked you to check. Aka the first comment in this post tells you what to check. Have fun!

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.