0

I'm having memory (RAM) issues in my Digital Ocean droplet,

I have 3 sites with average of 300 unique visitors daily, with 2GB's of RAM and 2GB (in my opinion this should be enough) of swap...

I runned: php -m

And this is the result:

bcmath
bz2
calendar
Core
ctype
curl
date
dba
dom
ereg
exif
fileinfo
filter
ftp
gd
gettext
hash
iconv
json
libxml
mbstring
mhash
mysql
mysqli
openssl
pcntl
pcre
PDO
pdo_mysql
Phar
posix
readline
Reflection
session
shmop
SimpleXML
soap
sockets
SPL
standard
sysvmsg
sysvsem
sysvshm
tokenizer
wddx
xml
xmlreader
xmlwriter
Zend OPcache
zip
zlib

That know, the only one I'm using of those is curl, but most of them, I don't know what they do.

Which of these modules do you think most websites don't need?

PS: I use MySQL, sessions, I make several responses that return JSON, it's really the basic stuff.

1 Answer 1

0

There is no way for us to know what it's safe for you to disable based on the information you have provided. In reality only you can safely determine this by testing.

  • Disable a module
  • Run tests
  • Make a decision
  • Rinse and repeat.

It's interesting that you have picked on PHP modules to try to reduce your memory footprint - I've never had to do that. Which is not top say yu're wrong, it's just less likely to be an issue than other things.

You should spend some time getting to know your system better using tools like top, sar, free, vmstat, iostat etc and by looking in your logs when your system is running normally and when you have problems. Use the tools to figure out what is using memory and when, how the system react to load etc. Then you can start to apply scientific method.

3
  • I made a small edit to the question, thanks for your input. I'll see if I can test like this ( disabling one by one... ) the thing is I don't have a preproduction server... Dec 28, 2015 at 9:37
  • Your edit makes no difference.
    – user9517
    Dec 28, 2015 at 9:38
  • A preproduction system is necessary, especially if you are hesitant to test in the primary system. What makes you think you have memory issues anyway, page outs ? Dec 29, 2015 at 17:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .