Answer the question
In order to leave comments, you need to log in
Memory consumption of php and go?
What and how much eats RAM?
Now the site is in php, 100 users (constantly performing certain actions on the server side) eats about 500 MB of memory. I know that the same resource, even at times more functional written in delphi, consumes 20 MB of RAM.
How much will GO eat? Approximately
the Site parses and then, depending on the information received, makes certain actions on the sites (bot)
Answer the question
In order to leave comments, you need to log in
I write in Go in production. The minimum HelloWord http_server will consume ~5Mb. If the delphi implementation of the task eats 20Mb, you can count on the same from Go. To consume 500Mb per 100 users is a lot of effort in Go, some very complex business logic with girls and blackjack, like the traveling salesman problem for each, taking into account mutual influences.
Now the site is in php, 100 users (constantly performing certain actions on the server side) eats about 500 MB of memory.There that neither the database nor the web server consume resources?
I know that the same resource, even at times more functional written in delphi, consumes 20 MB of RAM.Probably because this delphi is compiled, "When creating the language (and here the qualitative difference from the C language) the task was not to ensure the maximum performance of the executable code or the conciseness of the source code to save RAM" and with static typing.
How much will GO eat? AboutEstimate. Golang with static typing during its development, "the task was to ensure the maximum performance of the executable code or the conciseness of the source code to save RAM", is focused on multithreading. In addition, you can write a front and a web server on it.
app.js:
var express = require('express'),
app = module.exports.app = express();
var server = http.createServer(app);
var socket = require('./libs/sockets')(server);
app.set('socket', socket); // для обращения к сокетам из, например, passport.js
module.exports = function(server) {
var io = require('socket.io')(server);
io.sockets.on('connection', function(socket){
socket.on('connect', function(data){
console.log(data);
});
socket.emit('auth', {hello : 'world222'});
});
return io;
};
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question