Community discussions

 
telepro
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 63
Joined: Sun Apr 03, 2011 7:50 pm

metarouter size resets to 16MB after reboot

Tue Apr 03, 2012 10:54 pm

Runing RouterOS 5.6 on RB433AH. I use WinBox to configure the metarouter to run using 24MB of memory and successfully import an OpenWRT image. Image runs fine and indicates it has allcoated 24MB. However, after reboot of the computer the metarouter indicates it is using only 16MB. OpenWRT image successfully runs in 16MB, but i would like to reserve more memory for the applications that will run in this image.
Is there some other place where the memory reserved shoudl be set so that it will be maintained over a reboot?

thanks
 
User avatar
janisk
MikroTik Support
MikroTik Support
Posts: 6283
Joined: Tue Feb 14, 2006 9:46 am
Location: Riga, Latvia

Re: metarouter size resets to 16MB after reboot

Wed Apr 04, 2012 3:48 pm

please upgrade to latest version of RotuerOS and try again to see if problem is reproducible.
 
telepro
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 63
Joined: Sun Apr 03, 2011 7:50 pm

Re: metarouter size resets to 16MB after reboot

Thu Apr 05, 2012 1:05 am

same problem exists on ROS 5.13
Scenario:
Log in to syste using Winbox | Files | image is draged and dropped onto files menu
metarouter | import image | select image from files list | set memory size = 24MB | set enabled | start
wait for import to complete
select system | reboot
log back in to system using WinBox | Metarouter | display shows memory size = 16MB
 
telepro
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 63
Joined: Sun Apr 03, 2011 7:50 pm

Re: metarouter size resets to 16MB after reboot

Fri Apr 13, 2012 8:00 pm

Any update on this issue?
 
User avatar
NathanA
Forum Veteran
Forum Veteran
Posts: 801
Joined: Tue Aug 03, 2004 9:01 am

Re: metarouter size resets to 16MB after reboot

Fri Apr 13, 2012 9:01 pm

I certainly don't have this issue, and I've been playing with MetaROUTER a lot lately on various different models of RouterBOARD. I set my RAM use to 64 or 128MB for my OpenWRT import, reboot, and it's still what I set it at.

I would suggest a complete re-install with Netinstall, without preserving any existing configuration, and see if the problem persists. If the problem is following you through version upgrades, then it sounds to me like there is some local file or config corruption on your particular router.

-- Nathan
 
telepro
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 63
Joined: Sun Apr 03, 2011 7:50 pm

Re: metarouter size resets to 16MB after reboot

Sat May 12, 2012 4:53 pm

thanks for your suggestions. However, the problem still persists. Have so far tried this on seven (7) of a batch of ten 433AH units received from the factory. Have also verified this same operation on three new 751G units. have tried this as far back as 5.6 and up to and including 5.16.

i do note that this is not a problem if i use the default metarouter image supplied by Mikrotik, which results in a copy of the Mikrotik ROS running as the metarouter image. In that scenario, the memory size allocated to the metarouter does remain as configured (through a reboot or a power cycle). However, when i import an OpenWRT image I have built (specifically to run our application) and specify i woud llike to run it in 24MB during the image import process, the memory size allocated to the image is 24MB after the import. The OS startup code indicate 24MB memory available as shown below (memory: 01800000):

[Ctrl-A is the prefix key]
Linux version 2.6.31.10 (tlpuser@CCI-FAS1-UBUNTU) (gcc version 4.5.2 (Linaro GCC 4.5-2011.02-0) ) #50 Wed Apr 11 06:58:11 CDT 2012
CPU revision is: 0001800a (MIPS 4Kc)
Determined physical RAM map:
User-defined physical RAM map:
memory: 01800000 @ 00000000 (usable)
Initrd not found or empty - disabling initrd
Zone PFN ranges:
Normal 0x00000000 -> 0x00001800
Movable zone start PFN for each node
early_node_map[1] active PFN ranges
0: 0x00000000 -> 0x00001800
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 6096
Kernel command line: init=/etc/preinit console=hvc0 board=vm mem=24M
PID hash table entries: 128 (order: 7, 512 bytes)
Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
Memory: 21052k/24576k available (1790k kernel code, 3524k reserved, 255k data, 116k init, 0k highmem)
NR_IRQS:128
console [hvc0] enabled
Calibrating delay loop...

