Comments (16)
mtproto_proxy/src/mtp_handler.erl
Line 27 in 30f8c3d
mtproto_proxy/src/mtp_down_conn.erl
Line 36 in 30f8c3d
from mtproto_proxy.
Thanks, so defaults are 50KB and 500KB.
So "Tune resource consumption" section is wrong ?
from mtproto_proxy.
Well, in some sort, yes. In README it was more like in contrast to "how to tune if you have not enough ram".
But it doesn't make sense to make them more than 512k/50k. Probably I should decrease defaults...
from mtproto_proxy.
Hello , where should i enter the script you mentioned in README to increase ram usage? i have 32G of ram , less than 1G is using, but 80% of CPU, i tried to add this to config file but i get error while reloading the proxy
{max_connections, 128000},
{upstream_socket_buffer_size, 20480},
{downstream_socket_buffer_size, 512000},
{replay_check_session_storage, on},
{replay_check_session_storage_opts,
#{max_memory_mb => 2048,
max_age_minutes => 1440}},
from mtproto_proxy.
@kooran I don't think increasing buffer sizes will help there. Probably you have lots of connections with wrong secret or something like that. Can you post output of ss -s
from your server?
from mtproto_proxy.
an hour ago i have started using load balancing between few instances so it's better now , but still, i want to use more ram, no ram is using at all, this is the output of ss -s on my first instance:
* 19048 - -
RAW 0 0 0
UDP 2 2 0
TCP 63723 63720 3
INET 63725 63722 3
FRAG 0 0 0
and i preciate it if you tell me where to increase ram usage, thanks
from mtproto_proxy.
Seems it's not full output. I need to see smth like
TCP: 121 (estab 80, closed 5, orphaned 1, timewait 5)
from mtproto_proxy.
you're , i have missed some of it, sorry
Total: 3918 (kernel 6683)
TCP: 10592 (estab 3759, closed 4122, orphaned 2705, synrecv 0, timewait 4122/0), ports 0
Transport Total IP IPv6
* 6683 - -
RAW 0 0 0
UDP 2 2 0
TCP 6470 6467 3
INET 6472 6469 3
FRAG 0 0 0
from mtproto_proxy.
So, the number of "real" connections is 3759 and remaining ones are closed
or timewait
. It usually happens when lots of clients are trying to connect with wrong secret or protocol. Maybe you made proxy TLS-only and published dd-link or smth like that. In this case proxy have to check if client and protocol is valid and disconnect client with wrong secret or protocol. This check takes CPU
from mtproto_proxy.
nope , that's not the issue , i have enbaled fake TLS-Only and only published the TLS secret (with ee) and it's working fine, i haven't published any other secret , the issue is only and only too much cpu usage and no ram usage, im just asking how to use more ram as you mentioned in README, is it even possible? this issue was on ubuntu
and other issue in debian is just 2 CPU Cores are working and 6 other cores are at 0% , is there any worker setting like other sources? im not a total newbie and im working on mtproto almost a year, i thing this source has a real issue with cpu usage
from mtproto_proxy.
If you want you can send your config here and I will create a new config with the options that you want. It is not that easy for someone who is not familiar with syntax, if you misplace a comma or something, it will not work.
from mtproto_proxy.
@FreedomPrevails i appreciate your help , thank you ♥ i want to see if we can make more balance between ram and CPU, and between CPU cores (or threats) in this source or not? my server have 32gb of ram and 8 CPU cores, yes im not so familiar with syntax , just a bit, i tried as that much but i failed! should i send my whole config like secrets and tags , port , ......? or ram and cpu details was enough?
from mtproto_proxy.
Well, I had experience running it on 8-core server and always all cores were evenly loaded. If you only have 2 cores loaded it means there is something wrong in your setup.
Here is the example from the server I have now:
You can share once again your ss -s
output after at least 15-20minutes of uptime (numbers you shown me last time are quite low, I guess you got them soon after you restarted proxy) and you can also show what is in the logs /var/log/mtproto-proxy/application.log
from mtproto_proxy.
@seriyps Now im gonna scream and run :)) would you please answer my question pleaaaase? this is the third time that im asking, IS IT POSSIBLE TO INCREASE RAM BUFFER OR NOT?
from mtproto_proxy.
@kooran send your whole config. If you want you can redact your sensitive information with x
chars.
from mtproto_proxy.
@kooran would it be easier to discuss in Telegram? https://t.me/erlang_mtproxy
You can increase buffer sizes, but I'm sure that it won't help. All symptoms look like you have tons of people trying to connect with wrong secret or protocol.
from mtproto_proxy.
Related Issues (20)
- How get status of proxy directly(without use telegram mtproxy admin)
- System has not been booted with systemd as init system (PID 1)
- ipv6 problem
- force traffic pass through eth0
- 100% CPU
- Your OS ubuntu 24.04 is not supported! HOT 1
- The number of users connected to the proxy HOT 2
- fallback HOT 2
- Run on Windows Server 2019
- fake TLS not set HOT 1
- Websocket transport support HOT 4
- [Solved] crash--Changed the ip, then no crash again
- Crash Report Downstream terminates with reason downstream_socket_closed
- Downstream error
- Download failure of multimedia messages in Docker edition HOT 7
- 这个已经被识别了吧?
- Blocking the server ip in Iran after 300 people connected HOT 2
- IP white list method - amazon changer & checker - local server tunnel HOT 1
- Is there a back door? HOT 1
- Crash at start.sh
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mtproto_proxy.