Memory SWAP, should I increase RAM?

Status
Not open for further replies.

Smarley

Explorer
Joined
Apr 11, 2016
Messages
64
Hi,

In my FreeNAS machine I have few data (20Gb).
It´s a small business with only 4 user.
The Server is a Lenovo TS140 with 8Gb of ram.
I have one VM with windows for alarm sevice only (alarm server does not work on linux to put in a jail).

Last week for data security reasons I started another Freenas machine in my home, a simplorious hardware (Celeron, desktop pc and 8gb of ram) with replication active between both.
But I did not was lot confortable with this hardware at the backup.

Friday at 18:00 I shutdown the VM just for testing how many memory it was using and stayed off this machine. (you can see at the image that reduce a lot)

So, yesterday I signed and configure rsync.net service for off-site bakcup (now I have one in rsync.net and another at home).
After that I noted that ARC size increase a lot, as you can see attached.
If you see the images attached you will check I never use that amount of ARC memory before.

And today at 11am it attached some swap memory.
The only change that I did was to redirect rsync to another folder at the bakcup site, and start it again.

Another thing is that I never looked swap memory before, and FreeNAS always have used it in my setup.
But, before last week I had the windows VM online, so maybe was because of it.

Should I increase the RAM?
It´s safe to continue using this swap memory?
It´s normal that ARC size increase a lot after start Rsync?
ARC size is a warning about whe you need to increase the memory?

Thanks!
 

Attachments

  • Arc size.PNG
    16.5 KB · Views: 357
  • Arc size2.PNG
    16 KB · Views: 383
  • shutdown VM, start rsync.PNG
    36.3 KB · Views: 345
  • shutdown VM, start rsync2.PNG
    19.5 KB · Views: 366
  • shutdown VM, start rsync3.PNG
    45.9 KB · Views: 342

Jailer

Not strong, but bad
Joined
Sep 12, 2014
Messages
4,977
8GB is the minimum for just FreeNAS. If you want to continue to use a VM you should add more memory.
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
So the real issue here is the SWAP file usage which will traditionally slow something down on your system. While your system is working as designed, it would be better to add more RAM. I like to think of the SWAP file as an emergency fail-over for insufficient RAM. If it happened rarely then that is fine but if this will be routine then I'd add more RAM.
 

Smarley

Explorer
Joined
Apr 11, 2016
Messages
64
So, I started the windows Vm again, and the swap memory increase a little bit.
Another stranger things is that arc size reduced.
 

Attachments

  • arc size vm online.PNG
    14.5 KB · Views: 341
  • arc size vm online2.PNG
    15.8 KB · Views: 332
  • vm online.PNG
    36.9 KB · Views: 358

Smarley

Explorer
Joined
Apr 11, 2016
Messages
64
So the real issue here is the SWAP file usage which will traditionally slow something down on your system. While your system is working as designed, it would be better to add more RAM. I like to think of the SWAP file as an emergency fail-over for insufficient RAM. If it happened rarely then that is fine but if this will be routine then I'd add more RAM.

Yes, you can see that always the system used it.
 

Attachments

  • memory all the time.PNG
    40.9 KB · Views: 351

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
That's good proof that you should increase your RAM if you can.
 

Smarley