However, the memory size allocated to the OS is reduced to 16MB after the first power cycle (or reboot) as shown below. And remains that size after each successive power cycle. (see that now the OS startup reports: memory: 01000000 @ 00000000 (usable))

[Ctrl-A is the prefix key]
Linux version 2.6.31.10 (tlpuser@CCI-FAS1-UBUNTU) (gcc version 4.5.2 (Linaro GCC 4.5-2011.02-0) ) #50 Wed Apr 11 06:58:11 CDT 2012
CPU revision is: 0001800a (MIPS 4Kc)
Determined physical RAM map:
User-defined physical RAM map:
memory: 01000000 @ 00000000 (usable)
Initrd not found or empty - disabling initrd
Zone PFN ranges:
Normal 0x00000000 -> 0x00001000
Movable zone start PFN for each node
early_node_map[1] active PFN ranges
0: 0x00000000 -> 0x00001000
Built 1 zonelists in Zone order, mobility grouping off. Total pages: 4064
Kernel command line: init=/etc/preinit console=hvc0 board=vm mem=16M
PID hash table entries: 64 (order: 6, 256 bytes)
Dentry cache hash table entries: 2048 (order: 1, 8192 bytes)
Inode-cache hash table entries: 1024 (order: 0, 4096 bytes)
Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
Memory: 12936k/16384k available (1790k kernel code, 3448k reserved, 255k data, 116k init, 0k highmem)
NR_IRQS:128
console [hvc0] enabled
Calibrating delay loop...

I ask: on the testing you have done, are you using the image supplied by Mikrotik, or are you loading an image that you have constructed? If it is an image you have constructed, have you done anyting special to the image to indicate it should be run within a particualr amont of memory?

thanks in advance
 
User avatar
NathanA
Forum Veteran
Forum Veteran
Posts: 801
Joined: Tue Aug 03, 2004 9:01 am

Re: metarouter size resets to 16MB after reboot

Tue May 15, 2012 12:12 am

The majority of my MetaROUTER usage involves custom-built OpenWRT guests (see my postings in the "Metarouter images" sticky thread at the top of this forum) and not RouterOS guests or MikroTik's own OpenWRT image.

I did not do anything special at time of build.

I, too, specify RAM usage at time of import.

I just checked one of my 450Gs that I have this image on. I set it to 128MB when I imported it, it shows that in the MetaROUTER WinBox window, and in the preferences for that particular MetaROUTER. I just shut down the entire router, rebooted it, and when it came back, it still showed 128MB in the preferences for that guest. I connected to the guest, looked at 'dmesg' and 'top' and they both report 128MB of available memory. Also, the host shows that roughly half of the 256MB of RAM that the 450G has is used up.

So, no, I cannot reproduce your issue.

This is on a 450G that is running ROS 5.14.

Can you point me at a place where I can download a copy of the exact image you're using? Perhaps there is something funky about this particular image, although I cannot imagine what that could be...

-- Nathan

EDIT: I see you're running on a 433AH. I haven't tried my most recent builds on a 433AH, but I will make an up-to-date build that matches what I'm using on the 450G but which omits the audio files bundled with Asterisk...at its current size with those included, there is not enough flash on the 433AH to accommodate it. Once I have done this, I will try it out on a 433AH to see if there is a difference, and report back.

EDIT 2: I did this, and everything tests out fine. I built an image for the 433AH that would fit on it, imported it and told it to use 64MB of RAM. Then I rebooted (disabled/enabled) just the guest, and it still showed 64MB. Then I rebooted the host 433AH, and when it came back, the virtual still showed 64MB (I looked both at MetaROUTER in WinBox and then logged into the guest, checked the bootup log, and ran 'top'...everything showed 64MB). So the problem you are having is somehow unique to your circumstances. If you can get me a copy of your image, I will try it on my hardware.
 
