Koozali.org: home of the SME Server

RAM Usage of SME

Offline linuxhelp

  • *
  • 173
  • +0/-0
    • Linux PC & Server Support
RAM Usage of SME
« on: August 11, 2010, 08:48:51 AM »
Can anyone reports about the RAM Usage of SME on big Servers? (8GB-RAM)
Are the options to fine tune? hold Databases inside RAM?
(by default SME take up to 500MB RAM..for my some Domains)
Linux PC & Server Support
http://www.linuxonlinehelp.de
.. i Love SME..

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: RAM Usage of SME
« Reply #1 on: August 11, 2010, 08:53:02 AM »
Are the options to fine tune? hold Databases inside RAM?
Do you need to? Are you suffering performance issues related to the databases? If not, I would not bother as optimizing databases is no easy job.

Can anyone reports about the RAM Usage of SME on big Servers? (8GB-RAM)

...


Are you sure there is 8GB of RAM in this server? It seems to only see half of it.
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline Reinhold

  • *
  • 517
  • +0/-0
    • http://127.0.0.1
Re: RAM Usage of SME
« Reply #2 on: August 11, 2010, 02:46:47 PM »

Notes / Report:
- (only smp) SME kernel can handle that much memory ! (32bit boundary)
- There are (still) boards around which will ignore "above 4Gb RAM" unless you set correct bios options
- Linux always uses all available ram (for buffers) and by default only goes to disk when needed
so unless your DATABASE does have a special "buffers" option or like it's all provided for already.

Hope (32bit-) htop gives you incorrect/misleading numbers here ...

Code: [Select]
free -m should (must!) show something like

Quote
             total       used       free     shared    buffers     cached
Mem:          8105       1292       6812          0         38        483

Most important: What database are we talking?
There are beasts such as IMDB databases (In Memory...) but I doubt SME is the right basis (being 32bit & all)

Regards
Reinhold

............

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: RAM Usage of SME
« Reply #3 on: August 11, 2010, 04:40:00 PM »
- (only smp) SME kernel can handle that much memory ! (32bit boundary)
That is not true IMHO, why would SME Server otherwise provide the hugemen kernel for instance?

- Linux always uses all available ram (for buffers) and by default only goes to disk when needed
so unless your DATABASE does have a special "buffers" option or like it's all provided for already.
Wrong. That totally depends on how the database is configured. By default the buffers in MySQL (the database engine that SME Server provides) are small, meaning once buffers are full writing reading is done to the harddisk and for lookups the same analogy holds, when data is not in the memory cache it is retrieved from the hard disk. You can tweak very much for a MySQL database making it resemble a so-called In Memory DataBase (IMDB), but by default it is not.

The closest MySQL comes to it is with it's MySQL Cluster server, but that is a whole different beast than the community server edition that comes with SME Server.

Here are some of the MySQL parameters related to these issues from a stock SME Server:

Code: [Select]
mysql> show variables like '%buffer%';
+-------------------------------+---------+
| Variable_name                 | Value   |
+-------------------------------+---------+
| bdb_log_buffer_size           | 262144  |
| bulk_insert_buffer_size       | 8388608 |
| innodb_buffer_pool_awe_mem_mb | 0       |
| innodb_buffer_pool_size       | 8388608 |
| innodb_log_buffer_size        | 1048576 |
| join_buffer_size              | 131072  |
| key_buffer_size               | 8384512 |
| myisam_sort_buffer_size       | 8388608 |
| net_buffer_length             | 16384   |
| preload_buffer_size           | 32768   |
| read_buffer_size              | 131072  |
| read_rnd_buffer_size          | 262144  |
| sort_buffer_size              | 2097144 |
+-------------------------------+---------+
13 rows in set (0.00 sec)

mysql> show variables like '%mem%';
+---------------------------------+---------+
| Variable_name                   | Value   |
+---------------------------------+---------+
| innodb_additional_mem_pool_size | 1048576 |
| innodb_buffer_pool_awe_mem_mb   | 0       |
| locked_in_memory                | OFF     |
+---------------------------------+---------+
3 rows in set (0.00 sec)

mysql> show variables like '%heap%';
+---------------------+----------+
| Variable_name       | Value    |
+---------------------+----------+
| max_heap_table_size | 16777216 |
+---------------------+----------+
1 row in set (0.00 sec)

mysql>

Apart from that there still is the HEAP or MEMORY type tables, but these by default are not used much as one of the drawbacks is that the tables are never stored on disk, not even when MySQL is shut down.
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: RAM Usage of SME
« Reply #4 on: August 11, 2010, 04:46:45 PM »
A quick check on the memory usage of the MySQL server on that same server results in the following excerpt:

Code: [Select]
[root@homer ~]# pmap -x `cat /var/run/mysqld/mysqld.pid`
8700:   /usr/libexec/mysqld --defaults-file=/etc/my.cnf --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysqld/mysqld.pid
Address           Kbytes     RSS   Dirty Mode   Mapping
0000000000400000    6724    1840       0 r-x--  mysqld
0000000000c91000     432     276     144 rwx--  mysqld

...

