Reduce memory usage SWAP
Hello, I have 4 instances Oracle 9i in a server on linux, which have 700 Mb of SGA each one, and the server have 4 Gb RAM.
When I reboot the server, this haven´t use of SWAP but after a time the SWAP memory arrive to 1.3 Gb, and I would like reduce this number.
How can I do this?
Thanks
Hi,
I have 4 instances Oracle 9i in a server on linux, which have 700 Mb of SGA each one, and the server have 4 Gb RAM.Is the gig left over allocated for PGA? Sizing multiple instances on a server is tricky, here is how I do it:
http://www.dba-oracle.com/art_dbazine_ram.htm
but after a time the SWAP memory arrive to 1.3 Gb, and I would like reduce this number.The trick is to allocate the RAM so that you use it all, but not so high that you see "page in" swap.
Where are you seeing swap?
I look at vmstat "pi", or page-ins:
http://www.dba-oracle.com/t_tuning_cpu_usage_vmstat.htm
Hope this helps . . .
Donald K. Burleson
Oracle Press author
Author of "Oracle Tuning: The Definitive Reference"
http://www.rampant-books.com/book_2005_1_awr_proactive_tuning.htm
Similar Messages
-
How to reduce memory usage?
OK - I've read through a ton of posts that discuss the "Out of memory" problem in Encore, but what can I do to reduce memory usage?
I'm trying to produce a very simple Blu-Ray (h.264) project in Encore CS3 on Windows Vista. There are 8 or 9 timelines, a main menu, and 6 sub-menus. Each sub-menu has six static buttons. There are no transitons or motion menus. When I load the project, Task Manager says Encore is using about 1.3 GB RAM. I constantly get "out of memory" errors.
I've loaded the same project on Vista 32-bit w/ 4GB RAM and Vista 64-bit w/ 8 GB RAM. Same behavior on both.
Two questions:
1. Why does Encore need 1.3 GB RAM for such a simple project?
2. How do I reduce the memory usage?
TIA for help on the PITA,
rgamesPlease check with below link, if this can help.
http://forums.creativecow.net/thread/145/863785#863796 -
How to reduce memory usage when loading bitmaps from the library?
When I use BitmapData.loadBitmap() to load an image from the library and then attachBitmap() to add it to a MovieClip it takes a lot more memory as opposed to just having the same image inside a MovieClip statically in a frame on it's timeline.
The function dispose() not only clears the BitmapData object but also destroys the previously attached bitmap inside the MovieClip, so it can not be used to free any memory.
Is it how it is supposed to be or is there any other way to dynamically attach bitmaps with memory usage comparable to just having them on stage?no, you use attachMovie() to create instance from library movieclips that have a linkage id.
you can then create a bitmapdata instance and use the draw() method to overlay as many as needed. -
Large image sequences in Flash - How to reduce memory usage?
So I'm trying to publish a looping animation in Flash with a large amount of image sequences in it. (around 3000 frames all told). And I'm having problems with the swf using too much memory when it's played.
The swf is about 80mb, but the file uses an excess of 2gb of ram when played. I don't know why that would be. A memory leak?
My understanding is: that Flash will just load all images in a swf into memory unless you dump the memory somehow.Can anyone explain how to do this? Is it possible? I can't seem to find a solution online.
ThanksThanks for your reply. I think I was being just overly ambitious trying to get this to play in swf form on sub 4gb ram machines. I've resorted to external video.
-
High memory usage OSX Lion on iMac
Hi,
Recently upgraded 2006 iMac 6.1 to OSX 10.7.2 (4GB). Noticed performance dropped significantly when 2 or more users are logged in especially when switching users. Observed memory usage for OSX Lion is far higher than Snow Leopard! By startup 2GB real memory already allocated and often down to last 500MB. Performance appear to slow down due to swapping as swap i/o appears to increase.
On snow leopard I had 6 users logged in and 4GB was plenty. Lion appears to be a MS product!!!!
Anyone else experienced high memory usage on Lion and any ideas how to reduce memory consumption?
Unfortunately at the maximum memory capacity for my my iMac so need to find ways to reduce memory usage. There must be a kernel compiler option that could reduce memory.....
Also considering SSD drive to speed up swap i/o read/writes.
Otherwise will have to go back to leopard :-(
Thanks for any help in advance.
-Dav
PS> OSX Lion is alot more stable than previous OSX releases with this iMac model. Especially iMacs suffering the notorious NVDIDIA GPU heat problems...You mac can handle up to 3gb of ram, but slightly more will be available with 4gb installed. For Lion to run smooth, a true 4gb of ram is preferred, which may explain the sluggishness of your mac.
-
New Evolution patch reduces memory by 40-60MB
http://gnomedesktop.org/node/2725
Philip Van Hoof wrote: "Here are the patches to get the upstream version of evolution-data-server and evolution-exchange to start using the mmap technique for loading the header and content info summary data of Evolution and tinymail.
I expect it to reduce memory usage of Evolution with approximately fourty to sixty megabytes of ram, depending on the amount of folders you have."
HDYT?(how do you think?)There is a program that works great to control memory on a Macintosh. I know it works great with System X.6.8, and it also works great with Mavericks. It is Memory Keeper. It is this link:>https://itunes.apple.com/us/app/memorykeeper/id689992800?mt=12
Since I got my MacBook Pro built special with 8 gb of memory, I do not have a memory problem for the moment. My old MacBook with 4 gb of memory was almost unusuable when I was online with Chrome until I installed Memory Keeper. Instead of hauling home a MacBook Pro I ordered one with the 8 gb of memory, and I must say that it uses 3.9 gb of memory with Mavericks and Chrome running. Of course, that is not an issue with 8 gb of memory and Memory Keeper. If I had only 4 gb though it would be a major problem. -
Are any benifits of static declarations regarding memory Usage
Hi,
I am new to java programming and I am currently working on Code Optimization to improve application performance and reduce run time memory usage. So, please I need tips on performance improvement and memory consumption.
Is static method declaration helpful to reduce memory usage and to improve performance?
Please, reply me?
Thanks and Regards
Dagadu AkambeBigDaddyLoveHandles wrote:
georgemc wrote:
Write good, straightforward object-oriented code that doesn't use tricks, and don't try to optimise it yourelf. SeriouslyThat's exactly what Brian Goetz expressed in the article I linked to in reply #8.
I've always wondered about the newbie obsession with optimization.
This is not directed to the OP especially, but I've seen it happen many times: newbie is still writing inelegant, if not tortured code, and they get this bee in their bonnet that they have to optimize it, so they pound the code until it is beyond incomprehensible. Then they time it and it runs more slowly!Perhaps they're crafting O(n^3) sort routines, and not knowing about things like appropriate data structures and algorithms, big-O measurement, etc. the only conclusion they're able to draw is that their code is slow because they're creating so many objects, and declaring variables inside of loops, etc. -
How to get less memory usage and cpu usage in an old pc with arch?
hi, i installed archlinux sucessfully after some problems.
but the system use a lot of memory (free said me 184mb) only with irssi, finch, mp3blaster and midori opened and is "slower" than when i used slitaz linux in it, why?
well, the things that i installed in arch are:
xorg + xf86-video-intel
jwm
irssi, finch, mp3blaster, htop.
midori, opera, elinks, links-g, epiphany.
geany, leafpad, go-openoffice, djview4, gnumeric, epdfview
isomaster, inkscape, gpicview, cdrkit, mtpaint.
pcmanfm, emelfm2, hal.
octave, mathematica5, R, wxmaxima,gnuplot.
nrg2iso, lxsplit, dclock.
here is a screenshot:
the pc have this skills:
800mhz celeron 370
MB gygabite gaw-mm7
192mb ram pc100
30 GB HD ide 5400 rpm
some code now:
lshw -businfo
WARNING: you should run this program as super-user.
Bus info Device Class Description
=================================================
system Computer
bus Motherboard
memory 183MiB System memory
cpu@0 processor Celeron (Coppermine)
memory 32KiB L1 cache
memory 128KiB L2 cache
pci@0000:00:00.0 bridge 82810 GMCH (Graphics Memory Controller Hub)
pci@0000:00:01.0 display 82810 (CGC) Chipset Graphics Controller
pci@0000:00:1e.0 bridge 82801AA PCI Bridge
pci@0000:01:03.0 eth0 network IC Plus IP100A Integrated 10/100 Ethernet MAC + PHY
pci@0000:00:1f.0 bridge 82801AA ISA Bridge (LPC)
pci@0000:00:1f.1 storage 82801AA IDE Controller
pci@0000:00:1f.2 bus 82801AA USB Controller
pci@0000:00:1f.3 bus 82801AA SMBus Controller
pci@0000:00:1f.5 multimedia 82801AA AC'97 Audio Controller
lspci -v
00:00.0 Host bridge: Intel Corporation 82810 GMCH (Graphics Memory Controller Hub) (rev 03)
Subsystem: Intel Corporation 82810 GMCH (Graphics Memory Controller Hub)
Flags: bus master, fast devsel, latency 0
Kernel driver in use: agpgart-intel
Kernel modules: intel-agp
00:01.0 VGA compatible controller: Intel Corporation 82810 (CGC) Chipset Graphics Controller (rev 03) (prog-if 00 [VGA controller])
Subsystem: Giga-byte Technology Device 0200
Flags: bus master, 66MHz, medium devsel, latency 0, IRQ 11
Memory at e0000000 (32-bit, prefetchable) [size=64M]
Memory at ee000000 (32-bit, non-prefetchable) [size=512K]
Expansion ROM at <unassigned> [disabled]
Capabilities: <access denied>
00:1e.0 PCI bridge: Intel Corporation 82801AA PCI Bridge (rev 02) (prog-if 00 [Normal decode])
Flags: bus master, fast devsel, latency 0
Bus: primary=00, secondary=01, subordinate=01, sec-latency=64
I/O behind bridge: 0000c000-0000cfff
Memory behind bridge: e7e00000-ebefffff
Prefetchable memory behind bridge: dfc00000-dfcfffff
Kernel modules: shpchp
00:1f.0 ISA bridge: Intel Corporation 82801AA ISA Bridge (LPC) (rev 02)
Flags: bus master, medium devsel, latency 0
Kernel modules: iTCO_wdt, intel-rng
00:1f.1 IDE interface: Intel Corporation 82801AA IDE Controller (rev 02) (prog-if 80 [Master])
Subsystem: Intel Corporation 82801AA IDE Controller
Flags: bus master, medium devsel, latency 0
[virtual] Memory at 000001f0 (32-bit, non-prefetchable) [size=8]
[virtual] Memory at 000003f0 (type 3, non-prefetchable) [size=1]
[virtual] Memory at 00000170 (32-bit, non-prefetchable) [size=8]
[virtual] Memory at 00000370 (type 3, non-prefetchable) [size=1]
I/O ports at ff00 [size=16]
Kernel driver in use: ata_piix
Kernel modules: ata_piix, piix
00:1f.2 USB Controller: Intel Corporation 82801AA USB Controller (rev 02) (prog-if 00 [UHCI])
Subsystem: Intel Corporation 82801AA USB Controller
Flags: bus master, medium devsel, latency 0, IRQ 9
I/O ports at da00 [size=32]
Kernel driver in use: uhci_hcd
Kernel modules: uhci-hcd
00:1f.3 SMBus: Intel Corporation 82801AA SMBus Controller (rev 02)
Subsystem: Intel Corporation 82801AA SMBus Controller
Flags: medium devsel, IRQ 10
I/O ports at 04c0 [size=16]
Kernel driver in use: i801_smbus
Kernel modules: i2c-i801
00:1f.5 Multimedia audio controller: Intel Corporation 82801AA AC'97 Audio Controller (rev 02)
Subsystem: Giga-byte Technology Device 2000
Flags: bus master, medium devsel, latency 0, IRQ 10
I/O ports at de00 [size=256]
I/O ports at dc00 [size=64]
Kernel driver in use: Intel ICH
Kernel modules: snd-intel8x0
01:03.0 Ethernet controller: Sundance Technology Inc / IC Plus Corp IC Plus IP100A Integrated 10/100 Ethernet MAC + PHY (rev 31)
Subsystem: Sundance Technology Inc / IC Plus Corp Device 0201
Flags: bus master, medium devsel, latency 64, IRQ 11
I/O ports at cc00 [size=128]
Memory at e8000000 (32-bit, non-prefetchable) [size=512]
Expansion ROM at dfc00000 [disabled] [size=64K]
Capabilities: <access denied>
Kernel driver in use: sundance
Kernel modules: sundance
lsmod
snd_ac97_codec 85937 1 snd_intel8x0
snd_seq 42628 5 snd_seq_dummy,snd_seq_oss,snd_seq_midi_event
snd_seq_device 4313 3 snd_seq_dummy,snd_seq_oss,snd_seq
snd_pcm_oss 33693 0
ac97_bus 750 1 snd_ac97_codec
snd_mixer_oss 14810 1 snd_pcm_oss
snd_pcm 57479 3 snd_intel8x0,snd_ac97_codec,snd_pcm_oss
snd_timer 16117 2 snd_seq,snd_pcm
sundance 15991 0
uhci_hcd 19124 0
snd 43847 9 snd_seq_oss,snd_intel8x0,snd_ac97_codec,snd_seq,snd_seq_device,snd_pcm_oss,snd_mixer_oss,snd_pcm,snd_timer
mii 3218 1 sundance
ppdev 4882 0
i2c_i801 7122 0
soundcore 5007 1 snd
iTCO_wdt 7577 0
ehci_hcd 31594 0
lp 6616 0
sr_mod 13161 0
analog 7939 0
psmouse 56309 0
ns558 1931 0
parport_pc 27680 1
shpchp 26592 0
intel_agp 23225 1
button 3638 0
thermal 9326 0
processor 26494 1
snd_page_alloc 5809 2 snd_intel8x0,snd_pcm
iTCO_vendor_support 1453 1 iTCO_wdt
gameport 7130 3 analog,ns558
parport 26575 3 ppdev,lp,parport_pc
pcspkr 1347 0
usbcore 118921 3 uhci_hcd,ehci_hcd
serio_raw 3620 0
evdev 6970 8
i2c_core 15369 1 i2c_i801
cdrom 31625 1 sr_mod
pci_hotplug 23492 1 shpchp
agpgart 23331 2 intel_agp
sg 21079 0
rtc_cmos 7504 0
rtc_core 12011 1 rtc_cmos
rtc_lib 1450 1 rtc_core
ext2 56463 1
mbcache 4278 1 ext2
sd_mod 24101 3
pata_acpi 2264 0
ata_generic 2235 0
ata_piix 17725 2
libata 135579 3 pata_acpi,ata_generic,ata_piix
floppy 47412 0
scsi_mod 78933 4 sr_mod,sg,sd_mod,libata
i've read i can disable the kernel modules that i don't need to improve the memory usage.
which modules i can disable without "kill my system"?. i don't want SATA, DVD, bluray, infrared, floppys, bluetooth, usb3.0, 3d video card, dial-up-integrated modem, ntfs, 'cause mi old is so old. i want it only for the university.
thanks in advantage for the tips, and sorry if someone can't understand very well that i wanna tell you, english isn't my "mother languaje".thanks for the answers. yes, i have a 1 gb of swap.
i think i can reduce the memory usage of the system if i dissable the kernel modules that i don't use. but, the question is: what modules is safe to disable to get it?
thanks in advantage -
How to minimize memory usage with VM settings
Using JDK 1.4.2, I am trying to minimize the memory usage of my application.
Our GUI application consumes about ~20MB of heap space during normal operation, but it can easily grow to 50MB in some rare cases (Special feature accessed by user).
We have to be able to run multiple instances (separate process/VMs) of this application on low end Windows PCs.
The applications don't usually run for very long (less than 8 hours).
Here is my problem.
If I set the -Xms=20M -Xmx=64M, it works fine, but the GC is not very aggressive and soon, the application starts using a lot of memory, even if it is not really needed. And it never returns the memory to Windows OS.
So each VM take more memory than really needed, which causes significant swapping on these low end PC (little RAM available).
If I reduce the -Xmx flag, than I run out of memory in the rare cases where I need the full memory.
Ideally, I would like to configure the GC to be more aggressive, i.e. the GC should collect instead of getting additional memory from the OS when possible.
I read a few papers on Sun's web site about HotSpot tunning, but most of them are geared for large servers.
Thanks!
FrancoisAnd you are using the task manager to determine how "much" memory is being used correct?
I suggest that you search out and read the numerous threads on this site that discuss that subject. -
How to reduce memory footprint
Hello, while I observed that Audition always loads whole audio document into memory, I'm having quite a problem when processing long multichannel audio files as the whole physical memory gets utilized instantly I'm getting exhaustive disk swapping. This is especially awkward for long operations. I'm having a question if there's a way to reduce the memory footprint, ie. to Audition loads into memory just the file part that it's just working with, or to turn off undo. I assume the rapid memory usage is caused by collecting undo data also, whose I don't need in most cases.
You can use the Clear History button in the History page to clear all undo data or selectively clear individual steps from History.
-
Memory usage of excel stays high after Macro is executed and excel crashes after trying to close it
Hi,
I'm trying to resolve an issue with an excel based tool. The macros retrieve data from an Oracle database and do calculations with the data. They also open and write into files in the same directory. The macros all run and finish the calculations. I can
continue to use and modify the sheet. I can also close the workbook, however excel memory usage I see in the windows Task manager stays elevated.If I close Excel it says: Excel stopped working and then it tries to recover information...
I assume something in the macro did not finish properly and memory was not released. I would like to check what is still open (connection, stream or any other object) when I close the workbook I would like to have a list of all still used memory. Is there
a possibility to do so.
Here the code I'm using, its reduced to functions which open something. Functions
get_v_tools() and get_change_tools() are same as get_client_positions().
Public conODBC As New ADODB.Connection
Public myPath As String
Sub get_positions()
Dim Src As range, dst As range
Dim lastRow As Integer
Dim myPath As String
lastRow = Sheets("SQL_DATA").Cells(Sheets("SQL_DATA").rows.Count, "A").End(xlUp).Row
Sheets("SQL_DATA").range("A2:AD" & lastRow + 1).ClearContents
Sheets("SQL_DATA").range("AG2:BE" & lastRow + 2).ClearContents
Sheets("SQL_DATA").range("AE3:AF" & lastRow + 2).ClearContents
k = Sheets("ToolsList").Cells(Sheets("ToolsList").rows.Count, "A").End(xlUp).Row + 1
Sheets("ToolsList").range("A2:M" & k).ClearContents
'open connection
Call open_connection
lastRow = Sheets("SQL_DATA").Cells(Sheets("SQL_DATA").rows.Count, "A").End(xlUp).Row
If lastRow < 2 Then GoTo ErrorHandling
'copy bs price check multiplications
Set Src = Sheets("SQL_DATA").range("AE2:AF2")
Set dst = Worksheets("SQL_DATA").range("AE2").Resize(lastRow - 1, Src.columns.Count)
dst.Formula = Src.Formula
On Error GoTo ErrorHandling
'new prices are calculated
newPrice_calculate (lastRow)
Calculate
myPath = ThisWorkbook.Path
'Refresh pivot table in Position Manager
Sheets("Position Manager").PivotTables("PivotTable3").ChangePivotCache ActiveWorkbook. _
PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _
myPath & "\[Position_Manager_v1.0.xlsm]SQL_DATA!R1C2:R" & lastRow & "C31" _
, Version:=xlPivotTableVersion14)
ErrorHandling:
Set Src = Nothing
Set dst = Nothing
If conODBC.State <> 0 Then
conODBC.Close
End If
End Sub
Sub open_connection()
Dim sql_data, sql_data_change, sql_data_v As Variant
Dim wdth, TotalColumns, startRow As Integer
Dim rst As New ADODB.Recordset
Errorcode = 0
On Error GoTo ErrorHandling
Errorcode = 1
With conODBC
.Provider = "OraOLEDB.Oracle.1"
.ConnectionString = "Password=" & pswrd & "; Persist Security Info=True;User ID= " & UserName & "; Data Source=" & DataSource
.CursorLocation = adUseClient
.Open
.CommandTimeout = 300
End With
startRow = Sheets("SQL_DATA").Cells(Sheets("SQL_DATA").rows.Count, "A").End(xlUp).Row + 1
sql_data = get_client_positions(conODBC, rst)
wdth = UBound(sql_data, 1)
Sheets("SQL_DATA").range("A" & startRow & ":AA" & wdth + startRow - 1).Value = sql_data
'Run change tools instruments
startRow = Sheets("ToolsList").Cells(Sheets("ToolsList").rows.Count, "A").End(xlUp).Row + 1
sql_data_change = get_change_tools(conODBC, rst)
wdth = UBound(sql_data_change, 1)
Sheets("ToolsList").range("A" & startRow & ":M" & wdth + startRow - 1).Value _
= sql_data_change
'open SQL for V tools instruments
startRow = Sheets("ToolsList").Cells(Sheets("ToolsList").rows.Count, "A").End(xlUp).Row + 1
sql_data_v = get_v_tools(conODBC, rst)
wdth = UBound(sql_data_v, 1)
Sheets("ToolsList").range("A" & startRow & ":L" & startRow + wdth - 1).Value = sql_data_v
conODBC.Close
ErrorHandling:
If rst.State <> 0 Then
rst.Close
End If
Set rst = Nothing
End Sub
Private Function get_client_positions(conODBC As ADODB.Connection, rst_posi As ADODB.Recordset) As Variant
Dim sql_data As Variant
Dim objCommand As ADODB.Command
Dim sql As String
Dim records, TotalColumns As Integer
On Error GoTo ErrorHandling
Set objCommand = New ADODB.Command
sql = read_sql()
With objCommand
.ActiveConnection = conODBC 'connection for the commands
.CommandType = adCmdText
.CommandText = sql 'Sql statement from the function
.Prepared = True
.CommandTimeout = 600
End With
Set rst_posi = objCommand.Execute
TotalColumns = rst_posi.Fields.Count
records = rst_posi.RecordCount
ReDim sql_data(1 To records, 1 To TotalColumns)
If TotalColumns = 0 Or records = 0 Then GoTo ErrorHandling
If TotalColumns <> 27 Then GoTo ErrorHandling
If rst_posi.EOF Then GoTo ErrorHandling
l = 1
Do While Not rst_posi.EOF
For i = 0 To TotalColumns - 1
sql_data(l, i + 1) = rst_posi.Fields(i)
Next i
l = l + 1
rst_posi.MoveNext
Loop
ErrorHandling:
rst_posi.Close
Set rst_posi = Nothing
Set objCommand = Nothing
get_client_positions = sql_data
End Function
Private Function read_sql() As String
Dim sqlFile As String, sqlQuery, Line As String
Dim query_dt As String, client As String, account As String
Dim GRP_ID, GRP_SPLIT_ID As String
Dim fso, stream As Object
Set fso = CreateObject("Scripting.FileSystemObject")
client = Worksheets("Cover").range("C9").Value
query_dt = Sheets("Cover").range("C7").Value
GRP_ID = Sheets("Cover").range("C3").Value
GRP_SPLIT_ID = Sheets("Cover").range("C5").Value
account = Sheets("Cover").range("C11").Value
sqlFile = Sheets("Cover").range("C15").Value
Open sqlFile For Input As #1
Do Until EOF(1)
Line Input #1, Line
sqlQuery = sqlQuery & vbCrLf & Line
Loop
Close
' Replace placeholders in the SQL
sqlQuery = Replace(sqlQuery, "myClent", client)
sqlQuery = Replace(sqlQuery, "01/01/9999", query_dt)
sqlQuery = Replace(sqlQuery, "54747743", GRP_ID)
If GRP_SPLIT_ID <> "" Then
sqlQuery = Replace(sqlQuery, "7754843", GRP_SPLIT_ID)
Else
sqlQuery = Replace(sqlQuery, "AND POS.GRP_SPLIT_ID = 7754843", "")
End If
If account = "ZZ" Then
sqlQuery = Replace(sqlQuery, "AND AC.ACCNT_NAME = 'ZZ'", "")
Else
sqlQuery = Replace(sqlQuery, "ZZ", account)
End If
' Create a TextStream to check SQL Query
sql = sqlQuery
myPath = ThisWorkbook.Path
Set stream = fso.CreateTextFile(myPath & "\SQL\LastQuery.txt", True)
stream.Write sql
stream.Close
Set fso = Nothing
Set stream = Nothing
read_sql = sqlQuery
End FunctionThanks Starain,
that's what I did the last days and found that the problem is in the
newPrice_calculate (lastRow)
function. This function retrieves data (sets it as arrays) which was correctly pasted into the sheet, loops through all rows and does math/calendar calculations with cell values using an Add-In("Quantlib")
Public errorMessage as String
Sub newPrice_calculate(lastRow)
Dim Type() As Variant
Dim Id() As Variant
Dim Price() As Variant
Dim daysTo() As Variant
Dim fx() As Variant
Dim interest() As Variant
Dim ObjCalend as Variant
Dim newPrice as Variant
On Error GoTo Catch
interest = Sheets("SQL_DATA").range("V2:V" & lastRow).Value
Type = Sheets("SQL_DATA").range("L2:L" & lastRow).Value Id = Sheets("SQL_DATA").range("M2:M" & lastRow).Value Price = Sheets("SQL_DATA").range("T2:T" & lastRow).Value
daysTo = Sheets("SQL_DATA").range("K2:K" & lastRow).Value
fx = Sheets("SQL_DATA").range("U2:U" & lastRow).Value
qlError = 1
For i = 2 To lastRow
If (i, 1) = "LG" Then
'set something - nothing spectacular like
interest(i, 1) = 0
daysTo(i , 1) = 0
Else
adjTime = Sqr(daysTo(i, 1) / 365)
ObjCalend(i,1) =Application.Run("qlCalendarHolidaysList", _
"CalObj", ... , .... other input parameters)
If IsError(ObjCalend(i,1)) Then GoTo Catch
'other calendar calcs
newPrice(i,1) = Application.Run( 'quantLib calcs)
End If
Catch:
Select Case qlError
Case 1
errorMessage = errorMessage & " QuantLibXL Cal Error at: " & i & " " & vbNewLine & Err.Description
ObjCalend(i,1) (i, 1) = "N/A"
End Select
Next i
Sheets("SQL_DATA").range("AB2:AB" & lastRow).Value = newPrice
'Sheets("SQL_DATA").range("AA2:AA" & lastRow).Value = daysTo
' erase and set to nothing all arrays and objects
Erase Type
Erase id
Erase Price
Set newPrice = Nothing
Is there a possibility to clean everything in:
Private Sub Workbook_BeforeClose(Cancel As Boolean)
End Sub
Thanks in advance
Mark -
TOP - Pageouts and memory usage.
Looks like I have plenty of memory for what I am doing. But What do the cumulative numbers around pagein's mean?
Processes: 80 total, 7 running, 3 stuck, 70 sleeping... 523 threads 15:20:14
Load Avg: 1.99, 1.53, 1.37 CPU usage: 10.33% user, 9.00% sys, 80.67% idle
SharedLibs: num = 5, resident = 13M code, 0 data, 1468K linkedit.
MemRegions: num = 32848, resident = 2116M + 18M private, 877M shared.
PhysMem: 1853M wired, 2116M active, 3466M inactive, 7439M used, 753M free.
VM: 19G + 284M 332461(0) pageins, 47(0) pageouts
PID COMMAND %CPU TIME #TH #PRTS #MREGS RPRVT RSHRD RSIZE VSIZE
12256 top 11.1% 0:14.05 1 18 40 684K 820K 1392K 18M
12238 bash 0.0% 0:00.01 1 14 19 276K 184K 916K 18M
12237 login 0.0% 0:00.02 1 17 136 908K 8724K 3164K 32M
12236 Terminal 1.7% 0:01.45 3 99 433 5264K+ 49M+ 21M+ 419M+
12225 SyncServer 0.0% 0:00.15 2 50 290 3512K 41M 12M 88M
11248 WinAppHelp 0.0% 0:00.40 1 51 289 3208K 40M 11M 339M
11027 Skype 0.0% 0:19.47 31 313 865 46M 76M 88M 557M
10315 PrinterPro 0.0% 0:00.83 2 85 476 12M 51M 29M 423M
10313 launchd 0.0% 0:01.25 3 24 25 120K 296K 464K 18M
8626 QuickTime 0.0% 17:21.09 5 187 655 13M 67M 43M 486M
8556 DashboardC 0.0% 0:06.31 4 124 538 16M 58M 38M 436M
8555 DashboardC 0.0% 0:10.95 4 149 545 23M 58M 49M 444M
8534 Livestatio 16.8% 59:00.13 12 198 771 30M- 94M 62M 584M
8220 Mail 0.0% 0:43.91 27 323 968 24M 94M 80M 554M
2806 Python 0.8% 5:20.05 2 33 281 13M- 248K 14M- 36M-
2761 Transmissi 0.9% 2:49.17 21 270 773 20M 90M 56M 506MAbout OS X Memory Management and Usage
Reading system memory usage in Activity Monitor
Memory Management in Mac OS X
Performance Guidelines- Memory Management in Mac OS X
A detailed look at memory usage in OS X
Understanding top output in the Terminal
The amount of available RAM for applications is the sum of Free RAM and Inactive RAM. This will change as applications are opened and closed or change from active to inactive status. The Swap figure represents an estimate of the total amount of swap space required for VM if used, but does not necessarily indicate the actual size of the existing swap file. If you are really in need of more RAM that would be indicated by how frequently the system uses VM. If you open the Terminal and run the top command at the prompt you will find information reported on Pageins () and Pageouts (). Pageouts () is the important figure. If the value in the parentheses is 0 (zero) then OS X is not making instantaneous use of VM which means you have adequate physical RAM for the system with the applications you have loaded. If the figure in parentheses is running positive and your hard drive is constantly being used (thrashing) then you need more physical RAM. -
Memory usage problem on AIX 7.1
Hi,
We are running Oracle 11GR2 EE on AIX 7.1 and keep getting alerts on the pgchecks (memory paging).
The alerts are coming from another system monitoring tool (Hobbit), but our sys admins are telling us it is because we are overallocating memory.
In our case, we have an 8G SGA for the only database.
Then, we are running grid and ASM.
How can I check the actual (real) memory usage by individual processes of our Oracle database, our emagent (OMS agent), and for our ASM. In our case, we have 32G of Real Memory installed, and we should not be having a memory paging issue.
For the Oracle database, it is set for 8G.
NAME TYPE VALUE
lock_sga boolean FALSE
pga_aggregate_target big integer 0
pre_page_sga boolean FALSE
sga_max_size big integer 8480M
sga_target big integer 0For our ASM instance, it is set for 270M
SQL> sho sga
NAME TYPE VALUE
lock_sga boolean FALSE
pga_aggregate_target big integer 0
sga_max_size big integer 272M
sga_target big integer 0do as below (vmstat takes 2 minutes to complete)
bcm@bcm-laptop:~$ vmstat 6 20
procs -----------memory---------- ---swap-- -----io---- -system-- ----cpu----
r b swpd free buff cache si so bi bo in cs us sy id wa
0 0 0 1347636 81396 1592120 0 0 264 22 382 651 8 3 84 5
0 0 0 1347664 81404 1592144 0 0 0 13 515 1028 4 1 95 0
0 0 0 1353136 81412 1592144 0 0 0 14 507 1021 3 1 95 0
0 0 0 1353012 81420 1592144 0 0 0 23 523 1033 3 1 95 0
0 0 0 1353044 81428 1592144 0 0 0 13 513 1026 3 1 96 0
0 0 0 1353044 81436 1592144 0 0 0 15 517 1045 3 2 95 0
0 0 0 1352920 81444 1592144 0 0 0 15 505 1012 3 1 96 0
1 0 0 1347448 81452 1592156 0 0 1 21 521 1038 4 2 94 0
0 0 0 1347448 81460 1592156 0 0 0 28 513 1030 3 2 95 0
0 0 0 1347448 81468 1592180 0 0 1 21 529 1053 4 1 95 0
0 0 0 1347200 81484 1592176 0 0 0 39 530 1067 3 2 95 0
1 0 0 1347200 81492 1592172 0 0 0 14 530 1058 3 1 96 0
0 0 0 1352796 81500 1592172 0 0 0 17 514 1034 3 2 95 0
0 0 0 1352796 81508 1592180 0 0 0 21 516 1049 6 1 92 0
0 0 0 1352764 81516 1592180 0 0 0 15 506 1024 2 1 95 1
0 0 0 1352252 81524 1592180 0 0 0 15 563 1090 3 2 95 0
0 0 0 1351836 81532 1592180 0 0 0 15 550 1066 4 1 94 0
0 0 0 1346768 81540 1592200 0 0 1 18 547 1111 4 2 94 0
1 0 0 1346152 81548 1592204 0 0 0 69 524 1059 3 2 94 0
0 0 0 1346472 81556 1592244 0 0 1 17 498 1012 2 1 96 0 -
Memory Usage And Hard Drive Activity Increase After Latest Upgrade
I have upgraded to Firefox 3.6.15 and latest Adobe Flash Player. Then i noticed that plugin-container started to take a lot of memory as much as Firefox itself totaling around 600Mb. Then i see hard drive activity intermittently slowing down my laptop and making it unresponsive for a short period of time. I have 50 tabs open. I have disabled Flash and since then plugin-container takes very little memory and i don't see consistent hard drive activity.
I need Flash and i don't want to disable it. Is there a solution to this?I am seeking solutions for same problem. When playing simple online games such as solitaire my memory usage for the plug in container is 300-600 mb while FireFox may only be 80-120 (with several windows or tabs open of mostly text pages). If I disable Adobe add-ons memory usage is greatly reduced. If I understood correctly it is possible to disable the plugin container and run adobe via the old method and another user thought that would solve the problem. I do not understand how it would make a difference but if you havent found a solution you may want to try it. See these 2 threads in the Mozilla forum:
A question and brief explanation and how to disable plugin container in config
I've previously had problems with Adobe crashing Firefox . At least now with Adobe being in the plugin container Firefox does not crash along with it.
I have another issue - I can sometimes still hear the music from a game after I have exited the game and closed the window. I would like to know how to release the resources used by Adobe - kind of like FireFox's RamBack.
Well, good luck to you (and me!) -
Problem with memory usage and CPU usage
Hello,
i have a problem with the memory usage and cpu usage in my project!
My application must run for more than 24 hrs. The problem is that the longer it runs the bigger is the memory and cpu usage!
It starts with ~15% CPU usage and ~70 MBytes memory usage. After ~ 24hrs the CPU usage is ~60% and the memory usage is ~170 MBytes!
After 3 days the CPU usage is almost about 70% and the memory usage is about 360 MBytes!
What can I do to reduce this huge recource usage?
Thank you!Hi Pahe,
I think the issue is memory usage, since CPU usage can increase due to greater memory requirements.
Anyway, it's difficult to debug without seeing your code, can you post it (possibly for LV 7.1 compatibility)? Or just post a JPEG of the piece of code that can give problems...
I guess you're appending data to an array instead of replace data elements, but I can't be sure...
Have a nice day!
graziano
Maybe you are looking for
-
Is there a way to force the tab order to skip a page and then return to that page on a form?
I have a multi-page form with a required page layout. The problem with the current form layout, is that I'm finding my users are getting to page "20" and it seems like the natural end of the form...and stop entering information and submit. The prob
-
How to display text in addition to average group result
Hi All, This is probably really simple but i need your help. What i have done: I have 4 questions which each one has 5 radio box options. For each group of questions, i have put a value of 1-5 for the radio boxes. What i am trying to do: What i want
-
Anywhere access domain users and rights
Hello, I am working with anywhere access on server 2012 R2, and I am wondering if it has the ability to use the existing domain user rights to existing file share's and folders instead of using its own system. For example I added a new share and poin
-
~ORA-16038: log 2 sequence# 140 cannot be archived~ORA-19809: limit exceede
~ORA-16038: log 2 sequence# 140 cannot be archived~ORA-19809: limit exceeded for recovery files~ORA-00312: online log 2 thread 1: '/u02/oradata/PROD/redo02.log' but my /u02/oradata/PROD/ is empty, mod is set to 777 What possible happened? Thanks.
-
Scrolling multiple clips simultaneously when selected
Does cs6 allow you scroll multiple clips simultaneously when selected. It seems I can only scroll one clip even the other clips are selected as well. I also can't seem to select all clips in just two tracks (not select all). 3.0 allowed for both o