User avatar
janisk
MikroTik Support
MikroTik Support
Posts: 6283
Joined: Tue Feb 14, 2006 9:46 am
Location: Riga, Latvia

Re: metarouter size resets to 16MB after reboot

Tue May 15, 2012 8:31 am

so please post some link to image you are using, since we both cannot reproduce the problem while you seem to have it on every reboot.
 
telepro
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 63
Joined: Sun Apr 03, 2011 7:50 pm

Re: metarouter size resets to 16MB after reboot

Wed May 16, 2012 4:18 pm

The file is available at \\192.55.195.201\Mikrotik
map this location as a drive and log on with:
UID: MikroTik
Pass: R0ut3rHe1p (0=zero, L in help=one)

the 2.9MB image file can then be copied to a location of your choice.

The ROS is initially built with a script that contains the following fragments:

:put "----- Config metarouter"
/metarouter
add \
name=mr1 \
disabled=no \
disk-size=unlimited \
memory-size=24MiB

---------------and ---------------------

:put "----- Config metarouter interface"
/metarouter interface
add \
disabled=no \
static-interface=ve-meta \
type=static \
virtual-machine=mr1 \
vm-mac-address=02:2E:9C:32:A6:9E
add \
disabled=no \
dynamic-bridge=bridge-Wan1-FasSat \
dynamic-mac-address=02:DA:23:12:CD:D4 \
type=dynamic \
virtual-machine=mr1 \
vm-mac-address=02:2E:19:95:ED:75

After using the script to set the ROS configuration, in winbox i manually then:
Remove the metarouter image installed by default with:
Metarouter | highlight line with metarouter | click on '-'
Add my new metarouter image, previously copied to the Files menu with:
Click Import Image | Select file from dropdown | set memory size = 24 | click Start
wait for entire image to be imported
click on Metarouter Interfaces | double click on Unknown Dynamic (bottom row) | OK | double click on Unknown Static (top row) | OK
click on Metarouters tab | double click on metarouter name | Console
verify that metarouter environment has 24MB space available
system tab | reboot
wait for system to reboot
logon using winbox
metarouter | start console
Now find that metarouter environment is running in 16MB

i don't know of a way (with our ROS configuraiton procedure) to initially load our image instead of the default Mikrotik image. And i also don't know of a way to automatically re-connect the metarouter interfaces, so these need to be done manually after our image installation is complete. Perhaps this is part of the problem, though after these manual operations the initial size of the image environment is 24MB, and only after a reboot is the size reduced to 16MB.

I've tried to be explicit in the steps we take, as i'm guessing it must be something in our image or the sequence of installation instructions that i am doing incorrectly.

thanks in advance.
 
User avatar
janisk
MikroTik Support
MikroTik Support
Posts: 6283
Joined: Tue Feb 14, 2006 9:46 am
Location: Riga, Latvia

Re: metarouter size resets to 16MB after reboot

Thu May 17, 2012 9:19 am

image seems to be small enough, could you send it to support@mikrotik.com as i am not very keen user of windows shares.

edit:

also, step to add ROS guest and then remove it - is completely useless.

If you simply import image as you do that later on and then add virtual interface (to be on the safe side, reboot the guest) and you are done.
 
reverged
Member Candidate
Member Candidate
Posts: 270
Joined: Thu Nov 12, 2009 8:30 am

Re: metarouter size resets to 16MB after reboot

Thu May 17, 2012 7:19 pm

i am not very keen user of windows shares.
Just do Start->Run and paste: \\192.55.195.201\Mikrotik
You don't need to map the drive.

I tested this image and have the same results, sort of. (using Winbox; RB450G; ROS 5.14; FW 2.39)
If the MR memory size is initially set to 24M (or 32M) during import, after reboot, it reverts to 16M.
If the MR memory size is then manually changed to 32M, after a reboot it stays 32M.
If the MR memory size is then manually reduced to 24M, after reboot it remains 24M.

If the next MR import is set to 24M or 32M, it reverts to 16M after reboot.

In all cases, dmesg shows the same memory size as ROS reports in the MR information.
So it appears to be a problem with the first import.