00002b358aee3000      40      40      40 rwx--    [ anon ]
00007fff0025c000      84      36      36 rw---    [ stack ]
ffffffffff600000    8192       0       0 -----    [ anon ]
----------------  ------  ------  ------
total kB          105016   10684    7532
[root@homer ~]# free -k
             total       used       free     shared    buffers     cached
Mem:        524288     515072       9216          0       3288      31212
-/+ buffers/cache:     480572      43716
Swap:      1081336     499572     581764
[root@homer ~]#
So MySQL seems to use only 105 kB of 524 kB (about 20% of the total available amount of memory)
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: RAM Usage of SME
« Reply #5 on: August 11, 2010, 04:49:26 PM »
So MySQL seems to use only 105 kB of 524 kB (about 20% of the total available amount of memory)

kB? :-)

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: RAM Usage of SME
« Reply #6 on: August 11, 2010, 04:51:37 PM »
kB? :-)
Oops, you are right... that should have read 105000 Kb or 105 Mb, etc. I was so concerned about getting the order of magnitudes correct in the commands I forgot them in the post. :blush:
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline Reinhold

  • *
  • 517
  • +0/-0
    • http://127.0.0.1
Re: RAM Usage of SME
« Reply #7 on: August 11, 2010, 11:12:19 PM »
That is not true IMHO, why would SME Server otherwise provide the hugemen kernel for instance?

Man ... at least sometimes YOU should READ before you reply - READ AGAIN ! :-(((

Again... he doesn't even state which database he's using...
And what did I say? "so unless your database does ..."

You cactus killed off the german section ... please continue shooting of the hip ...
Bye Bye SME
............

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: RAM Usage of SME
« Reply #8 on: August 11, 2010, 11:35:44 PM »
Man ... at least sometimes YOU should READ before you reply - READ AGAIN ! :-(((

Again... he doesn't even state which database he's using...
And what did I say? "so unless your database does ..."

You cactus killed off the german section ... please continue shooting of the hip ...
Bye Bye SME

Reinhold, although cactus' answer may not be accurate, I think your tone is inappropriate; please respect other forum members and their opinion

furthermore, cactus was expressing his own opinion (re-read, he wrote IMHO)

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: RAM Usage of SME
« Reply #9 on: August 12, 2010, 12:41:50 PM »
Man ... at least sometimes YOU should READ before you reply - READ AGAIN ! :-(((
I did and if you would as well you would have seen that I replied to your remarks and to the topic of this thread (RAM usage of SME Server).

Again... he doesn't even state which database he's using...
Once again, my reply was to your reply, so that seems irrelevant to me.

Excuse me for wandering off topic now:
You cactus killed off the german section ... please continue shooting of the hip ...
I think you should state the facts instead of trying to make someone look bad. This seems to be a bit like 'the pot calling the kettle black' as you now seem to be shooting from the hip. You know, as well as I, that I tried to convince the German community to cooperate with the development team and share solutions and knowledge to a wider public in the proper channels and have them solve problems in the proper way instead of, for instance modifying core files which might problems on updates/upgrades.
If the German section is lacking the will to report issues in the bug tracker as the common policy is, they can not expect the developers to improve and fix their problem. Since, in general, the German section has proven to be unwilling to do so they are to blame, not me.
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline Reinhold

  • *
  • 517
  • +0/-0
    • http://127.0.0.1
Re: RAM Usage of SME
« Reply #10 on: August 12, 2010, 01:54:33 PM »
Quote
Reinhold,

You have received a warning for insulting other users and/or staff members. Please cease these activities and abide by the forum rules otherwise we will take further action.

Regards,
The Contribs.org Team.

Since I do not find a way to delete my account personally
I would kindly ask the person that sent this warning to do so himself on my authority.

As I said before "Bye Bye" ... and let me add a thank you for the team (exceptions apply)
............

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: RAM Usage of SME
« Reply #11 on: August 12, 2010, 02:45:23 PM »
Since I do not find a way to delete my account personally
I would kindly ask the person that sent this warning to do so himself on my authority.

It was me..

and no, I have no possibility to cancel your membership
as the "delete account" is a (actually disabled) feature of smf, I will open a bug for it in bugzilla
I think that every user should be able to do it.

Quote
As I said before "Bye Bye" ... and let me add a thank you for the team (exceptions apply)

sincrerely, I don't understand your point of view.. if something happened in the german forum, if what cactus said is true (and I have no way to verify, as I'm not able to read/write in german), I think you are wrong.

everyboy here should work to improve SME and to help; going away will not help you and us.

about cactus' sentence:
Quote
I tried to convince the German community to cooperate with the development team and share solutions and knowledge to a wider public in the proper channels and have them solve problems in the proper way instead of, for instance modifying core files which might problems on updates/upgrades.
If the German section is lacking the will to report issues in the bug tracker as the common policy is, they can not expect the developers to improve and fix their problem.
I can only say that I agree 110%.. I'm working with italian users and everytime a new issue raise, I ask users to go to bugzilla.. the only way to make SME live and better is to cooperate

feel free to contact me off-line, if you want

Stefano (hope my english is good enough)