LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How much RAM is not much?? (https://www.linuxquestions.org/questions/linux-newbie-8/how-much-ram-is-not-much-4175460433/)

tezarin 05-02-2013 08:12 AM

How much RAM is not much??
 
Hi all,

My server shows the following amount of RAM and is running really slow. Do you think I should add some RAM to it?

Code:

[root@mail ~]# free -m
            total      used      free    shared    buffers    cached
Mem:          7985      6404      1580          0        254      3401
-/+ buffers/cache:      2749      5236
Swap:        1983        43      1940

Thanks

pan64 05-02-2013 08:15 AM

there can be other things, not only the ram. it looks acceptable. you may also have a lot of [defunct] processes, network or hark disk problem. Maybe /tmp is almost full...

tezarin 05-02-2013 09:01 AM

Quote:

Originally Posted by pan64 (Post 4943335)
there can be other things, not only the ram. it looks acceptable. you may also have a lot of [defunct] processes, network or hark disk problem. Maybe /tmp is almost full...

That could be the reason, what should I do?

Code:

[root@mail tmp]# df -h /tmp
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
                      901G  338G  517G  40% /

[root@mail tmp]# du -sh /tmp
124K    /tmp


suicidaleggroll 05-02-2013 09:12 AM

Quote:

Originally Posted by tezarin (Post 4943332)
Hi all,

My server shows the following amount of RAM and is running really slow. Do you think I should add some RAM to it?

Code:

[root@mail ~]# free -m
            total      used      free    shared    buffers    cached
Mem:          7985      6404      1580          0        254      3401
-/+ buffers/cache:      2749      5236
Swap:        1983        43      1940

Thanks

Out of 8GB, you are using 2.8GB and have 5.2GB free. Your RAM usage is perfectly fine and has nothing to do with the slowdown.

---------- Post added 05-02-13 at 08:12 AM ----------

Quote:

Originally Posted by tezarin (Post 4943378)
That could be the reason, what should I do?

Code:

[root@mail tmp]# df -h /tmp
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
                      901G  338G  517G  40% /

[root@mail tmp]# du -sh /tmp
124K    /tmp


Looks fine too.

What is the output of top?

johnsfine 05-02-2013 09:18 AM

Quote:

Originally Posted by tezarin (Post 4943332)
My server shows the following amount of RAM and is running really slow. Do you think I should add some RAM to it?

Based on the info you posted, it is very unlikely that adding ram would noticeably improve the performance of that system.

Finding out why a computer is slow can be very difficult. First you need a good understanding of what you mean by "running really slow". What did you measure or observe? What activity took longer than you think it should have?

tezarin 05-02-2013 09:32 AM

Quote:

Originally Posted by suicidaleggroll (Post 4943388)
Out of 8GB, you are using 2.8GB and have 5.2GB free. Your RAM usage is perfectly fine and has nothing to do with the slowdown.

---------- Post added 05-02-13 at 08:12 AM ----------



Looks fine too.

What is the output of top?

Thanks for your reply. Here's the output of top:

Code:

PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
 9762 zimbra    19  0 3727m 1.1g  42m S  2.0 14.1  2:45.68 java
22227 root      15  0 12760 1080  752 R  2.0  0.0  0:00.01 top
    1 root      15  0 10372  592  556 S  0.0  0.0  0:01.68 init
    2 root      RT  -5    0    0    0 S  0.0  0.0  0:00.46 migration/0
    3 root      34  19    0    0    0 S  0.0  0.0  0:00.02 ksoftirqd/0
    4 root      RT  -5    0    0    0 S  0.0  0.0  0:00.00 watchdog/0
    5 root      RT  -5    0    0    0 S  0.0  0.0  0:03.80 migration/1
    6 root      34  19    0    0    0 S  0.0  0.0  0:00.09 ksoftirqd/1
    7 root      RT  -5    0    0    0 S  0.0  0.0  0:00.00 watchdog/1
    8 root      RT  -5    0    0    0 S  0.0  0.0  0:18.98 migration/2
    9 root      34  19    0    0    0 S  0.0  0.0  0:00.07 ksoftirqd/2
  10 root      RT  -5    0    0    0 S  0.0  0.0  0:00.00 watchdog/2
  11 root      RT  -5    0    0    0 S  0.0  0.0  0:06.51 migration/3
  12 root      34  19    0    0    0 S  0.0  0.0  0:00.10 ksoftirqd/3
  13 root      RT  -5    0    0    0 S  0.0  0.0  0:00.00 watchdog/3
  14 root      10  -5    0    0    0 S  0.0  0.0  0:00.00 events/0
  15 root      10  -5    0    0    0 S  0.0  0.0  0:00.00 events/1
  16 root      10  -5    0    0    0 S  0.0  0.0  0:00.02 events/2
  17 root      10  -5    0    0    0 S  0.0  0.0  0:00.00 events/3
  18 root      10  -5    0    0    0 S  0.0  0.0  0:00.00 khelper
  89 root      11  -5    0    0    0 S  0.0  0.0  0:00.05 kthread
  96 root      10  -5    0    0    0 S  0.0  0.0  0:00.25 kblockd/0


haertig 05-02-2013 09:54 AM

Memory and swap look good. That's not the source of the problem.

What is the load average on your system? Post the output of the "uptime" command to display this. Obtain this load average data when your system is running slow, not when it's running OK. We also need to know how many CPU's/cores your system has, to interpret the load average numbers. Get the number of CPU's/cores like this: "cat /proc/cpuinfo | grep processor | wc -l"

haertig 05-02-2013 09:58 AM

It's also sometimes helpful to know how many processes are running on your system, to see if it's way out of the norm. Post the output of "ps -e | wc -l"

tezarin 05-02-2013 10:00 AM

Quote:

Originally Posted by haertig (Post 4943418)
Memory and swap look good. That's not the source of the problem.

What is the load average on your system? Post the output of the "uptime" command to display this. Obtain this load average data when your system is running slow, not when it's running OK. We also need to know how many CPU's/cores your system has, to interpret the load average numbers. Get the number of CPU's/cores like this: "cat /proc/cpuinfo | grep processor | wc -l"

Thanks for your reply. Here are the outputs:

Code:

[root@mail tmp]# uptime
 11:01:16 up 18 days, 13:20,  1 user,  load average: 0.32, 0.35, 0.37

[root@mail tmp]# cat /proc/cpuinfo | grep processor | wc -l
4

[root@mail tmp]# ps -e | wc -l
194


haertig 05-02-2013 10:10 AM

Load averages of 0.3 on a four core CPU are inconsequential. Your system is not even breathing hard. 194 processes is nothing either. All of this output you have posted so far looks good. Nothing I would be the slightest bit concerned about

but your system is still running slow. Can you describe what you mean by "slow"? For example, are characters not echoing back in a timely manner when you type on the command line? Is the system slow to boot? Can you give an example of a common process that is taking "too long", and how long that is taking?

haertig 05-02-2013 10:17 AM

Grabbing at straws here...

Overloaded with network activity? Post output of "netstat -an |wc -l"

Too many open files? Post output of "lsof | wc -l"

tezarin 05-02-2013 10:49 AM

Thanks, by slow I mean the Zimbra mail server responds very slowly to my users. It takes a long time for the user to be able to open, delete the email. I heard Zimbra might have a problem with JAVA.

This is the output you requested:

Code:

[root@mail tmp]# netstat -an |wc -l
579


haertig 05-02-2013 11:23 AM

That is not a high number for network activity.

Thus far, I don't see anything at the system level that would account for slow performance. One thing we haven't investigated yet is disk access performance. This could be an issue if Zimbra uses a relational database for storage (I don't know anything about Zimbra). But generically speaking, databases can put demands on disk access if they are heavily used. However, with the number of network connections you listed, I'm not sure you qualify as "heavily used". That "netstat -an | wc -l" returns an artificially high number... it includes UDP as well as TCP, ESTABLISHED connections, LISTEN'ers, TIME_WAIT connections, etc. So the returned number is much higher than the true network activity we need to be concerned with. I was just using it for an estimate, a ballpark figure that I could easily cut in half (or more).

I would start investigating the application itself. Maybe there is some config setting where you can specify the max number of simultaneous network connections allowed. If you have more users coming in simultaneously than Zimbra is configured to handle, large delays could be a result. That's just a guess on my part, because I have seen this type of problem with other applications that are configured with lower resources than they need to do their jobs. Since you mentioned Java, is there a setting where you can specify how much memory it is allowed to use? Could be that while your server has plenty of memory at the system level, there is not enough memory being allocated to some java process at the application level. Java is a giant pig when it comes to resource usage.

At this point, I think your issue is at the application level, not the server level. I hope some other folks will respond to this thread. Some who might be familiar with this Zimbra software you are using. I am only able to give you generic advice based on my experience, and I've pretty much exhausted that.

EDDY1 05-02-2013 12:10 PM

maybe there's a problem on the client end. they're obviously running processes at the time login to mail server.

jlinkels 05-02-2013 06:41 PM

A sign of too slow disk access is a high percentage of %wa in top. (Third line from the top). If this percentage is is high then either the disk is slowing down response, or the network is. This percentage indicates "waiting for I/O"

What is high? I noticed that when it is more than 10% for 10-20 seconds the machine feels slow and there might be a disk problem. If someone has better figures, please post.

jlinkels


All times are GMT -5. The time now is 02:32 AM.