Which brings up another question: If ROS doesn't have a clear sense of how much memory the MR is allocated, could this be the cause of many MR problems?
 
telepro
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 63
Joined: Sun Apr 03, 2011 7:50 pm

Re: metarouter size resets to 16MB after reboot

Fri May 18, 2012 1:10 am

Mikrotik support:

Thanks for the response. i have emailed the image to you.

As mentioned above, we build each of these syystems with an imported script. Regarding your suggestion to eliminate the redundant scripted, followed by the manual metarouter definition sequence: I have tried unsuccessfully to come up with the necessary command(s) to allocate a metarouter, provide it with a name, memory size, disk-size, and disable value, (which require the add command), while at the same time setting the import-image and file name, which is not allowed under the 'add' keyword. On the other hand, first issuing the import-image and file-name will create a metarouter entry with the desired image, but with a name, disk-size, and disabled status not defined by the script. And with a metarouter entry name not defined by the script, i have not been able to script the addition of the metarouter interfaces.

But if your suggestion was only to do the entire metarouter definition and interface configuration manually after the completion of the script, i understand.

In any case, thanks much for the suggestion.
 
User avatar
NathanA
Forum Veteran
Forum Veteran
Posts: 801
Joined: Tue Aug 03, 2004 9:01 am

Re: metarouter size resets to 16MB after reboot

Fri May 18, 2012 7:14 am

Okay, I can reproduce this problem now. It has nothing to do with his image; it happens with every image.

The problem/reason I couldn't reproduce it before is because it was unclear to me what the OP meant by "reboot". Reboot what? The host or the guest? So I tried doing both, but I always tried rebooting the guest first, and then rebooting the host. If you do that, the problem doesn't happen.

The only way the problem happens is if you import your image with the "Enabled" checkbox checked (or with 'disabled=no' on the CLI), so that it starts up immediately after import, and then you immediately reboot the host after the import is done. When you do that, the RAM for the guest will indeed be reset to 16MB when the host next boots up.

However, if you import the image with 'disabled=yes', enable the image, and then reboot the host, the problem doesn't happen. Or if you import with 'disabled=no', then manually disable and re-enable the guest, and then reboot the host, the problem doesn't happen. Or if you import it with 'disabled=no', then go in and change the RAM on the guest and then reboot the host, the problem doesn't happen.

In short, the problem only happens if you import with 'disabled=no' and then immediately reboot the host. If you touch the settings on the guest in any way, shape, or form after import and before rebooting the host (even if it is a simple disable/re-enable), the problem doesn't occur.

So, simple solution: import with the guest disabled, then immediately enable it after import is complete. Problem solved. :)

Not to belittle the bug or the reporter: it is a legitimate bug. But the bug only happens under such a specific set of circumstances that it is easy to work around, and I never ran into it myself because I was apparently always triggering the workaround even without knowing it!

-- Nathan

P.S. -- There is another strange manifestation of the bug that I just ran into: If you import with the guest disabled and then reboot the host without enabling the guest, when the host boots back up, the guest is enabled (even though it was disabled before reboot) and is set to 16MB of RAM (even if I set it differently during import). If I import the new guest disabled, then enable the guest, and then reboot the host, the RAM is correct. So the problem appears to be that if you don't touch the guest's settings at all after import, it will forget any custom settings you tried to set during import (disabled=yes, memory-size=32MiB) and will revert to the default settings (disabled=no, memory-size=16MiB). But if you simply disable or enable the guest after import, or touch its memory settings, all of the settings will be properly saved and remembered after the host reboots.
 
telepro
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 63
Joined: Sun Apr 03, 2011 7:50 pm

Re: metarouter size resets to 16MB after reboot

Fri May 18, 2012 1:17 pm

Thanks much for the workaround. No problem in changing our procedural sequence to implement this as the units are staged. We write up and execute strict, detailed staging procedures with the hope of eliminating any differences in delivered units. And it had not occured to me to change a setting on the metarouter configuration after the import was completed to make the configuration stick. Again, many thanks.

Who is online

Users browsing this forum: No registered users and 4 guests