Buenas. Segue abaixo um script shell para cálculo de HugePages.

Mais informações sobre o script:

Shell Script to Calculate Values Recommended Linux HugePages / HugeTLB Configuration [ID 401749.1]

HugePages on Linux: What It Is… and What It Is Not… [ID 361323.1]

[et_pb_dmb_code_snippet _builder_version=”4.0.6″ code=”IyEvYmluL2Jhc2gKIwojIGh1Z2VwYWdlc19zZXR0aW5ncy5zaAojCiMgTGludXggYmFzaCBzY3JpcHQgdG8gY29tcHV0ZSB2YWx1ZXMgZm9yIHRoZQojIHJlY29tbWVuZGVkIEh1Z2VQYWdlcy9IdWdlVExCIGNvbmZpZ3VyYXRpb24KIwojIE5vdGU6IFRoaXMgc2NyaXB0IGRvZXMgY2FsY3VsYXRpb24gZm9yIGFsbCBzaGFyZWQgbWVtb3J5CiMgc2VnbWVudHMgYXZhaWxhYmxlIHdoZW4gdGhlIHNjcmlwdCBpcyBydW4sIG5vIG1hdHRlciBpdAojIGlzIGFuIE9yYWNsZSBSREJNUyBzaGFyZWQgbWVtb3J5IHNlZ21lbnQgb3Igbm90LgojCiMgVGhpcyBzY3JpcHQgaXMgcHJvdmlkZWQgYnkgRG9jIElEIDQwMTc0OS4xIGZyb20gTXkgT3JhY2xlIFN1cHBvcnQgCiMgaHR0cDovL3N1cHBvcnQub3JhY2xlLmNvbQoKIyBXZWxjb21lIHRleHQKZWNobyAiClRoaXMgc2NyaXB0IGlzIHByb3ZpZGVkIGJ5IERvYyBJRCA0MDE3NDkuMSBmcm9tIE15IE9yYWNsZSBTdXBwb3J0IAooaHR0cDovL3N1cHBvcnQub3JhY2xlLmNvbSkgd2hlcmUgaXQgaXMgaW50ZW5kZWQgdG8gY29tcHV0ZSB2YWx1ZXMgZm9yIAp0aGUgcmVjb21tZW5kZWQgSHVnZVBhZ2VzL0h1Z2VUTEIgY29uZmlndXJhdGlvbiBmb3IgdGhlIGN1cnJlbnQgc2hhcmVkIAptZW1vcnkgc2VnbWVudHMuIEJlZm9yZSBwcm9jZWVkaW5nIHdpdGggdGhlIG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lY29tbWVuZGVkIHNldHRpbmc6IHZtLmh1Z2V0bGJfcG9vbCA9ICRIVUdFVExCX1BPT0wiIDs7CiAgICcyLjYnKSBlY2hvICJSZWNvbW1lbmRlZCBzZXR0aW5nOiB2bS5ucl9odWdlcGFnZXMgPSAkTlVNX1BHIiA7OwogICAgKikgZWNobyAiVW5yZWNvZ25pemVkIGtlcm5lbCB2ZXJzaW9uICRLRVJOLiBFeGl0aW5nLiIgOzsKZXNhYwoKIyBFbmQ=[/et_pb_dmb_code_snippet]

Instruções:

a) Logado com o user oracle crie um shell script chamado huge.sh (vi huge.sh)
b) Cole o conteúdo do script dentro do arquivo huge.sh e salve o mesmo (:x)
c) Execute chmod +x huge.sh (para que possa ser possível executar o script)
d) Execute ./huge.sh

1-Importante estar atento que este script fará o cálculo para todos os segmentos de memória compartilhada (shared memory segments) quando executado, sendo um segmento de RDBMS Oracle ou não.

2-Todas as instances devem estar no ar quando o script é executado.

3-Não pode estar sendo utilizado o Automatic Memory Management (AMM) – ID 749851.1

Att
Vitor Jr.