avatar
C*S
1
Hi, I met a strange problem.
I have a simulation program. I wrote it on Linux using gcc.
I worked very well. Since I have only 1GB ram memory, whenever
it needs more memory, it uses swap. I also run this on a server
having 4GB ram. Everything was smooth.
After my system failure (hardware), I decided to install FreeBSD
because the Linux fedora distributions are getting worse, and
RHLE are charging money, and tired of suse....
I used FreeBSD 4.10, 4.11, 5.2, 5.3, 5.4 (a week of installying
again a
avatar
T*r
2
ulimit?

【在 C*S 的大作中提到】
: Hi, I met a strange problem.
: I have a simulation program. I wrote it on Linux using gcc.
: I worked very well. Since I have only 1GB ram memory, whenever
: it needs more memory, it uses swap. I also run this on a server
: having 4GB ram. Everything was smooth.
: After my system failure (hardware), I decided to install FreeBSD
: because the Linux fedora distributions are getting worse, and
: RHLE are charging money, and tired of suse....
: I used FreeBSD 4.10, 4.11, 5.2, 5.3, 5.4 (a week of installying
: again a

avatar
o*v
3
centos

【在 C*S 的大作中提到】
: Hi, I met a strange problem.
: I have a simulation program. I wrote it on Linux using gcc.
: I worked very well. Since I have only 1GB ram memory, whenever
: it needs more memory, it uses swap. I also run this on a server
: having 4GB ram. Everything was smooth.
: After my system failure (hardware), I decided to install FreeBSD
: because the Linux fedora distributions are getting worse, and
: RHLE are charging money, and tired of suse....
: I used FreeBSD 4.10, 4.11, 5.2, 5.3, 5.4 (a week of installying
: again a

avatar
C*S
4
It should be unlimited, since freeBDS can recongnize 1.5GB (I borrowed
one stick from a friend). But still the program cannot go beyond 1GB or so.
For the case of 1.5GB ram, it does not use swap before segment fault.

【在 T********r 的大作中提到】
: ulimit?
avatar
r*e
5
If you try "ulimit -a" under bash, you will see something like
data seg size (kbytes, -d) 524288
That is the maximum data memory one process can use.
To tune it, add
kern.maxdsiz="1610612736"
to /boot/loader.conf and reboot.

【在 C*S 的大作中提到】
: It should be unlimited, since freeBDS can recongnize 1.5GB (I borrowed
: one stick from a friend). But still the program cannot go beyond 1GB or so.
: For the case of 1.5GB ram, it does not use swap before segment fault.

avatar
C*S
6
Thank you so much, royale and terminator! (I actually did not understand
terminator until I saw royale.)

【在 r****e 的大作中提到】
: If you try "ulimit -a" under bash, you will see something like
: data seg size (kbytes, -d) 524288
: That is the maximum data memory one process can use.
: To tune it, add
: kern.maxdsiz="1610612736"
: to /boot/loader.conf and reboot.

avatar
C*S
7
Royale, how large this kern.maxsiz value can be?
The number you give here is 1.5GB. However, when
I was a little bit greedy after trying this number,
I put in 8GB (2^??) as the value for it. However,
the system refused to boot.
So what is the largest number it can be? I am think
of 4GB simulations.
By the way, I do not know how to fix the problem when
it refused to reboot, so reinstalling again. Is there
a better way to change the number after the system
fails to boot up?

【在 r****e 的大作中提到】
: If you try "ulimit -a" under bash, you will see something like
: data seg size (kbytes, -d) 524288
: That is the maximum data memory one process can use.
: To tune it, add
: kern.maxdsiz="1610612736"
: to /boot/loader.conf and reboot.

avatar
r*e
8
How much memory do you have? Don't go beyond that number.
If your program has memory leak, your system will be in trouble.
Can you boot to single user mode?
You don't need to reinstall system, at least you can use a FreeSBIE CD.

【在 C*S 的大作中提到】
: Royale, how large this kern.maxsiz value can be?
: The number you give here is 1.5GB. However, when
: I was a little bit greedy after trying this number,
: I put in 8GB (2^??) as the value for it. However,
: the system refused to boot.
: So what is the largest number it can be? I am think
: of 4GB simulations.
: By the way, I do not know how to fix the problem when
: it refused to reboot, so reinstalling again. Is there
: a better way to change the number after the system

avatar
T*r
9
boot from install CD, choose "FixIt" in the installer menu, then
choose the second item in the following menu, you will get a
shell. then you can mount the disk to modify any files.

【在 C*S 的大作中提到】
: Royale, how large this kern.maxsiz value can be?
: The number you give here is 1.5GB. However, when
: I was a little bit greedy after trying this number,
: I put in 8GB (2^??) as the value for it. However,
: the system refused to boot.
: So what is the largest number it can be? I am think
: of 4GB simulations.
: By the way, I do not know how to fix the problem when
: it refused to reboot, so reinstalling again. Is there
: a better way to change the number after the system

avatar
C*S
10
I have 1.25GB (0.5 + 0.5 + 0.256) now, and I set the maxdsiz to 2GB.
I have 4GB swap. I was thinking of larger than 4GB program. My boss
asked me to buy 2GB more memory (the motherboard supports up to 2.5G)
so I will remove two sticks to make room for the 1GB sticks.
Do you mean if I have larger physical memory then I can have larger
maxdsiz? I am worrying if the system can give all the memory and
some swap to my program.
Thanks!

【在 r****e 的大作中提到】
: How much memory do you have? Don't go beyond that number.
: If your program has memory leak, your system will be in trouble.
: Can you boot to single user mode?
: You don't need to reinstall system, at least you can use a FreeSBIE CD.

avatar
C*S
11
Oh, I see... If I knew this I could have saved a lot of time and trouble!
Thanks a lot!

【在 T********r 的大作中提到】
: boot from install CD, choose "FixIt" in the installer menu, then
: choose the second item in the following menu, you will get a
: shell. then you can mount the disk to modify any files.

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。