Explorer
Joined
Apr 11, 2016
Messages
64
And, how much do you suggest?
In my motherboard I have 4 slots, with 2 memory of 4Gb DDR3 1600Mhz already. (https://www.lenovo.com/shop/emea/content/pdf/ThinkServer/TS140/TS140_DS_EN.pdf)
Maximum memory for the motherboard is 32Gb.

Need to be always 2 memories to use dual channel, right?
In this case, more 2 of 4Gb should be enough? 16Gb total.
Following the manual is possible to use only 3 memories, but I don´t know about performance.

Today we have only 20Gb of data and I don´t see this number growing fast in the near future, beacuse the files are only invoices, txt, excel, pdf, some pictures.

Doing a projection of 10 year next (I don´t know if this lenovo will be there, I hope so), let´s say 15 users and 500Gb data total.
What should be the best choice... more 2x4gb or 2x8gb ram, the cost is proporcional and not so cheap in my country.

And, how can we measure the usage of the machine?
Memory it ok, we can se the usage and if is swaping, but processor for example, my condition is always around 5~10% with peak on 20% each hour doing the snapshot and rsync.
This usage depends on the type of files that you will handle?
For my usage, is only excel tables, some pictures of photoshop (few), and pdf, etc...

Thanks!
 

Stux

MVP
Joined
Jun 2, 2016
Messages
4,419

Smarley

Explorer
Joined
Apr 11, 2016
Messages
64

Stux

MVP
Joined
Jun 2, 2016
Messages
4,419
My suggestion is to run the page in script and set UMA to false.
 

Smarley

Explorer
Joined
Apr 11, 2016
Messages
64
My suggestion is to run the page in script and set UMA to false.

With current setup I ran your script and receive the follow output.
The swap memory was gone for now.
I did not understand what this did with the memory that was used on swap yet, tomorrow I will try to understand it.
Based on the results I think that I don´t need to increase memory right now.

Script: https://forums.freenas.org/index.ph...ny-used-swap-to-prevent-kernel-crashes.46206/

Nov 14 00:18:29 Servidor cronjob: 2016-11-14 00:18:29: Paging in 249112 Bytes on /dev/ada1p1.eli
Nov 14 00:18:38 Servidor cronjob: 2016-11-14 00:18:38: Paging in 247384 Bytes on /dev/ada0p1.eli
Nov 14 00:18:38 Servidor GEOM_ELI: Device ada1p1.eli destroyed.
Nov 14 00:18:38 Servidor GEOM_ELI: Detached ada1p1.eli on last close.
Nov 14 00:18:38 Servidor GEOM_ELI: Device ada1p1.eli created.
Nov 14 00:18:38 Servidor GEOM_ELI: Encryption: AES-XTS 128
Nov 14 00:18:38 Servidor GEOM_ELI: Crypto: hardware
Nov 14 00:18:47 Servidor GEOM_ELI: Device ada0p1.eli destroyed.
Nov 14 00:18:47 Servidor GEOM_ELI: Detached ada0p1.eli on last close.
Nov 14 00:18:47 Servidor GEOM_ELI: Device ada0p1.eli created.
Nov 14 00:18:47 Servidor GEOM_ELI: Encryption: AES-XTS 128
Nov 14 00:18:47 Servidor GEOM_ELI: Crypto: hardware
 

Smarley

Explorer
Joined
Apr 11, 2016
Messages
64
After run the script in the next scrub I think, I had this errors at console.
Do you have any idea?

  • CRÍTICO: 14 de Novembro de 2016 às 00:47 - Device: /dev/ada0, 8 Currently unreadable (pending) sectors
  • CRÍTICO: 14 de Novembro de 2016 às 00:47 - Device: /dev/ada0, 8 Offline uncorrectable sectors
  • CRÍTICO: 14 de Novembro de 2016 às 00:47 - Device: /dev/ada0, Self-Test Log error count increased from 0 to 1
 
Last edited by a moderator:

Stux

MVP
Joined
Jun 2, 2016
Messages
4,419
Not related to the script. But indicated a failing/faulty drive. More info in the forums.
 

Smarley

Explorer
Joined
Apr 11, 2016
Messages
64
Not related to the script. But indicated a failing/faulty drive. More info in the forums.

Ok, I will check...
This drive has only 7k hours.
 

Stux

MVP
Joined
Jun 2, 2016
Messages
4,419

Smarley

Explorer
Joined
Apr 11, 2016
Messages
64
Ok, and the conclusion about RAM, what´s the sugestion?

And, how much do you suggest?
In my motherboard I have 4 slots, with 2 memory of 4Gb DDR3 1600Mhz already. (https://www.lenovo.com/shop/emea/content/pdf/ThinkServer/TS140/TS140_DS_EN.pdf)
Maximum memory for the motherboard is 32Gb.

Need to be always 2 memories to use dual channel, right?
In this case, more 2 of 4Gb should be enough? 16Gb total.
Following the manual is possible to use only 3 memories, but I don´t know about performance.

Today we have only 20Gb of data and I don´t see this number growing fast in the near future, beacuse the files are only invoices, txt, excel, pdf, some pictures.

Doing a projection of 10 year next (I don´t know if this lenovo will be there, I hope so), let´s say 15 users and 500Gb data total.
What should be the best choice... more 2x4gb or 2x8gb ram, the cost is proporcional and not so cheap in my country.

And, how can we measure the usage of the machine?
Memory it ok, we can se the usage and if is swaping, but processor for example, my condition is always around 5~10% with peak on 20% each hour doing the snapshot and rsync.
This usage depends on the type of files that you will handle?
For my usage, is only excel tables, some pictures of photoshop (few), and pdf, etc...

Thanks!
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
If this is for work product then I see only one option, purchase new RAM to max out the motherboard to 32GB. This will give you a significantly larger ARC and you can feel comfort in the fact that you never need to address the RAM again. If this was a home system then I'd recommend the same thing based on your usage.

Your drive ada0 is failing, replace it with a new drive as soon as possible, following the user manual of course. Then RMA the drive. And if you do not have a spare hard drive nearby the FreeNAS, you should purchase one for emergency use. Again that would be for work product. If this were a home system then you could turn it off and wait on a new drive to arrive.

Also, hopefully you received an email with those ada0 errors, if not then you need to setup the email account to ensure you are notified of errors. Also, if you haven't setup routine SMART tests, you need to do that.
 

Smarley

Explorer
Joined
Apr 11, 2016
Messages
64
If this is for work product then I see only one option, purchase new RAM to max out the motherboard to 32GB. This will give you a significantly larger ARC and you can feel comfort in the fact that you never need to address the RAM again. If this was a home system then I'd recommend the same thing based on your usage.

Your drive ada0 is failing, replace it with a new drive as soon as possible, following the user manual of course. Then RMA the drive. And if you do not have a spare hard drive nearby the FreeNAS, you should purchase one for emergency use. Again that would be for work product. If this were a home system then you could turn it off and wait on a new drive to arrive.

Also, hopefully you received an email with those ada0 errors, if not then you need to setup the email account to ensure you are notified of errors. Also, if you haven't setup routine SMART tests, you need to do that.

Yep, this machine is from my company, but as I said I do not see more than 500Gb of files in 10 year next because the type of files we deal.

I will follow your suggestion, bought a new drive for replacment (today I have none), maybe it´s better to put the 3 drive working together and bought more one.

And more two stick of 8Gb of RAM, and stay with 24Gb total.
If in the future need more memory I can replace the 2 stick of 4Gb that I have right now.

Thank you guys!
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
The 24GB RAM should make your system run much better. Please ensure that you run MemTest86 on the system for at least 3 full passes, and if you can let it run longer then you should.
 

Smarley

Explorer
Joined
Apr 11, 2016
Messages
64
Sure.

It´s possible to use a drive as spare with automatically replacment in case of drive fails?
If it is, can I program to run SMART test for example?

Because if I buy a new drive and did not use, I will lose the warranty and do not know if it´s continuous working.
 
Status
Not open for further replies.
Top